From 6e7a0aa37f47c1b3ccc49e96d5231b71ec8e1c53 Mon Sep 17 00:00:00 2001 From: William Valentin Date: Fri, 27 Feb 2026 10:48:49 -0800 Subject: [PATCH] feat(audit): add prune reports to rolling cadence flow --- README.md | 2 +- docs/api/PROTOCOL.md | 2 +- docs/architecture/AGENT_DIAGRAM.md | 2 +- .../GATEWAY_SESSIONS_AND_QUEUE.md | 2 +- ...phase0-instrumentation-ticket-checklist.md | 2 +- ...hase0_baseline_live_2026-02-27-184726.json | 371 ++++++++++++++++++ ...ase0_baseline_live_2026-02-27-184726.jsonl | 109 +++++ .../phase0_baseline_live_2026-02-27-184726.md | 65 +++ ..._live_backend_drift_2026-02-27-184726.json | 230 +++++++++++ ...ne_live_backend_drift_2026-02-27-184726.md | 72 ++++ ...live_backend_native_2026-02-27-184726.json | 249 ++++++++++++ ...ive_backend_native_2026-02-27-184726.jsonl | 15 + ...e_live_backend_native_2026-02-27-184726.md | 56 +++ ...backend_pi_embedded_2026-02-27-184726.json | 333 ++++++++++++++++ ...ackend_pi_embedded_2026-02-27-184726.jsonl | 59 +++ ...e_backend_pi_embedded_2026-02-27-184726.md | 62 +++ ...seline_live_gateway_2026-02-27-184726.json | 104 +++++ ...eline_live_gateway_2026-02-27-184726.jsonl | 6 + ...baseline_live_gateway_2026-02-27-184726.md | 50 +++ ...baseline_live_prune_2026-02-27-184726.json | 300 ++++++++++++++ ...0_baseline_live_prune_2026-02-27-184726.md | 17 + ...phase0_baseline_live_prune_2026-02-27.json | 300 ++++++++++++++ .../phase0_baseline_live_prune_2026-02-27.md | 17 + docs/plans/state.json | 37 +- package.json | 6 +- scripts/prune-phase0-baseline-artifacts.ts | 67 +++- 26 files changed, 2501 insertions(+), 34 deletions(-) create mode 100644 docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.json create mode 100644 docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.jsonl create mode 100644 docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.md create mode 100644 docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.json create mode 100644 docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.md create mode 100644 docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.json create mode 100644 docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.jsonl create mode 100644 docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.md create mode 100644 docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json create mode 100644 docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.jsonl create mode 100644 docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.md create mode 100644 docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.json create mode 100644 docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.jsonl create mode 100644 docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.md create mode 100644 docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.json create mode 100644 docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.md create mode 100644 docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.json create mode 100644 docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.md diff --git a/README.md b/README.md index a152a49..0ae9f16 100644 --- a/README.md +++ b/README.md @@ -1654,7 +1654,7 @@ Cadence scheduling (example: every 6 hours via host cron) with rolling timestamp ``` `audit:phase0-baseline:live*` scripts now default to the current UTC date tag when `--tag` is omitted. Use `audit:phase0-baseline:live:refresh:drift:rolling` when you want each cadence run to keep a distinct tag (`YYYY-MM-DD-HHMMSS`) so drift checks compare against a recent prior snapshot immediately. -Use `audit:phase0-baseline:live:prune` for dry-run retention planning, and `audit:phase0-baseline:live:prune:apply` to prune older rolling-tag artifacts while keeping the newest snapshots per family. Retention depth defaults to `8` tags per family and can be overridden via `KEEP_PER_FAMILY=`. +Use `audit:phase0-baseline:live:prune` for dry-run retention planning, and `audit:phase0-baseline:live:prune:apply` to prune older rolling-tag artifacts while keeping the newest snapshots per family. Retention depth defaults to `8` tags per family and can be overridden via `KEEP_PER_FAMILY=`. Prune runs also write reports to `docs/plans/artifacts/phase0_baseline_live_prune_.{md,json}`. Gateway-origin windows can be captured separately (for example when validating cancel paths): ```bash diff --git a/docs/api/PROTOCOL.md b/docs/api/PROTOCOL.md index a9184f0..a7c571a 100644 --- a/docs/api/PROTOCOL.md +++ b/docs/api/PROTOCOL.md @@ -23,7 +23,7 @@ The gateway provides: - **HTTP Server**: Serves static dashboard and handles webhook endpoints - **Node Capability Negotiation**: Optional companion-node role/capability registration -Operational note: onboarding (`flynn setup` / `flynn onboard`) now runs post-save live readiness checks (model/channel/memory/automation) and prints a guided first-success task flow. Companion CLI now also supports bootstrap-manifest export (`flynn companion --export-bootstrap `), release-bundle export (`--export-release-bundle ` with optional `--signing-key`/`--signing-key-id` signature output), release-bundle verification (`--verify-release-bundle ` with optional `--verify-signing-key`/`--verify-signing-key-id`/`--require-signature`), platform shell-template export (`--export-shell-template `), plus richer shell bootstrap flags for status/location/push (`--app-version`, `--latitude/--longitude`, `--push-token`, etc.) for desktop/mobile app packaging without changing JSON-RPC method/event shapes. Audit observability now includes live phase-0 baseline capture flows: `pnpm audit:phase0-baseline:live` for channel-origin windows, backend-scoped variants (`pnpm audit:phase0-baseline:live:pi` / `pnpm audit:phase0-baseline:live:native`) via `--backend`, `pnpm audit:phase0-baseline:live:gateway` (auto-detected cancel window) for gateway-origin windows, `pnpm audit:phase0-baseline:live:refresh` for one-shot refresh of all live windows (channel + gateway + backend-scoped), `pnpm audit:phase0-baseline:live:drift` for backend artifact freshness/drift gates (writing `phase0_baseline_live_backend_drift_.md/.json` reports), `pnpm audit:phase0-baseline:live:refresh:drift:rolling` for cadence runs that stamp each capture with a unique UTC timestamp tag (`YYYY-MM-DD-HHMMSS`) so drift comparisons can immediately use a prior snapshot, `pnpm audit:phase0-baseline:live:prune` / `pnpm audit:phase0-baseline:live:prune:apply` for rolling-tag artifact retention management, and `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` for one-command cadence refresh+drift+retention apply (`KEEP_PER_FAMILY` override supported for retention depth). These scripts default to current UTC-date tags unless `--tag` is explicitly provided. +Operational note: onboarding (`flynn setup` / `flynn onboard`) now runs post-save live readiness checks (model/channel/memory/automation) and prints a guided first-success task flow. Companion CLI now also supports bootstrap-manifest export (`flynn companion --export-bootstrap `), release-bundle export (`--export-release-bundle ` with optional `--signing-key`/`--signing-key-id` signature output), release-bundle verification (`--verify-release-bundle ` with optional `--verify-signing-key`/`--verify-signing-key-id`/`--require-signature`), platform shell-template export (`--export-shell-template `), plus richer shell bootstrap flags for status/location/push (`--app-version`, `--latitude/--longitude`, `--push-token`, etc.) for desktop/mobile app packaging without changing JSON-RPC method/event shapes. Audit observability now includes live phase-0 baseline capture flows: `pnpm audit:phase0-baseline:live` for channel-origin windows, backend-scoped variants (`pnpm audit:phase0-baseline:live:pi` / `pnpm audit:phase0-baseline:live:native`) via `--backend`, `pnpm audit:phase0-baseline:live:gateway` (auto-detected cancel window) for gateway-origin windows, `pnpm audit:phase0-baseline:live:refresh` for one-shot refresh of all live windows (channel + gateway + backend-scoped), `pnpm audit:phase0-baseline:live:drift` for backend artifact freshness/drift gates (writing `phase0_baseline_live_backend_drift_.md/.json` reports), `pnpm audit:phase0-baseline:live:refresh:drift:rolling` for cadence runs that stamp each capture with a unique UTC timestamp tag (`YYYY-MM-DD-HHMMSS`) so drift comparisons can immediately use a prior snapshot, `pnpm audit:phase0-baseline:live:prune` / `pnpm audit:phase0-baseline:live:prune:apply` for rolling-tag artifact retention management (writing `phase0_baseline_live_prune_.md/.json` reports), and `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` for one-command cadence refresh+drift+retention apply (`KEEP_PER_FAMILY` override supported for retention depth). These scripts default to current UTC-date tags unless `--tag` is explicitly provided. ### Execution Model (Sessions + Per-Session Queue) diff --git a/docs/architecture/AGENT_DIAGRAM.md b/docs/architecture/AGENT_DIAGRAM.md index 41ec839..82d0981 100644 --- a/docs/architecture/AGENT_DIAGRAM.md +++ b/docs/architecture/AGENT_DIAGRAM.md @@ -173,7 +173,7 @@ Gateway streaming UX signals: - `pnpm audit:phase0-baseline:live:drift` evaluates backend-scoped artifact freshness/drift gates and writes `docs/plans/artifacts/phase0_baseline_live_backend_drift_.md/.json`; `pnpm audit:phase0-baseline:live:refresh:drift` runs capture + drift checks in one cadence step. - `pnpm audit:phase0-baseline:live:refresh:drift:rolling` runs the same full refresh+drift flow with a shared UTC timestamp tag (`YYYY-MM-DD-HHMMSS`) so each cadence run keeps distinct backend/drift artifacts for immediate baseline-vs-prior comparisons. - `pnpm audit:phase0-baseline:live:prune` provides dry-run retention planning for rolling-tag artifacts; `pnpm audit:phase0-baseline:live:prune:apply` deletes older rolling snapshots while keeping the newest tags per artifact family. -- `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` chains rolling refresh+drift with retention apply for one-command scheduled cadence runs (`KEEP_PER_FAMILY` controls retention depth). +- `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` chains rolling refresh+drift with retention apply for one-command scheduled cadence runs (`KEEP_PER_FAMILY` controls retention depth), and now writes prune reports tagged to the same rolling run (`phase0_baseline_live_prune_.md/.json`). - `audit:phase0-baseline:live*` scripts are cadence-safe by default (UTC-date tags auto-generated unless explicitly overridden). - Canvas artifacts are persisted by the gateway so session UI surfaces can recover after daemon restarts. - TTS synthesis uses an ordered provider chain with health cooldown tracking; if all providers fail, replies degrade to text-only without dropping the response. diff --git a/docs/architecture/GATEWAY_SESSIONS_AND_QUEUE.md b/docs/architecture/GATEWAY_SESSIONS_AND_QUEUE.md index 4268132..e823a7c 100644 --- a/docs/architecture/GATEWAY_SESSIONS_AND_QUEUE.md +++ b/docs/architecture/GATEWAY_SESSIONS_AND_QUEUE.md @@ -38,7 +38,7 @@ If you only want the protocol surface, see `docs/api/PROTOCOL.md`. - `pnpm audit:phase0-baseline:live:drift` checks backend-scoped artifact freshness/drift gates and writes `phase0_baseline_live_backend_drift_.md/.json`; `pnpm audit:phase0-baseline:live:refresh:drift` chains refresh + drift checks for scheduled cadence runs. - `pnpm audit:phase0-baseline:live:refresh:drift:rolling` performs the same chain using one UTC timestamp tag (`YYYY-MM-DD-HHMMSS`) across channel/gateway/backend/drift outputs so each cadence run preserves a distinct comparison point. - `pnpm audit:phase0-baseline:live:prune` (dry-run) and `pnpm audit:phase0-baseline:live:prune:apply` (delete) manage retention of rolling-tag artifacts to control artifact growth while preserving newest snapshots per family. -- `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` combines rolling refresh+drift with retention apply for one-command cron scheduling; adjust retention depth with `KEEP_PER_FAMILY`. +- `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` combines rolling refresh+drift with retention apply for one-command cron scheduling; adjust retention depth with `KEEP_PER_FAMILY` and use generated `phase0_baseline_live_prune_.md/.json` artifacts for retention audit traceability. - `audit:phase0-baseline:live*` package scripts now omit fixed tags so scheduled runs automatically roll to current UTC-date artifact tags. - Companion CLI supports one-shot shell bootstrap metadata for live sessions (`--app-version`/`--status-text`, `--latitude`/`--longitude`, `--push-token`) so desktop/mobile wrappers can initialize node status/location/push in a single launch flow. - Canvas artifacts are persisted per session under the gateway data directory for UI recovery across restarts. diff --git a/docs/plans/2026-02-25-phase0-instrumentation-ticket-checklist.md b/docs/plans/2026-02-25-phase0-instrumentation-ticket-checklist.md index 28379a3..8223980 100644 --- a/docs/plans/2026-02-25-phase0-instrumentation-ticket-checklist.md +++ b/docs/plans/2026-02-25-phase0-instrumentation-ticket-checklist.md @@ -203,7 +203,7 @@ Phase 0 is complete when: 2. A baseline summary artifact is generated and committed under `docs/plans/artifacts/`. 3. No user-visible response behavior changed compared to pre-phase baseline. -Follow-up status (2026-02-27): live channel-session artifacts exist under `docs/plans/artifacts/phase0_baseline_live_2026-02-27.*` via `pnpm audit:phase0-baseline:live` (anonymized IDs), and a second gateway-origin live window (including `run.cancel` + `cancel_requested`/`cancelled`) exists under `docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27.*`. Gateway window refreshes can now run via `pnpm audit:phase0-baseline:live:gateway` (auto-selected cancel window), all live windows can be refreshed together with `pnpm audit:phase0-baseline:live:refresh` (channel + gateway + backend-scoped `pi`/`native`; scheduling example included in README), backend artifact freshness/drift checks are now available via `pnpm audit:phase0-baseline:live:drift` (or chained with `pnpm audit:phase0-baseline:live:refresh:drift`) with drift report artifacts written to `docs/plans/artifacts/phase0_baseline_live_backend_drift_.{md,json}`, cadence runs can preserve distinct timestamped comparison points via `pnpm audit:phase0-baseline:live:refresh:drift:rolling`, rolling-tag retention can be managed via `pnpm audit:phase0-baseline:live:prune` (dry-run) / `pnpm audit:phase0-baseline:live:prune:apply`, and one-command cadence scheduling is available via `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` (`KEEP_PER_FAMILY` optional override). +Follow-up status (2026-02-27): live channel-session artifacts exist under `docs/plans/artifacts/phase0_baseline_live_2026-02-27.*` via `pnpm audit:phase0-baseline:live` (anonymized IDs), and a second gateway-origin live window (including `run.cancel` + `cancel_requested`/`cancelled`) exists under `docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27.*`. Gateway window refreshes can now run via `pnpm audit:phase0-baseline:live:gateway` (auto-selected cancel window), all live windows can be refreshed together with `pnpm audit:phase0-baseline:live:refresh` (channel + gateway + backend-scoped `pi`/`native`; scheduling example included in README), backend artifact freshness/drift checks are now available via `pnpm audit:phase0-baseline:live:drift` (or chained with `pnpm audit:phase0-baseline:live:refresh:drift`) with drift report artifacts written to `docs/plans/artifacts/phase0_baseline_live_backend_drift_.{md,json}`, cadence runs can preserve distinct timestamped comparison points via `pnpm audit:phase0-baseline:live:refresh:drift:rolling`, rolling-tag retention can be managed via `pnpm audit:phase0-baseline:live:prune` (dry-run) / `pnpm audit:phase0-baseline:live:prune:apply` with prune report artifacts written to `phase0_baseline_live_prune_.{md,json}`, and one-command cadence scheduling is available via `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` (`KEEP_PER_FAMILY` optional override). ## Subagent Model Assignment Plan diff --git a/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.json b/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.json new file mode 100644 index 0000000..323d2a2 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.json @@ -0,0 +1,371 @@ +{ + "generated_at": "2026-02-27T18:47:26.181Z", + "source_audit_path": "~/.local/share/flynn/audit.log", + "source_event_count": 115, + "sampled_event_count": 109, + "filters": { + "sources": [ + "channel" + ], + "exclude_session_substrings": [ + "probe" + ], + "anonymized_identifiers": true + }, + "options": { + "sources": [ + "channel" + ], + "maxSessions": 20, + "maxChannels": 20, + "maxSkipReasons": 10 + }, + "summary": { + "event_counts": { + "run_state": 68, + "run_cancel": 0, + "reaction_match": 0, + "reaction_skip": 41 + }, + "run_outcomes": { + "overall": { + "total_outcomes": 28, + "complete": 28, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 40, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + }, + "by_channel": [ + { + "key": "gmail", + "stats": { + "total_outcomes": 26, + "complete": 26, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 26, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "cron", + "stats": { + "total_outcomes": 2, + "complete": 2, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 14, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + } + ], + "by_session": [ + { + "key": "session_2f2f1e414e81", + "stats": { + "total_outcomes": 5, + "complete": 5, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 5, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_f4d8ddc04194", + "stats": { + "total_outcomes": 3, + "complete": 3, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 3, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_eabc3c2a91b9", + "stats": { + "total_outcomes": 2, + "complete": 2, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 2, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_f6304f25e43b", + "stats": { + "total_outcomes": 2, + "complete": 2, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 2, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_33469de5a1ee", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_3ffb2e631ab1", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_4d9e843358a3", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_58a64b6f2c91", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_5ae4ad331184", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_7d3c3ff67d4f", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_7db5014f64fe", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_8849a4464275", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_8b51db8cde21", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_9067cf5e3558", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_a4b91821c664", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_a83fde4c8fdb", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_cb9a69d8a362", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_e0a2a17b7329", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_ea839415979e", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_fd6536fa5ff4", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + } + ] + }, + "cancel_latency_ms": null, + "reactions": { + "matched": 0, + "skipped": 41, + "total": 41, + "match_rate_pct": 0, + "skip_rate_pct": 100, + "skip_reasons": [ + { + "reason": "no_rules", + "count": 41, + "pct": 100 + } + ] + } + } +} diff --git a/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.jsonl b/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.jsonl new file mode 100644 index 0000000..8efee97 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.jsonl @@ -0,0 +1,109 @@ +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2d8872945bf8","channel":"cron","sender":"sender_4787722f90c7","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772082000080} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2d8872945bf8","channel":"cron","sender":"sender_4787722f90c7","source":"channel","state":"start","request_id":"request_eabae852ec40"},"timestamp":1772082000082} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_ffcee254d546","channel":"cron","sender":"sender_75c445c6fdad","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772089200084} +{"level":"info","event_type":"run.state","event":{"session_id":"session_ffcee254d546","channel":"cron","sender":"sender_75c445c6fdad","source":"channel","state":"start","request_id":"request_f99421283d74"},"timestamp":1772089200086} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_49b700741e03","channel":"cron","sender":"sender_ecc7d1bae06e","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772096400007} +{"level":"info","event_type":"run.state","event":{"session_id":"session_49b700741e03","channel":"cron","sender":"sender_ecc7d1bae06e","source":"channel","state":"start","request_id":"request_33cb5e8b6843"},"timestamp":1772096400008} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772107655159} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_7da150aff098"},"timestamp":1772107655160} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_7da150aff098","duration_ms":3324},"timestamp":1772107658484} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_4cd8ba5e6df5","channel":"cron","sender":"sender_247a7c21dbdd","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772110800018} +{"level":"info","event_type":"run.state","event":{"session_id":"session_4cd8ba5e6df5","channel":"cron","sender":"sender_247a7c21dbdd","source":"channel","state":"start","request_id":"request_60b338f30d46"},"timestamp":1772110800019} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772114255688} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_55013bd2ec5f"},"timestamp":1772114255688} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_55013bd2ec5f","duration_ms":3006},"timestamp":1772114258694} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772119955933} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_a01be9a4284b"},"timestamp":1772119955933} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_a01be9a4284b","duration_ms":2379},"timestamp":1772119958312} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772120856043} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_49c2900b17a3"},"timestamp":1772120856043} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_49c2900b17a3","duration_ms":4223},"timestamp":1772120860266} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_a83fde4c8fdb","channel":"cron","sender":"sender_99a8e5949abe","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772121600016} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a83fde4c8fdb","channel":"cron","sender":"sender_99a8e5949abe","source":"channel","state":"start","request_id":"request_011dde9a88a3"},"timestamp":1772121600017} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a83fde4c8fdb","channel":"cron","sender":"sender_99a8e5949abe","source":"channel","state":"complete","request_id":"request_011dde9a88a3","duration_ms":41131},"timestamp":1772121641148} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_cb9a69d8a362","channel":"gmail","sender":"sender_48feae1a0ad8","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772122956201} +{"level":"info","event_type":"run.state","event":{"session_id":"session_cb9a69d8a362","channel":"gmail","sender":"sender_48feae1a0ad8","source":"channel","state":"start","request_id":"request_59fd88029c97"},"timestamp":1772122956201} +{"level":"info","event_type":"run.state","event":{"session_id":"session_cb9a69d8a362","channel":"gmail","sender":"sender_48feae1a0ad8","source":"channel","state":"complete","request_id":"request_59fd88029c97","duration_ms":2854},"timestamp":1772122959055} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_3c43a0cc0a62","channel":"cron","sender":"sender_a2f138926e17","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772125200025} +{"level":"info","event_type":"run.state","event":{"session_id":"session_3c43a0cc0a62","channel":"cron","sender":"sender_a2f138926e17","source":"channel","state":"start","request_id":"request_eabfc26524d0"},"timestamp":1772125200026} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_a4b91821c664","channel":"gmail","sender":"sender_9eff7c852e06","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772129742056} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a4b91821c664","channel":"gmail","sender":"sender_9eff7c852e06","source":"channel","state":"start","request_id":"request_7734a5dbc98e"},"timestamp":1772129742057} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772129742379} +{"level":"info","event_type":"run.state","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","state":"start","request_id":"request_81d00f26b8cb"},"timestamp":1772129742379} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a4b91821c664","channel":"gmail","sender":"sender_9eff7c852e06","source":"channel","state":"complete","request_id":"request_7734a5dbc98e","duration_ms":5944},"timestamp":1772129748001} +{"level":"info","event_type":"run.state","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","state":"complete","request_id":"request_81d00f26b8cb","duration_ms":8017},"timestamp":1772129750396} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_58a64b6f2c91","channel":"gmail","sender":"sender_4222a55cdd53","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772131242612} +{"level":"info","event_type":"run.state","event":{"session_id":"session_58a64b6f2c91","channel":"gmail","sender":"sender_4222a55cdd53","source":"channel","state":"start","request_id":"request_e59d82ef75e8"},"timestamp":1772131242612} +{"level":"info","event_type":"run.state","event":{"session_id":"session_58a64b6f2c91","channel":"gmail","sender":"sender_4222a55cdd53","source":"channel","state":"complete","request_id":"request_e59d82ef75e8","duration_ms":5232},"timestamp":1772131247844} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_e0a2a17b7329","channel":"gmail","sender":"sender_5c8cb7bfc88d","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772131542650} +{"level":"info","event_type":"run.state","event":{"session_id":"session_e0a2a17b7329","channel":"gmail","sender":"sender_5c8cb7bfc88d","source":"channel","state":"start","request_id":"request_ed877aec1e58"},"timestamp":1772131542651} +{"level":"info","event_type":"run.state","event":{"session_id":"session_e0a2a17b7329","channel":"gmail","sender":"sender_5c8cb7bfc88d","source":"channel","state":"complete","request_id":"request_ed877aec1e58","duration_ms":6190},"timestamp":1772131548841} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772132142832} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","state":"start","request_id":"request_8fdb3054a74d"},"timestamp":1772132142833} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772132142976} +{"level":"info","event_type":"run.state","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","state":"start","request_id":"request_487012d053f7"},"timestamp":1772132142976} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","state":"complete","request_id":"request_8fdb3054a74d","duration_ms":3727},"timestamp":1772132146560} +{"level":"info","event_type":"run.state","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","state":"complete","request_id":"request_487012d053f7","duration_ms":4848},"timestamp":1772132147824} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_ea839415979e","channel":"gmail","sender":"sender_63a36881e696","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772133342779} +{"level":"info","event_type":"run.state","event":{"session_id":"session_ea839415979e","channel":"gmail","sender":"sender_63a36881e696","source":"channel","state":"start","request_id":"request_46feddcf35ba"},"timestamp":1772133342779} +{"level":"info","event_type":"run.state","event":{"session_id":"session_ea839415979e","channel":"gmail","sender":"sender_63a36881e696","source":"channel","state":"complete","request_id":"request_46feddcf35ba","duration_ms":2091},"timestamp":1772133344870} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_4d9e843358a3","channel":"gmail","sender":"sender_597782907690","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772135679506} +{"level":"info","event_type":"run.state","event":{"session_id":"session_4d9e843358a3","channel":"gmail","sender":"sender_597782907690","source":"channel","state":"start","request_id":"request_a43658b8d10f"},"timestamp":1772135679510} +{"level":"info","event_type":"run.state","event":{"session_id":"session_4d9e843358a3","channel":"gmail","sender":"sender_597782907690","source":"channel","state":"complete","request_id":"request_a43658b8d10f","duration_ms":7829},"timestamp":1772135687339} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_84ba9e30a4aa","channel":"telegram","sender":"sender_403740748465","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772135865178} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_7d3c3ff67d4f","channel":"gmail","sender":"sender_1625f89b7500","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772136364511} +{"level":"info","event_type":"run.state","event":{"session_id":"session_7d3c3ff67d4f","channel":"gmail","sender":"sender_1625f89b7500","source":"channel","state":"start","request_id":"request_882bdf0a0b51"},"timestamp":1772136364512} +{"level":"info","event_type":"run.state","event":{"session_id":"session_7d3c3ff67d4f","channel":"gmail","sender":"sender_1625f89b7500","source":"channel","state":"complete","request_id":"request_882bdf0a0b51","duration_ms":5046},"timestamp":1772136369558} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_494cb3b392af","channel":"cron","sender":"sender_dfc2df9eb18e","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772139600015} +{"level":"info","event_type":"run.state","event":{"session_id":"session_494cb3b392af","channel":"cron","sender":"sender_dfc2df9eb18e","source":"channel","state":"start","request_id":"request_ea48f4337dc3"},"timestamp":1772139600017} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772142493741} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"start","request_id":"request_b67bb7dcfb3e"},"timestamp":1772142493741} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"complete","request_id":"request_b67bb7dcfb3e","duration_ms":6271},"timestamp":1772142500012} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_8849a4464275","channel":"gmail","sender":"sender_5aa2798b691a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772143093516} +{"level":"info","event_type":"run.state","event":{"session_id":"session_8849a4464275","channel":"gmail","sender":"sender_5aa2798b691a","source":"channel","state":"start","request_id":"request_f0b319de0e0f"},"timestamp":1772143093516} +{"level":"info","event_type":"run.state","event":{"session_id":"session_8849a4464275","channel":"gmail","sender":"sender_5aa2798b691a","source":"channel","state":"complete","request_id":"request_f0b319de0e0f","duration_ms":3148},"timestamp":1772143096664} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_9067cf5e3558","channel":"gmail","sender":"sender_5375920e43c6","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772144293783} +{"level":"info","event_type":"run.state","event":{"session_id":"session_9067cf5e3558","channel":"gmail","sender":"sender_5375920e43c6","source":"channel","state":"start","request_id":"request_802086e4ecb7"},"timestamp":1772144293784} +{"level":"info","event_type":"run.state","event":{"session_id":"session_9067cf5e3558","channel":"gmail","sender":"sender_5375920e43c6","source":"channel","state":"complete","request_id":"request_802086e4ecb7","duration_ms":3535},"timestamp":1772144297319} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_33469de5a1ee","channel":"gmail","sender":"sender_23f2c718f92a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772147893922} +{"level":"info","event_type":"run.state","event":{"session_id":"session_33469de5a1ee","channel":"gmail","sender":"sender_23f2c718f92a","source":"channel","state":"start","request_id":"request_e1ee7948be6e"},"timestamp":1772147893923} +{"level":"info","event_type":"run.state","event":{"session_id":"session_33469de5a1ee","channel":"gmail","sender":"sender_23f2c718f92a","source":"channel","state":"complete","request_id":"request_e1ee7948be6e","duration_ms":4090},"timestamp":1772147898013} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772151794148} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"start","request_id":"request_dc04b15aeb0d"},"timestamp":1772151794148} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772151794297} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"start","request_id":"request_f786a5385b23"},"timestamp":1772151794297} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"complete","request_id":"request_dc04b15aeb0d","duration_ms":8516},"timestamp":1772151802664} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"complete","request_id":"request_f786a5385b23","duration_ms":9850},"timestamp":1772151804147} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2b07a8d38406","channel":"cron","sender":"sender_2a0d0e4fce24","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772154000024} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2b07a8d38406","channel":"cron","sender":"sender_2a0d0e4fce24","source":"channel","state":"start","request_id":"request_136e87e1b4ce"},"timestamp":1772154000024} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_fd6536fa5ff4","channel":"gmail","sender":"sender_fcf96878ddcb","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772158394778} +{"level":"info","event_type":"run.state","event":{"session_id":"session_fd6536fa5ff4","channel":"gmail","sender":"sender_fcf96878ddcb","source":"channel","state":"start","request_id":"request_ff70daf25a96"},"timestamp":1772158394779} +{"level":"info","event_type":"run.state","event":{"session_id":"session_fd6536fa5ff4","channel":"gmail","sender":"sender_fcf96878ddcb","source":"channel","state":"complete","request_id":"request_ff70daf25a96","duration_ms":5690},"timestamp":1772158400469} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_8b51db8cde21","channel":"gmail","sender":"sender_c9788a77f027","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772163195186} +{"level":"info","event_type":"run.state","event":{"session_id":"session_8b51db8cde21","channel":"gmail","sender":"sender_c9788a77f027","source":"channel","state":"start","request_id":"request_9054b78eda1d"},"timestamp":1772163195187} +{"level":"info","event_type":"run.state","event":{"session_id":"session_8b51db8cde21","channel":"gmail","sender":"sender_c9788a77f027","source":"channel","state":"complete","request_id":"request_9054b78eda1d","duration_ms":2356},"timestamp":1772163197543} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_683372f346c3","channel":"cron","sender":"sender_485b96f48f25","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772168400037} +{"level":"info","event_type":"run.state","event":{"session_id":"session_683372f346c3","channel":"cron","sender":"sender_485b96f48f25","source":"channel","state":"start","request_id":"request_caa9ec775af8"},"timestamp":1772168400038} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_31b6400467ce","channel":"cron","sender":"sender_8255de70c756","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772175600039} +{"level":"info","event_type":"run.state","event":{"session_id":"session_31b6400467ce","channel":"cron","sender":"sender_8255de70c756","source":"channel","state":"start","request_id":"request_40d7589e715b"},"timestamp":1772175600040} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_a3f64a8e3c1e","channel":"cron","sender":"sender_a31bd6d4a95a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772182800033} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a3f64a8e3c1e","channel":"cron","sender":"sender_a31bd6d4a95a","source":"channel","state":"start","request_id":"request_fc572d83d4c6"},"timestamp":1772182800034} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_7db5014f64fe","channel":"gmail","sender":"sender_81e925eaae0e","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772197156530} +{"level":"info","event_type":"run.state","event":{"session_id":"session_7db5014f64fe","channel":"gmail","sender":"sender_81e925eaae0e","source":"channel","state":"start","request_id":"request_7f5d82d1085a"},"timestamp":1772197156530} +{"level":"info","event_type":"run.state","event":{"session_id":"session_7db5014f64fe","channel":"gmail","sender":"sender_81e925eaae0e","source":"channel","state":"complete","request_id":"request_7f5d82d1085a","duration_ms":5231},"timestamp":1772197161761} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_d576f98a5348","channel":"cron","sender":"sender_86045f8e1835","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772197200013} +{"level":"info","event_type":"run.state","event":{"session_id":"session_d576f98a5348","channel":"cron","sender":"sender_86045f8e1835","source":"channel","state":"start","request_id":"request_ce8df697a3cf"},"timestamp":1772197200014} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_3ffb2e631ab1","channel":"gmail","sender":"sender_745442e44534","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772199256802} +{"level":"info","event_type":"run.state","event":{"session_id":"session_3ffb2e631ab1","channel":"gmail","sender":"sender_745442e44534","source":"channel","state":"start","request_id":"request_3d4d23510682"},"timestamp":1772199256803} +{"level":"info","event_type":"run.state","event":{"session_id":"session_3ffb2e631ab1","channel":"gmail","sender":"sender_745442e44534","source":"channel","state":"complete","request_id":"request_3d4d23510682","duration_ms":3836},"timestamp":1772199260639} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772206157229} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_ab73d670c119"},"timestamp":1772206157229} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_ab73d670c119","duration_ms":3850},"timestamp":1772206161079} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_5ae4ad331184","channel":"cron","sender":"sender_a912a223d950","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772208000012} +{"level":"info","event_type":"run.state","event":{"session_id":"session_5ae4ad331184","channel":"cron","sender":"sender_a912a223d950","source":"channel","state":"start","request_id":"request_a3bafbb93755"},"timestamp":1772208000013} +{"level":"info","event_type":"run.state","event":{"session_id":"session_5ae4ad331184","channel":"cron","sender":"sender_a912a223d950","source":"channel","state":"complete","request_id":"request_a3bafbb93755","duration_ms":35239},"timestamp":1772208035252} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772211257454} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","state":"start","request_id":"request_607c64c2760f"},"timestamp":1772211257454} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","state":"complete","request_id":"request_607c64c2760f","duration_ms":3870},"timestamp":1772211261324} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_534570702ea5","channel":"cron","sender":"sender_552aeb8f1b32","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772211600036} +{"level":"info","event_type":"run.state","event":{"session_id":"session_534570702ea5","channel":"cron","sender":"sender_552aeb8f1b32","source":"channel","state":"start","request_id":"request_c0a9fc76c188"},"timestamp":1772211600036} diff --git a/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.md b/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.md new file mode 100644 index 0000000..12c5be4 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.md @@ -0,0 +1,65 @@ +# Phase 0 Baseline Telemetry Summary + +- Run state events: 68 +- Run cancel events: 0 +- Reaction matches: 0 +- Reaction skips: 41 + +- Sources: channel + +## Run Outcomes (Overall) + +- Total outcomes: 28 +- Complete: 28 (100.00%) +- Cancelled: 0 (0.00%) +- Errors: 0 (0.00%) +- Cancel requested: 0 +- Starts: 40 + +## Run Outcomes by Channel + +| Channel | Outcomes | Complete | Cancelled | Error | Complete % | Cancel % | Error % | Cancel Req | Starts | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| gmail | 26 | 26 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 26 | +| cron | 2 | 2 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 14 | + +## Run Outcomes by Session + +| Session | Outcomes | Complete | Cancelled | Error | Complete % | Cancel % | Error % | Cancel Req | Starts | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| session_2f2f1e414e81 | 5 | 5 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 5 | +| session_f4d8ddc04194 | 3 | 3 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 3 | +| session_eabc3c2a91b9 | 2 | 2 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 2 | +| session_f6304f25e43b | 2 | 2 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 2 | +| session_33469de5a1ee | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_3ffb2e631ab1 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_4d9e843358a3 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_58a64b6f2c91 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_5ae4ad331184 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_7d3c3ff67d4f | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_7db5014f64fe | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_8849a4464275 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_8b51db8cde21 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_9067cf5e3558 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_a4b91821c664 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_a83fde4c8fdb | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_cb9a69d8a362 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_e0a2a17b7329 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_ea839415979e | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_fd6536fa5ff4 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | + +## Cancel Latency + +- No cancel latency samples. + +## Reaction Decisions + +- Matched: 0 (0.00%) +- Skipped: 41 (100.00%) + +### Skip Reasons + +| Reason | Count | Percent | +| --- | ---: | ---: | +| no_rules | 41 | 100.00% | + diff --git a/docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.json b/docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.json new file mode 100644 index 0000000..3a08b8b --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.json @@ -0,0 +1,230 @@ +{ + "generated_at": "2026-02-27T18:47:26.592Z", + "artifacts_dir": "/home/will/lab/flynn/docs/plans/artifacts", + "backends": [ + "pi_embedded", + "native" + ], + "candidate_tag": "2026-02-27-184726", + "report_tag": "2026-02-27-184726", + "max_age_hours": 36, + "thresholds": { + "requireBaselineHistory": false, + "minCandidateSampledEvents": 10, + "maxSampledEventsDropPct": 80, + "maxRunOutcomesDropPct": 80, + "maxCompletionRateDropPp": 35, + "maxCancelRateIncreasePp": 25, + "maxErrorRateIncreasePp": 25, + "maxCancelLatencyP95IncreaseMs": 6000 + }, + "overall_pass": true, + "reports": { + "summary_json_out": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.json", + "summary_md_out": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.md" + }, + "results": [ + { + "backend": "pi_embedded", + "pass": true, + "candidate": { + "tag": "2026-02-27-184726", + "path": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json", + "generated_at": "2026-02-27T18:47:26.396Z" + }, + "baseline": { + "tag": "2026-02-27-184011", + "path": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.json", + "generated_at": "2026-02-27T18:40:11.816Z" + }, + "comparison": { + "baseline": { + "source_event_count": 115, + "sampled_event_count": 59, + "run_total_outcomes": 26, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0, + "cancel_latency_p95_ms": null, + "reaction_match_rate_pct": 0, + "reaction_skip_rate_pct": 100 + }, + "candidate": { + "source_event_count": 115, + "sampled_event_count": 59, + "run_total_outcomes": 26, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0, + "cancel_latency_p95_ms": null, + "reaction_match_rate_pct": 0, + "reaction_skip_rate_pct": 100 + }, + "deltas": { + "sampled_event_count_pct": 0, + "run_total_outcomes_pct": 0, + "completion_rate_pp": 0, + "cancel_rate_pp": 0, + "error_rate_pp": 0, + "cancel_latency_p95_ms": null, + "reaction_match_rate_pp": 0, + "reaction_skip_rate_pp": 0 + } + }, + "freshness": { + "enabled": true, + "pass": true, + "actual_age_hours": 0, + "threshold_hours": 36 + }, + "drift_gate": { + "pass": true, + "criteria": [ + { + "criterion": "candidate_sampled_events", + "pass": true, + "actual": "59", + "threshold": ">= 10" + }, + { + "criterion": "sampled_events_drop_pct", + "pass": true, + "actual": "0", + "threshold": "<= 80" + }, + { + "criterion": "run_outcomes_drop_pct", + "pass": true, + "actual": "0", + "threshold": "<= 80" + }, + { + "criterion": "completion_rate_drop_pp", + "pass": true, + "actual": "0", + "threshold": "<= 35" + }, + { + "criterion": "cancel_rate_increase_pp", + "pass": true, + "actual": "0", + "threshold": "<= 25" + }, + { + "criterion": "error_rate_increase_pp", + "pass": true, + "actual": "0", + "threshold": "<= 25" + }, + { + "criterion": "cancel_latency_p95_increase_ms", + "pass": true, + "actual": "n/a", + "threshold": "<= 6000" + } + ] + } + }, + { + "backend": "native", + "pass": true, + "candidate": { + "tag": "2026-02-27-184726", + "path": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.json", + "generated_at": "2026-02-27T18:47:26.506Z" + }, + "baseline": { + "tag": "2026-02-27-184011", + "path": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184011.json", + "generated_at": "2026-02-27T18:40:11.931Z" + }, + "comparison": { + "baseline": { + "source_event_count": 115, + "sampled_event_count": 15, + "run_total_outcomes": 2, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0, + "cancel_latency_p95_ms": null, + "reaction_match_rate_pct": 0, + "reaction_skip_rate_pct": 100 + }, + "candidate": { + "source_event_count": 115, + "sampled_event_count": 15, + "run_total_outcomes": 2, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0, + "cancel_latency_p95_ms": null, + "reaction_match_rate_pct": 0, + "reaction_skip_rate_pct": 100 + }, + "deltas": { + "sampled_event_count_pct": 0, + "run_total_outcomes_pct": 0, + "completion_rate_pp": 0, + "cancel_rate_pp": 0, + "error_rate_pp": 0, + "cancel_latency_p95_ms": null, + "reaction_match_rate_pp": 0, + "reaction_skip_rate_pp": 0 + } + }, + "freshness": { + "enabled": true, + "pass": true, + "actual_age_hours": 0, + "threshold_hours": 36 + }, + "drift_gate": { + "pass": true, + "criteria": [ + { + "criterion": "candidate_sampled_events", + "pass": true, + "actual": "15", + "threshold": ">= 10" + }, + { + "criterion": "sampled_events_drop_pct", + "pass": true, + "actual": "0", + "threshold": "<= 80" + }, + { + "criterion": "run_outcomes_drop_pct", + "pass": true, + "actual": "0", + "threshold": "<= 80" + }, + { + "criterion": "completion_rate_drop_pp", + "pass": true, + "actual": "0", + "threshold": "<= 35" + }, + { + "criterion": "cancel_rate_increase_pp", + "pass": true, + "actual": "0", + "threshold": "<= 25" + }, + { + "criterion": "error_rate_increase_pp", + "pass": true, + "actual": "0", + "threshold": "<= 25" + }, + { + "criterion": "cancel_latency_p95_increase_ms", + "pass": true, + "actual": "n/a", + "threshold": "<= 6000" + } + ] + } + } + ] +} diff --git a/docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.md b/docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.md new file mode 100644 index 0000000..3478aca --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.md @@ -0,0 +1,72 @@ +# Phase-0 Backend Drift Check + +Generated at: 2026-02-27T18:47:26.592Z +Artifacts: /home/will/lab/flynn/docs/plans/artifacts +Backends: pi_embedded, native +Freshness max age (hours): 36 +Overall gate: PASS + +## Thresholds +- requireBaselineHistory: false +- minCandidateSampledEvents: 10 +- maxSampledEventsDropPct: 80 +- maxRunOutcomesDropPct: 80 +- maxCompletionRateDropPp: 35 +- maxCancelRateIncreasePp: 25 +- maxErrorRateIncreasePp: 25 +- maxCancelLatencyP95IncreaseMs: 6000 + +## pi_embedded +- status: PASS +- candidate: tag=2026-02-27-184726 file=/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json +- candidate generated_at: 2026-02-27T18:47:26.396Z +- baseline: tag=2026-02-27-184011 file=/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.json +- baseline generated_at: 2026-02-27T18:40:11.816Z +- candidate snapshot: sampled=59 outcomes=26 completion=100% cancel=0% error=0% cancel_p95_ms=n/a +- baseline snapshot: sampled=59 outcomes=26 completion=100% cancel=0% error=0% cancel_p95_ms=n/a +- deltas: + sampled_event_count_pct=0% + run_total_outcomes_pct=0% + completion_rate_pp=0 + cancel_rate_pp=0 + error_rate_pp=0 + cancel_latency_p95_ms=n/a + reaction_match_rate_pp=0 + reaction_skip_rate_pp=0 +- freshness gate: PASS (age_hours=0 threshold=36) +- drift gate: PASS + PASS candidate_sampled_events actual=59 threshold=>= 10 + PASS sampled_events_drop_pct actual=0 threshold=<= 80 + PASS run_outcomes_drop_pct actual=0 threshold=<= 80 + PASS completion_rate_drop_pp actual=0 threshold=<= 35 + PASS cancel_rate_increase_pp actual=0 threshold=<= 25 + PASS error_rate_increase_pp actual=0 threshold=<= 25 + PASS cancel_latency_p95_increase_ms actual=n/a threshold=<= 6000 + +## native +- status: PASS +- candidate: tag=2026-02-27-184726 file=/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.json +- candidate generated_at: 2026-02-27T18:47:26.506Z +- baseline: tag=2026-02-27-184011 file=/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184011.json +- baseline generated_at: 2026-02-27T18:40:11.931Z +- candidate snapshot: sampled=15 outcomes=2 completion=100% cancel=0% error=0% cancel_p95_ms=n/a +- baseline snapshot: sampled=15 outcomes=2 completion=100% cancel=0% error=0% cancel_p95_ms=n/a +- deltas: + sampled_event_count_pct=0% + run_total_outcomes_pct=0% + completion_rate_pp=0 + cancel_rate_pp=0 + error_rate_pp=0 + cancel_latency_p95_ms=n/a + reaction_match_rate_pp=0 + reaction_skip_rate_pp=0 +- freshness gate: PASS (age_hours=0 threshold=36) +- drift gate: PASS + PASS candidate_sampled_events actual=15 threshold=>= 10 + PASS sampled_events_drop_pct actual=0 threshold=<= 80 + PASS run_outcomes_drop_pct actual=0 threshold=<= 80 + PASS completion_rate_drop_pp actual=0 threshold=<= 35 + PASS cancel_rate_increase_pp actual=0 threshold=<= 25 + PASS error_rate_increase_pp actual=0 threshold=<= 25 + PASS cancel_latency_p95_increase_ms actual=n/a threshold=<= 6000 + diff --git a/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.json b/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.json new file mode 100644 index 0000000..2144d93 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.json @@ -0,0 +1,249 @@ +{ + "generated_at": "2026-02-27T18:47:26.506Z", + "source_audit_path": "~/.local/share/flynn/audit.log", + "source_event_count": 115, + "sampled_event_count": 15, + "filters": { + "sources": [ + "channel" + ], + "backend_targets": [ + "native" + ], + "exclude_session_substrings": [ + "probe" + ], + "anonymized_identifiers": true, + "backend_route_event_count": 129 + }, + "options": { + "sources": [ + "channel" + ], + "maxSessions": 20, + "maxChannels": 20, + "maxSkipReasons": 10 + }, + "summary": { + "event_counts": { + "run_state": 14, + "run_cancel": 0, + "reaction_match": 0, + "reaction_skip": 1 + }, + "run_outcomes": { + "overall": { + "total_outcomes": 2, + "complete": 2, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 12, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + }, + "by_channel": [ + { + "key": "cron", + "stats": { + "total_outcomes": 2, + "complete": 2, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 12, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + } + ], + "by_session": [ + { + "key": "session_5ae4ad331184", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_a83fde4c8fdb", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_2d8872945bf8", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_31b6400467ce", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_3c43a0cc0a62", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_494cb3b392af", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_49b700741e03", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_4cd8ba5e6df5", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_534570702ea5", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_683372f346c3", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_a3f64a8e3c1e", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + }, + { + "key": "session_ffcee254d546", + "stats": { + "total_outcomes": 0, + "complete": 0, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": null, + "cancel_rate_pct": null, + "error_rate_pct": null + } + } + ] + }, + "cancel_latency_ms": null, + "reactions": { + "matched": 0, + "skipped": 1, + "total": 1, + "match_rate_pct": 0, + "skip_rate_pct": 100, + "skip_reasons": [ + { + "reason": "no_rules", + "count": 1, + "pct": 100 + } + ] + } + } +} diff --git a/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.jsonl b/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.jsonl new file mode 100644 index 0000000..92f3074 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.jsonl @@ -0,0 +1,15 @@ +{"level":"info","event_type":"run.state","event":{"session_id":"session_2d8872945bf8","channel":"cron","sender":"sender_4787722f90c7","source":"channel","state":"start","request_id":"request_eabae852ec40"},"timestamp":1772082000082} +{"level":"info","event_type":"run.state","event":{"session_id":"session_ffcee254d546","channel":"cron","sender":"sender_75c445c6fdad","source":"channel","state":"start","request_id":"request_f99421283d74"},"timestamp":1772089200086} +{"level":"info","event_type":"run.state","event":{"session_id":"session_49b700741e03","channel":"cron","sender":"sender_ecc7d1bae06e","source":"channel","state":"start","request_id":"request_33cb5e8b6843"},"timestamp":1772096400008} +{"level":"info","event_type":"run.state","event":{"session_id":"session_4cd8ba5e6df5","channel":"cron","sender":"sender_247a7c21dbdd","source":"channel","state":"start","request_id":"request_60b338f30d46"},"timestamp":1772110800019} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a83fde4c8fdb","channel":"cron","sender":"sender_99a8e5949abe","source":"channel","state":"start","request_id":"request_011dde9a88a3"},"timestamp":1772121600017} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a83fde4c8fdb","channel":"cron","sender":"sender_99a8e5949abe","source":"channel","state":"complete","request_id":"request_011dde9a88a3","duration_ms":41131},"timestamp":1772121641148} +{"level":"info","event_type":"run.state","event":{"session_id":"session_3c43a0cc0a62","channel":"cron","sender":"sender_a2f138926e17","source":"channel","state":"start","request_id":"request_eabfc26524d0"},"timestamp":1772125200026} +{"level":"info","event_type":"run.state","event":{"session_id":"session_494cb3b392af","channel":"cron","sender":"sender_dfc2df9eb18e","source":"channel","state":"start","request_id":"request_ea48f4337dc3"},"timestamp":1772139600017} +{"level":"info","event_type":"run.state","event":{"session_id":"session_683372f346c3","channel":"cron","sender":"sender_485b96f48f25","source":"channel","state":"start","request_id":"request_caa9ec775af8"},"timestamp":1772168400038} +{"level":"info","event_type":"run.state","event":{"session_id":"session_31b6400467ce","channel":"cron","sender":"sender_8255de70c756","source":"channel","state":"start","request_id":"request_40d7589e715b"},"timestamp":1772175600040} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a3f64a8e3c1e","channel":"cron","sender":"sender_a31bd6d4a95a","source":"channel","state":"start","request_id":"request_fc572d83d4c6"},"timestamp":1772182800034} +{"level":"info","event_type":"run.state","event":{"session_id":"session_5ae4ad331184","channel":"cron","sender":"sender_a912a223d950","source":"channel","state":"start","request_id":"request_a3bafbb93755"},"timestamp":1772208000013} +{"level":"info","event_type":"run.state","event":{"session_id":"session_5ae4ad331184","channel":"cron","sender":"sender_a912a223d950","source":"channel","state":"complete","request_id":"request_a3bafbb93755","duration_ms":35239},"timestamp":1772208035252} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_534570702ea5","channel":"cron","sender":"sender_552aeb8f1b32","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772211600036} +{"level":"info","event_type":"run.state","event":{"session_id":"session_534570702ea5","channel":"cron","sender":"sender_552aeb8f1b32","source":"channel","state":"start","request_id":"request_c0a9fc76c188"},"timestamp":1772211600036} diff --git a/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.md b/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.md new file mode 100644 index 0000000..e28304f --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.md @@ -0,0 +1,56 @@ +# Phase 0 Baseline Telemetry Summary + +- Run state events: 14 +- Run cancel events: 0 +- Reaction matches: 0 +- Reaction skips: 1 + +- Sources: channel + +## Run Outcomes (Overall) + +- Total outcomes: 2 +- Complete: 2 (100.00%) +- Cancelled: 0 (0.00%) +- Errors: 0 (0.00%) +- Cancel requested: 0 +- Starts: 12 + +## Run Outcomes by Channel + +| Channel | Outcomes | Complete | Cancelled | Error | Complete % | Cancel % | Error % | Cancel Req | Starts | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| cron | 2 | 2 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 12 | + +## Run Outcomes by Session + +| Session | Outcomes | Complete | Cancelled | Error | Complete % | Cancel % | Error % | Cancel Req | Starts | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| session_5ae4ad331184 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_a83fde4c8fdb | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_2d8872945bf8 | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_31b6400467ce | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_3c43a0cc0a62 | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_494cb3b392af | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_49b700741e03 | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_4cd8ba5e6df5 | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_534570702ea5 | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_683372f346c3 | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_a3f64a8e3c1e | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | +| session_ffcee254d546 | 0 | 0 | 0 | 0 | n/a | n/a | n/a | 0 | 1 | + +## Cancel Latency + +- No cancel latency samples. + +## Reaction Decisions + +- Matched: 0 (0.00%) +- Skipped: 1 (100.00%) + +### Skip Reasons + +| Reason | Count | Percent | +| --- | ---: | ---: | +| no_rules | 1 | 100.00% | + diff --git a/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json b/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json new file mode 100644 index 0000000..4548dd2 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json @@ -0,0 +1,333 @@ +{ + "generated_at": "2026-02-27T18:47:26.396Z", + "source_audit_path": "~/.local/share/flynn/audit.log", + "source_event_count": 115, + "sampled_event_count": 59, + "filters": { + "sources": [ + "channel" + ], + "backend_targets": [ + "pi_embedded" + ], + "exclude_session_substrings": [ + "probe" + ], + "anonymized_identifiers": true, + "backend_route_event_count": 129 + }, + "options": { + "sources": [ + "channel" + ], + "maxSessions": 20, + "maxChannels": 20, + "maxSkipReasons": 10 + }, + "summary": { + "event_counts": { + "run_state": 44, + "run_cancel": 0, + "reaction_match": 0, + "reaction_skip": 15 + }, + "run_outcomes": { + "overall": { + "total_outcomes": 26, + "complete": 26, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 18, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + }, + "by_channel": [ + { + "key": "gmail", + "stats": { + "total_outcomes": 26, + "complete": 26, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 18, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + } + ], + "by_session": [ + { + "key": "session_2f2f1e414e81", + "stats": { + "total_outcomes": 5, + "complete": 5, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 5, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_f4d8ddc04194", + "stats": { + "total_outcomes": 3, + "complete": 3, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 3, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_eabc3c2a91b9", + "stats": { + "total_outcomes": 2, + "complete": 2, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_f6304f25e43b", + "stats": { + "total_outcomes": 2, + "complete": 2, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 2, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_33469de5a1ee", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_3ffb2e631ab1", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 0, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_4d9e843358a3", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 0, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_58a64b6f2c91", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 0, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_7d3c3ff67d4f", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 0, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_7db5014f64fe", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 0, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_8849a4464275", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 0, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_8b51db8cde21", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_9067cf5e3558", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_a4b91821c664", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 0, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_cb9a69d8a362", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_e0a2a17b7329", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_ea839415979e", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + }, + { + "key": "session_fd6536fa5ff4", + "stats": { + "total_outcomes": 1, + "complete": 1, + "cancelled": 0, + "error": 0, + "cancel_requested": 0, + "start": 1, + "completion_rate_pct": 100, + "cancel_rate_pct": 0, + "error_rate_pct": 0 + } + } + ] + }, + "cancel_latency_ms": null, + "reactions": { + "matched": 0, + "skipped": 15, + "total": 15, + "match_rate_pct": 0, + "skip_rate_pct": 100, + "skip_reasons": [ + { + "reason": "no_rules", + "count": 15, + "pct": 100 + } + ] + } + } +} diff --git a/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.jsonl b/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.jsonl new file mode 100644 index 0000000..8dc6320 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.jsonl @@ -0,0 +1,59 @@ +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772107655159} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_7da150aff098"},"timestamp":1772107655160} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_7da150aff098","duration_ms":3324},"timestamp":1772107658484} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772114255688} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_55013bd2ec5f"},"timestamp":1772114255688} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_55013bd2ec5f","duration_ms":3006},"timestamp":1772114258694} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772119955933} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_a01be9a4284b"},"timestamp":1772119955933} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_a01be9a4284b","duration_ms":2379},"timestamp":1772119958312} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772120856043} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_49c2900b17a3"},"timestamp":1772120856043} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_49c2900b17a3","duration_ms":4223},"timestamp":1772120860266} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_cb9a69d8a362","channel":"gmail","sender":"sender_48feae1a0ad8","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772122956201} +{"level":"info","event_type":"run.state","event":{"session_id":"session_cb9a69d8a362","channel":"gmail","sender":"sender_48feae1a0ad8","source":"channel","state":"start","request_id":"request_59fd88029c97"},"timestamp":1772122956201} +{"level":"info","event_type":"run.state","event":{"session_id":"session_cb9a69d8a362","channel":"gmail","sender":"sender_48feae1a0ad8","source":"channel","state":"complete","request_id":"request_59fd88029c97","duration_ms":2854},"timestamp":1772122959055} +{"level":"info","event_type":"run.state","event":{"session_id":"session_a4b91821c664","channel":"gmail","sender":"sender_9eff7c852e06","source":"channel","state":"complete","request_id":"request_7734a5dbc98e","duration_ms":5944},"timestamp":1772129748001} +{"level":"info","event_type":"run.state","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","state":"complete","request_id":"request_81d00f26b8cb","duration_ms":8017},"timestamp":1772129750396} +{"level":"info","event_type":"run.state","event":{"session_id":"session_58a64b6f2c91","channel":"gmail","sender":"sender_4222a55cdd53","source":"channel","state":"complete","request_id":"request_e59d82ef75e8","duration_ms":5232},"timestamp":1772131247844} +{"level":"info","event_type":"run.state","event":{"session_id":"session_e0a2a17b7329","channel":"gmail","sender":"sender_5c8cb7bfc88d","source":"channel","state":"start","request_id":"request_ed877aec1e58"},"timestamp":1772131542651} +{"level":"info","event_type":"run.state","event":{"session_id":"session_e0a2a17b7329","channel":"gmail","sender":"sender_5c8cb7bfc88d","source":"channel","state":"complete","request_id":"request_ed877aec1e58","duration_ms":6190},"timestamp":1772131548841} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772132142832} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","state":"start","request_id":"request_8fdb3054a74d"},"timestamp":1772132142833} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772132142976} +{"level":"info","event_type":"run.state","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","state":"start","request_id":"request_487012d053f7"},"timestamp":1772132142976} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","state":"complete","request_id":"request_8fdb3054a74d","duration_ms":3727},"timestamp":1772132146560} +{"level":"info","event_type":"run.state","event":{"session_id":"session_eabc3c2a91b9","channel":"gmail","sender":"sender_4fe02519d59e","source":"channel","state":"complete","request_id":"request_487012d053f7","duration_ms":4848},"timestamp":1772132147824} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_ea839415979e","channel":"gmail","sender":"sender_63a36881e696","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772133342779} +{"level":"info","event_type":"run.state","event":{"session_id":"session_ea839415979e","channel":"gmail","sender":"sender_63a36881e696","source":"channel","state":"start","request_id":"request_46feddcf35ba"},"timestamp":1772133342779} +{"level":"info","event_type":"run.state","event":{"session_id":"session_ea839415979e","channel":"gmail","sender":"sender_63a36881e696","source":"channel","state":"complete","request_id":"request_46feddcf35ba","duration_ms":2091},"timestamp":1772133344870} +{"level":"info","event_type":"run.state","event":{"session_id":"session_4d9e843358a3","channel":"gmail","sender":"sender_597782907690","source":"channel","state":"complete","request_id":"request_a43658b8d10f","duration_ms":7829},"timestamp":1772135687339} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_84ba9e30a4aa","channel":"telegram","sender":"sender_403740748465","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772135865178} +{"level":"info","event_type":"run.state","event":{"session_id":"session_7d3c3ff67d4f","channel":"gmail","sender":"sender_1625f89b7500","source":"channel","state":"complete","request_id":"request_882bdf0a0b51","duration_ms":5046},"timestamp":1772136369558} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772142493741} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"start","request_id":"request_b67bb7dcfb3e"},"timestamp":1772142493741} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"complete","request_id":"request_b67bb7dcfb3e","duration_ms":6271},"timestamp":1772142500012} +{"level":"info","event_type":"run.state","event":{"session_id":"session_8849a4464275","channel":"gmail","sender":"sender_5aa2798b691a","source":"channel","state":"complete","request_id":"request_f0b319de0e0f","duration_ms":3148},"timestamp":1772143096664} +{"level":"info","event_type":"run.state","event":{"session_id":"session_9067cf5e3558","channel":"gmail","sender":"sender_5375920e43c6","source":"channel","state":"start","request_id":"request_802086e4ecb7"},"timestamp":1772144293784} +{"level":"info","event_type":"run.state","event":{"session_id":"session_9067cf5e3558","channel":"gmail","sender":"sender_5375920e43c6","source":"channel","state":"complete","request_id":"request_802086e4ecb7","duration_ms":3535},"timestamp":1772144297319} +{"level":"info","event_type":"run.state","event":{"session_id":"session_33469de5a1ee","channel":"gmail","sender":"sender_23f2c718f92a","source":"channel","state":"start","request_id":"request_e1ee7948be6e"},"timestamp":1772147893923} +{"level":"info","event_type":"run.state","event":{"session_id":"session_33469de5a1ee","channel":"gmail","sender":"sender_23f2c718f92a","source":"channel","state":"complete","request_id":"request_e1ee7948be6e","duration_ms":4090},"timestamp":1772147898013} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772151794148} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"start","request_id":"request_dc04b15aeb0d"},"timestamp":1772151794148} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772151794297} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"start","request_id":"request_f786a5385b23"},"timestamp":1772151794297} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"complete","request_id":"request_dc04b15aeb0d","duration_ms":8516},"timestamp":1772151802664} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f4d8ddc04194","channel":"gmail","sender":"sender_c8a436a5eb54","source":"channel","state":"complete","request_id":"request_f786a5385b23","duration_ms":9850},"timestamp":1772151804147} +{"level":"info","event_type":"run.state","event":{"session_id":"session_fd6536fa5ff4","channel":"gmail","sender":"sender_fcf96878ddcb","source":"channel","state":"start","request_id":"request_ff70daf25a96"},"timestamp":1772158394779} +{"level":"info","event_type":"run.state","event":{"session_id":"session_fd6536fa5ff4","channel":"gmail","sender":"sender_fcf96878ddcb","source":"channel","state":"complete","request_id":"request_ff70daf25a96","duration_ms":5690},"timestamp":1772158400469} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_8b51db8cde21","channel":"gmail","sender":"sender_c9788a77f027","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772163195186} +{"level":"info","event_type":"run.state","event":{"session_id":"session_8b51db8cde21","channel":"gmail","sender":"sender_c9788a77f027","source":"channel","state":"start","request_id":"request_9054b78eda1d"},"timestamp":1772163195187} +{"level":"info","event_type":"run.state","event":{"session_id":"session_8b51db8cde21","channel":"gmail","sender":"sender_c9788a77f027","source":"channel","state":"complete","request_id":"request_9054b78eda1d","duration_ms":2356},"timestamp":1772163197543} +{"level":"info","event_type":"run.state","event":{"session_id":"session_7db5014f64fe","channel":"gmail","sender":"sender_81e925eaae0e","source":"channel","state":"complete","request_id":"request_7f5d82d1085a","duration_ms":5231},"timestamp":1772197161761} +{"level":"info","event_type":"run.state","event":{"session_id":"session_3ffb2e631ab1","channel":"gmail","sender":"sender_745442e44534","source":"channel","state":"complete","request_id":"request_3d4d23510682","duration_ms":3836},"timestamp":1772199260639} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772206157229} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"start","request_id":"request_ab73d670c119"},"timestamp":1772206157229} +{"level":"info","event_type":"run.state","event":{"session_id":"session_2f2f1e414e81","channel":"gmail","sender":"sender_323cedc3233a","source":"channel","state":"complete","request_id":"request_ab73d670c119","duration_ms":3850},"timestamp":1772206161079} +{"level":"debug","event_type":"reaction.skip","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","reason":"no_rules","candidate_count":0},"timestamp":1772211257454} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","state":"start","request_id":"request_607c64c2760f"},"timestamp":1772211257454} +{"level":"info","event_type":"run.state","event":{"session_id":"session_f6304f25e43b","channel":"gmail","sender":"sender_311c7608cc58","source":"channel","state":"complete","request_id":"request_607c64c2760f","duration_ms":3870},"timestamp":1772211261324} diff --git a/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.md b/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.md new file mode 100644 index 0000000..55fea44 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.md @@ -0,0 +1,62 @@ +# Phase 0 Baseline Telemetry Summary + +- Run state events: 44 +- Run cancel events: 0 +- Reaction matches: 0 +- Reaction skips: 15 + +- Sources: channel + +## Run Outcomes (Overall) + +- Total outcomes: 26 +- Complete: 26 (100.00%) +- Cancelled: 0 (0.00%) +- Errors: 0 (0.00%) +- Cancel requested: 0 +- Starts: 18 + +## Run Outcomes by Channel + +| Channel | Outcomes | Complete | Cancelled | Error | Complete % | Cancel % | Error % | Cancel Req | Starts | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| gmail | 26 | 26 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 18 | + +## Run Outcomes by Session + +| Session | Outcomes | Complete | Cancelled | Error | Complete % | Cancel % | Error % | Cancel Req | Starts | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| session_2f2f1e414e81 | 5 | 5 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 5 | +| session_f4d8ddc04194 | 3 | 3 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 3 | +| session_eabc3c2a91b9 | 2 | 2 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_f6304f25e43b | 2 | 2 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 2 | +| session_33469de5a1ee | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_3ffb2e631ab1 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 0 | +| session_4d9e843358a3 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 0 | +| session_58a64b6f2c91 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 0 | +| session_7d3c3ff67d4f | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 0 | +| session_7db5014f64fe | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 0 | +| session_8849a4464275 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 0 | +| session_8b51db8cde21 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_9067cf5e3558 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_a4b91821c664 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 0 | +| session_cb9a69d8a362 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_e0a2a17b7329 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_ea839415979e | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | +| session_fd6536fa5ff4 | 1 | 1 | 0 | 0 | 100.00% | 0.00% | 0.00% | 0 | 1 | + +## Cancel Latency + +- No cancel latency samples. + +## Reaction Decisions + +- Matched: 0 (0.00%) +- Skipped: 15 (100.00%) + +### Skip Reasons + +| Reason | Count | Percent | +| --- | ---: | ---: | +| no_rules | 15 | 100.00% | + diff --git a/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.json b/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.json new file mode 100644 index 0000000..1a13473 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.json @@ -0,0 +1,104 @@ +{ + "generated_at": "2026-02-27T18:47:26.286Z", + "source_audit_path": "~/.local/share/flynn/audit.log", + "source_event_count": 6, + "sampled_event_count": 6, + "filters": { + "since_ms": 1772178441443, + "until_ms": 1772178441944, + "sources": [ + "gateway" + ], + "exclude_session_substrings": [ + "probe" + ], + "anonymized_identifiers": true, + "auto_gateway_cancel_window": { + "session_id": "ws:phase0-gateway-window", + "start_time_ms": 1772178441443, + "end_time_ms": 1772178441944, + "event_count": 6, + "run_cancel_count": 1, + "cancel_requested_count": 1, + "cancelled_count": 1, + "padding_ms": 250 + } + }, + "options": { + "sources": [ + "gateway" + ], + "maxSessions": 20, + "maxChannels": 20, + "maxSkipReasons": 10 + }, + "summary": { + "event_counts": { + "run_state": 5, + "run_cancel": 1, + "reaction_match": 0, + "reaction_skip": 0 + }, + "run_outcomes": { + "overall": { + "total_outcomes": 2, + "complete": 1, + "cancelled": 1, + "error": 0, + "cancel_requested": 1, + "start": 2, + "completion_rate_pct": 50, + "cancel_rate_pct": 50, + "error_rate_pct": 0 + }, + "by_channel": [ + { + "key": "ws", + "stats": { + "total_outcomes": 2, + "complete": 1, + "cancelled": 1, + "error": 0, + "cancel_requested": 1, + "start": 2, + "completion_rate_pct": 50, + "cancel_rate_pct": 50, + "error_rate_pct": 0 + } + } + ], + "by_session": [ + { + "key": "session_67024a716ed2", + "stats": { + "total_outcomes": 2, + "complete": 1, + "cancelled": 1, + "error": 0, + "cancel_requested": 1, + "start": 2, + "completion_rate_pct": 50, + "cancel_rate_pct": 50, + "error_rate_pct": 0 + } + } + ] + }, + "cancel_latency_ms": { + "count": 1, + "avg_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "min_ms": 0, + "max_ms": 0 + }, + "reactions": { + "matched": 0, + "skipped": 0, + "total": 0, + "match_rate_pct": null, + "skip_rate_pct": null, + "skip_reasons": [] + } + } +} diff --git a/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.jsonl b/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.jsonl new file mode 100644 index 0000000..1368af7 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.jsonl @@ -0,0 +1,6 @@ +{"level":"info","event_type":"run.state","event":{"session_id":"session_67024a716ed2","channel":"ws","sender":"sender_776ae1d44923","source":"gateway","state":"start","request_id":"request_e7102f267cb2"},"timestamp":1772178441693} +{"level":"info","event_type":"run.cancel","event":{"session_id":"session_67024a716ed2","channel":"ws","sender":"sender_776ae1d44923","source":"gateway","requested":true,"acknowledged":true,"request_id":"request_61e1e51ee26b","latency_ms":0},"timestamp":1772178441693} +{"level":"info","event_type":"run.state","event":{"session_id":"session_67024a716ed2","channel":"ws","sender":"sender_776ae1d44923","source":"gateway","state":"cancel_requested","request_id":"request_61e1e51ee26b","duration_ms":0},"timestamp":1772178441694} +{"level":"info","event_type":"run.state","event":{"session_id":"session_67024a716ed2","channel":"ws","sender":"sender_776ae1d44923","source":"gateway","state":"cancelled","request_id":"request_e7102f267cb2","duration_ms":1},"timestamp":1772178441694} +{"level":"info","event_type":"run.state","event":{"session_id":"session_67024a716ed2","channel":"ws","sender":"sender_776ae1d44923","source":"gateway","state":"start","request_id":"request_897903dab9c4"},"timestamp":1772178441694} +{"level":"info","event_type":"run.state","event":{"session_id":"session_67024a716ed2","channel":"ws","sender":"sender_776ae1d44923","source":"gateway","state":"complete","request_id":"request_897903dab9c4","duration_ms":0},"timestamp":1772178441694} diff --git a/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.md b/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.md new file mode 100644 index 0000000..3d15069 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.md @@ -0,0 +1,50 @@ +# Phase 0 Baseline Telemetry Summary + +- Run state events: 5 +- Run cancel events: 1 +- Reaction matches: 0 +- Reaction skips: 0 + +- Sources: gateway + +## Run Outcomes (Overall) + +- Total outcomes: 2 +- Complete: 1 (50.00%) +- Cancelled: 1 (50.00%) +- Errors: 0 (0.00%) +- Cancel requested: 1 +- Starts: 2 + +## Run Outcomes by Channel + +| Channel | Outcomes | Complete | Cancelled | Error | Complete % | Cancel % | Error % | Cancel Req | Starts | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| ws | 2 | 1 | 1 | 0 | 50.00% | 50.00% | 0.00% | 1 | 2 | + +## Run Outcomes by Session + +| Session | Outcomes | Complete | Cancelled | Error | Complete % | Cancel % | Error % | Cancel Req | Starts | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| session_67024a716ed2 | 2 | 1 | 1 | 0 | 50.00% | 50.00% | 0.00% | 1 | 2 | + +## Cancel Latency + +- Count: 1 +- Avg: 0ms +- P50: 0ms +- P95: 0ms +- Min: 0ms +- Max: 0ms + +## Reaction Decisions + +- Matched: 0 (n/a) +- Skipped: 0 (n/a) + +### Skip Reasons + +| Reason | Count | Percent | +| --- | ---: | ---: | +| _none_ | 0 | 0.00% | + diff --git a/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.json b/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.json new file mode 100644 index 0000000..3299f3a --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.json @@ -0,0 +1,300 @@ +{ + "generated_at": "2026-02-27T18:47:26.685Z", + "artifacts_dir": "/home/will/lab/flynn/docs/plans/artifacts", + "keep_per_family": 8, + "apply": true, + "report_tag": "2026-02-27-184726", + "reports": { + "summary_json_out": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.json", + "summary_md_out": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.md" + }, + "plan": { + "keep": [ + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-184726.json", + "family": "backend_drift", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-184726.md", + "family": "backend_drift", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-184011.json", + "family": "backend_drift", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-184011.md", + "family": "backend_drift", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-175943.json", + "family": "backend_drift", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-175943.md", + "family": "backend_drift", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184726.json", + "family": "backend_native", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184726.jsonl", + "family": "backend_native", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184726.md", + "family": "backend_native", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184011.json", + "family": "backend_native", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184011.jsonl", + "family": "backend_native", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184011.md", + "family": "backend_native", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-175943.json", + "family": "backend_native", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-175943.jsonl", + "family": "backend_native", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-175943.md", + "family": "backend_native", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.jsonl", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.md", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.json", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.jsonl", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.md", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-175943.json", + "family": "backend_pi_embedded", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-175943.jsonl", + "family": "backend_pi_embedded", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-175943.md", + "family": "backend_pi_embedded", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184726.json", + "family": "channel", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184726.jsonl", + "family": "channel", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184726.md", + "family": "channel", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184011.json", + "family": "channel", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184011.jsonl", + "family": "channel", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184011.md", + "family": "channel", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-175943.json", + "family": "channel", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-175943.jsonl", + "family": "channel", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-175943.md", + "family": "channel", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184726.json", + "family": "gateway", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184726.jsonl", + "family": "gateway", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184726.md", + "family": "gateway", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184011.json", + "family": "gateway", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184011.jsonl", + "family": "gateway", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184011.md", + "family": "gateway", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-175943.json", + "family": "gateway", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-175943.jsonl", + "family": "gateway", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-175943.md", + "family": "gateway", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + } + ], + "remove": [], + "families": [ + { + "family": "channel", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + }, + { + "family": "gateway", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + }, + { + "family": "backend_pi_embedded", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + }, + { + "family": "backend_native", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + }, + { + "family": "backend_drift", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + } + ] + } +} diff --git a/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.md b/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.md new file mode 100644 index 0000000..b642d48 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.md @@ -0,0 +1,17 @@ +# Phase-0 Rolling Artifact Prune + +Artifacts dir: /home/will/lab/flynn/docs/plans/artifacts +Keep per family: 8 +Mode: apply +Keep files: 42 +Remove files: 0 + +## Families +- channel: tags total=3 keep=3 remove=0 +- gateway: tags total=3 keep=3 remove=0 +- backend_pi_embedded: tags total=3 keep=3 remove=0 +- backend_native: tags total=3 keep=3 remove=0 +- backend_drift: tags total=3 keep=3 remove=0 + +## Remove List +- none diff --git a/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.json b/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.json new file mode 100644 index 0000000..b8e3964 --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.json @@ -0,0 +1,300 @@ +{ + "generated_at": "2026-02-27T18:48:13.082Z", + "artifacts_dir": "/home/will/lab/flynn/docs/plans/artifacts", + "keep_per_family": 8, + "apply": false, + "report_tag": "2026-02-27", + "reports": { + "summary_json_out": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.json", + "summary_md_out": "/home/will/lab/flynn/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.md" + }, + "plan": { + "keep": [ + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-184726.json", + "family": "backend_drift", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-184726.md", + "family": "backend_drift", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-184011.json", + "family": "backend_drift", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-184011.md", + "family": "backend_drift", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-175943.json", + "family": "backend_drift", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_drift_2026-02-27-175943.md", + "family": "backend_drift", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184726.json", + "family": "backend_native", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184726.jsonl", + "family": "backend_native", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184726.md", + "family": "backend_native", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184011.json", + "family": "backend_native", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184011.jsonl", + "family": "backend_native", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-184011.md", + "family": "backend_native", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-175943.json", + "family": "backend_native", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-175943.jsonl", + "family": "backend_native", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_native_2026-02-27-175943.md", + "family": "backend_native", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.jsonl", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.md", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.json", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.jsonl", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.md", + "family": "backend_pi_embedded", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-175943.json", + "family": "backend_pi_embedded", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-175943.jsonl", + "family": "backend_pi_embedded", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_backend_pi_embedded_2026-02-27-175943.md", + "family": "backend_pi_embedded", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184726.json", + "family": "channel", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184726.jsonl", + "family": "channel", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184726.md", + "family": "channel", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184011.json", + "family": "channel", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184011.jsonl", + "family": "channel", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-184011.md", + "family": "channel", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-175943.json", + "family": "channel", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-175943.jsonl", + "family": "channel", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_2026-02-27-175943.md", + "family": "channel", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184726.json", + "family": "gateway", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184726.jsonl", + "family": "gateway", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184726.md", + "family": "gateway", + "tag": "2026-02-27-184726", + "tag_timestamp_ms": 1772218046000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184011.json", + "family": "gateway", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184011.jsonl", + "family": "gateway", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-184011.md", + "family": "gateway", + "tag": "2026-02-27-184011", + "tag_timestamp_ms": 1772217611000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-175943.json", + "family": "gateway", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-175943.jsonl", + "family": "gateway", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + }, + { + "file_name": "phase0_baseline_live_gateway_2026-02-27-175943.md", + "family": "gateway", + "tag": "2026-02-27-175943", + "tag_timestamp_ms": 1772215183000 + } + ], + "remove": [], + "families": [ + { + "family": "channel", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + }, + { + "family": "gateway", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + }, + { + "family": "backend_pi_embedded", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + }, + { + "family": "backend_native", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + }, + { + "family": "backend_drift", + "total_tags": 3, + "keep_tags": 3, + "remove_tags": 0 + } + ] + } +} diff --git a/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.md b/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.md new file mode 100644 index 0000000..c1f810e --- /dev/null +++ b/docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.md @@ -0,0 +1,17 @@ +# Phase-0 Rolling Artifact Prune + +Artifacts dir: /home/will/lab/flynn/docs/plans/artifacts +Keep per family: 8 +Mode: dry-run +Keep files: 42 +Remove files: 0 + +## Families +- channel: tags total=3 keep=3 remove=0 +- gateway: tags total=3 keep=3 remove=0 +- backend_pi_embedded: tags total=3 keep=3 remove=0 +- backend_native: tags total=3 keep=3 remove=0 +- backend_drift: tags total=3 keep=3 remove=0 + +## Remove List +- none diff --git a/docs/plans/state.json b/docs/plans/state.json index 2480fcf..2dee97f 100644 --- a/docs/plans/state.json +++ b/docs/plans/state.json @@ -317,7 +317,7 @@ "status": "completed", "date": "2026-02-27", "updated": "2026-02-27", - "summary": "Added one-command cadence scheduling for rolling phase-0 baselines plus retention apply via `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune`, with configurable retention depth through `KEEP_PER_FAMILY` so scheduled runs can refresh, evaluate drift, and control artifact growth in a single step.", + "summary": "Added one-command cadence scheduling for rolling phase-0 baselines plus retention apply via `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune`, with configurable retention depth through `KEEP_PER_FAMILY` and prune report artifacts tagged to the same rolling run so scheduled jobs can refresh, evaluate drift, and audit retention decisions in one step.", "files_modified": [ "package.json", "README.md", @@ -325,20 +325,25 @@ "docs/architecture/AGENT_DIAGRAM.md", "docs/architecture/GATEWAY_SESSIONS_AND_QUEUE.md", "docs/plans/2026-02-25-phase0-instrumentation-ticket-checklist.md", - "docs/plans/artifacts/phase0_baseline_live_2026-02-27-184011.jsonl", - "docs/plans/artifacts/phase0_baseline_live_2026-02-27-184011.md", - "docs/plans/artifacts/phase0_baseline_live_2026-02-27-184011.json", - "docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184011.jsonl", - "docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184011.md", - "docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184011.json", - "docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.jsonl", - "docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.md", - "docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184011.json", - "docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184011.jsonl", - "docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184011.md", - "docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184011.json", - "docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184011.md", - "docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184011.json", + "scripts/prune-phase0-baseline-artifacts.ts", + "docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.jsonl", + "docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.md", + "docs/plans/artifacts/phase0_baseline_live_2026-02-27-184726.json", + "docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.jsonl", + "docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.md", + "docs/plans/artifacts/phase0_baseline_live_gateway_2026-02-27-184726.json", + "docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.jsonl", + "docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.md", + "docs/plans/artifacts/phase0_baseline_live_backend_pi_embedded_2026-02-27-184726.json", + "docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.jsonl", + "docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.md", + "docs/plans/artifacts/phase0_baseline_live_backend_native_2026-02-27-184726.json", + "docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.md", + "docs/plans/artifacts/phase0_baseline_live_backend_drift_2026-02-27-184726.json", + "docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.md", + "docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27-184726.json", + "docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.md", + "docs/plans/artifacts/phase0_baseline_live_prune_2026-02-27.json", "docs/plans/state.json" ], "test_status": "pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune + pnpm audit:phase0-baseline:live:prune + pnpm test:run src/audit/phase0BaselineArtifactRetention.test.ts + pnpm typecheck passing" @@ -7528,7 +7533,7 @@ "deeper_surfaces_phase0_ticket_02": "completed — gateway + daemon routing emit run lifecycle/cancel telemetry and reaction match/skip audit events with filter summaries and cancellation latency, plus focused tests", "deeper_surfaces_phase0_ticket_03": "completed — gateway metrics now track run-state outcomes, cancel latency samples, and reaction decision counters with routing/gateway emitters", "deeper_surfaces_phase0_ticket_04": "completed — added phase-0 baseline summary tooling for run outcomes, cancel latency, and reaction decisions with markdown/json CLI output", - "deeper_surfaces_phase0_ticket_05": "completed — documented phase-0 telemetry fields/workflow, refreshed architecture/protocol docs, generated anonymized live baseline artifacts for channel/gateway/backend-scoped (pi/native) windows, added backend freshness/drift gates with persisted drift reports, added rolling timestamp-tag cadence runs for immediate baseline-vs-prior drift comparisons, added rolling artifact retention tooling (`live:prune`), and added one-command cadence refresh+drift+retention apply (`live:refresh:drift:rolling:prune`)", + "deeper_surfaces_phase0_ticket_05": "completed — documented phase-0 telemetry fields/workflow, refreshed architecture/protocol docs, generated anonymized live baseline artifacts for channel/gateway/backend-scoped (pi/native) windows, added backend freshness/drift gates with persisted drift reports, added rolling timestamp-tag cadence runs for immediate baseline-vs-prior drift comparisons, added rolling artifact retention tooling (`live:prune` with prune reports), and added one-command cadence refresh+drift+retention apply (`live:refresh:drift:rolling:prune`)", "next_up": "Run scheduled `pnpm audit:phase0-baseline:live:refresh:drift:rolling:prune` in each active environment for at least one full cadence cycle (tuning `KEEP_PER_FAMILY` as needed), then tighten drift thresholds based on observed variance before additional run-control/reaction semantic changes.", "pi_embedded_canary_spike": "completed — added optional pi_embedded backend adapter, canary-safe no-tools routing guard, backend success/fallback latency audit events, and docs/diagram updates while native remains default", "pi_embedded_evaluation_phase": "completed — final decision rollback (applied in runtime config): Window A failed latency/fallback gates (p50 +259ms, p95 +5695ms, fallback 25%, categories: pi_module_interface/empty_assistant_text); Window B remained sample-insufficient; controlled probes verified guard coverage (pi_no_tools_mode/capability_query/attachments_present each hit once)", diff --git a/package.json b/package.json index 5742af6..9233144 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ "audit:phase0-baseline:live:drift": "node --import tsx/esm scripts/check-phase0-baseline-backend-drift.ts --artifacts-dir docs/plans/artifacts --backend pi_embedded,native --max-age-hours 36 --min-candidate-sampled-events 10 --max-sampled-events-drop-pct 80 --max-run-outcomes-drop-pct 80 --max-completion-rate-drop-pp 35 --max-cancel-rate-increase-pp 25 --max-error-rate-increase-pp 25 --max-cancel-latency-p95-increase-ms 6000 --write-default-artifacts", "audit:phase0-baseline:live:refresh:drift": "pnpm audit:phase0-baseline:live:refresh && pnpm audit:phase0-baseline:live:drift", "audit:phase0-baseline:live:refresh:drift:rolling": "TAG=$(date -u +%F-%H%M%S) && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source gateway --auto-gateway-cancel-window --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --backend pi_embedded --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --backend native --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/check-phase0-baseline-backend-drift.ts --artifacts-dir docs/plans/artifacts --backend pi_embedded,native --max-age-hours 36 --min-candidate-sampled-events 10 --max-sampled-events-drop-pct 80 --max-run-outcomes-drop-pct 80 --max-completion-rate-drop-pp 35 --max-cancel-rate-increase-pp 25 --max-error-rate-increase-pp 25 --max-cancel-latency-p95-increase-ms 6000 --write-default-artifacts --tag \"$TAG\" --report-tag \"$TAG\"", - "audit:phase0-baseline:live:prune": "KEEP_PER_FAMILY=${KEEP_PER_FAMILY:-8} && node --import tsx/esm scripts/prune-phase0-baseline-artifacts.ts --artifacts-dir docs/plans/artifacts --keep-per-family \"$KEEP_PER_FAMILY\"", - "audit:phase0-baseline:live:prune:apply": "KEEP_PER_FAMILY=${KEEP_PER_FAMILY:-8} && node --import tsx/esm scripts/prune-phase0-baseline-artifacts.ts --artifacts-dir docs/plans/artifacts --keep-per-family \"$KEEP_PER_FAMILY\" --apply", - "audit:phase0-baseline:live:refresh:drift:rolling:prune": "pnpm audit:phase0-baseline:live:refresh:drift:rolling && pnpm audit:phase0-baseline:live:prune:apply", + "audit:phase0-baseline:live:prune": "KEEP_PER_FAMILY=${KEEP_PER_FAMILY:-8} && node --import tsx/esm scripts/prune-phase0-baseline-artifacts.ts --artifacts-dir docs/plans/artifacts --keep-per-family \"$KEEP_PER_FAMILY\" --write-default-artifacts", + "audit:phase0-baseline:live:prune:apply": "KEEP_PER_FAMILY=${KEEP_PER_FAMILY:-8} && node --import tsx/esm scripts/prune-phase0-baseline-artifacts.ts --artifacts-dir docs/plans/artifacts --keep-per-family \"$KEEP_PER_FAMILY\" --apply --write-default-artifacts", + "audit:phase0-baseline:live:refresh:drift:rolling:prune": "TAG=$(date -u +%F-%H%M%S) && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source gateway --auto-gateway-cancel-window --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --backend pi_embedded --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/capture-phase0-live-baseline.ts --audit ~/.local/share/flynn/audit.log --source channel --backend native --exclude-session-substring probe --tag \"$TAG\" && node --import tsx/esm scripts/check-phase0-baseline-backend-drift.ts --artifacts-dir docs/plans/artifacts --backend pi_embedded,native --max-age-hours 36 --min-candidate-sampled-events 10 --max-sampled-events-drop-pct 80 --max-run-outcomes-drop-pct 80 --max-completion-rate-drop-pp 35 --max-cancel-rate-increase-pp 25 --max-error-rate-increase-pp 25 --max-cancel-latency-p95-increase-ms 6000 --write-default-artifacts --tag \"$TAG\" --report-tag \"$TAG\" && KEEP_PER_FAMILY=${KEEP_PER_FAMILY:-8} node --import tsx/esm scripts/prune-phase0-baseline-artifacts.ts --artifacts-dir docs/plans/artifacts --keep-per-family \"$KEEP_PER_FAMILY\" --apply --write-default-artifacts --report-tag \"$TAG\"", "audit:backend-canary:probes": "node --import tsx/esm scripts/run-pi-canary-guard-probes.ts", "companion:bundle": "node --import tsx/esm scripts/build-companion-release-bundle.ts", "companion:reference-apps": "node --import tsx/esm scripts/export-companion-reference-apps.ts", diff --git a/scripts/prune-phase0-baseline-artifacts.ts b/scripts/prune-phase0-baseline-artifacts.ts index 3d523ca..f0825d0 100644 --- a/scripts/prune-phase0-baseline-artifacts.ts +++ b/scripts/prune-phase0-baseline-artifacts.ts @@ -1,7 +1,7 @@ #!/usr/bin/env node -import { readdir, rm } from 'node:fs/promises'; -import { resolve } from 'node:path'; +import { mkdir, readdir, rm, writeFile } from 'node:fs/promises'; +import { dirname, resolve } from 'node:path'; import { parseArgs } from 'node:util'; import { planRollingPhase0ArtifactRetention, @@ -16,11 +16,19 @@ function usage(): string { ' --artifacts-dir Artifacts directory (default: docs/plans/artifacts)', ' --keep-per-family Keep newest rolling tags per family (default: 8)', ' --apply Apply deletions (default: dry-run)', + ' --report-tag Report tag suffix (default: current UTC date)', + ' --write-default-artifacts Write report files to artifacts dir', + ' --summary-json-out Write JSON report to path', + ' --summary-md-out Write markdown report to path', ' --format Output format (default: text)', ' --help Show usage', ].join('\n'); } +function isoDateTagNow(): string { + return new Date().toISOString().slice(0, 10); +} + function parseOptionalNumber(raw: string | undefined, flag: string): number | undefined { if (!raw) { return undefined; @@ -58,12 +66,21 @@ function renderText(plan: Phase0RollingArtifactRetentionPlan, artifactsDir: stri return lines.join('\n'); } +async function writeTextFile(pathValue: string, contents: string): Promise { + await mkdir(dirname(pathValue), { recursive: true }); + await writeFile(pathValue, `${contents}\n`, 'utf8'); +} + async function main(): Promise { const { values } = parseArgs({ options: { 'artifacts-dir': { type: 'string' }, 'keep-per-family': { type: 'string' }, apply: { type: 'boolean' }, + 'report-tag': { type: 'string' }, + 'write-default-artifacts': { type: 'boolean' }, + 'summary-json-out': { type: 'string' }, + 'summary-md-out': { type: 'string' }, format: { type: 'string' }, help: { type: 'boolean', short: 'h' }, }, @@ -80,11 +97,25 @@ async function main(): Promise { const keepPerFamily = parseOptionalNumber(values['keep-per-family'], '--keep-per-family') ?? 8; const apply = Boolean(values.apply); const format = values.format ?? 'text'; + const reportTag = values['report-tag'] ?? isoDateTagNow(); + const writeDefaultArtifacts = Boolean(values['write-default-artifacts']); if (format !== 'text' && format !== 'json') { throw new Error(`Invalid --format value "${format}".`); } + const defaultBaseName = resolve(artifactsDir, `phase0_baseline_live_prune_${reportTag}`); + const summaryJsonOut = values['summary-json-out'] + ? resolve(values['summary-json-out']) + : writeDefaultArtifacts + ? `${defaultBaseName}.json` + : undefined; + const summaryMdOut = values['summary-md-out'] + ? resolve(values['summary-md-out']) + : writeDefaultArtifacts + ? `${defaultBaseName}.md` + : undefined; + const files = await readdir(artifactsDir); const plan = planRollingPhase0ArtifactRetention(files, keepPerFamily); @@ -94,16 +125,32 @@ async function main(): Promise { } } + const payload = { + generated_at: new Date().toISOString(), + artifacts_dir: artifactsDir, + keep_per_family: Math.floor(keepPerFamily), + apply, + report_tag: reportTag, + reports: { + summary_json_out: summaryJsonOut, + summary_md_out: summaryMdOut, + }, + plan, + }; + const jsonOutput = JSON.stringify(payload, null, 2); + const textOutput = renderText(plan, artifactsDir, Math.floor(keepPerFamily), apply); + + if (summaryJsonOut) { + await writeTextFile(summaryJsonOut, jsonOutput); + } + if (summaryMdOut) { + await writeTextFile(summaryMdOut, textOutput); + } + if (format === 'json') { - process.stdout.write(`${JSON.stringify({ - generated_at: new Date().toISOString(), - artifacts_dir: artifactsDir, - keep_per_family: Math.floor(keepPerFamily), - apply, - plan, - }, null, 2)}\n`); + process.stdout.write(`${jsonOutput}\n`); } else { - process.stdout.write(`${renderText(plan, artifactsDir, Math.floor(keepPerFamily), apply)}\n`); + process.stdout.write(`${textOutput}\n`); } }