Repository navigation
feat(daemon): bound the event ledger, read latency whole, share run id - #5843
Merged
Merged
Conversation
…re the run id Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
…cold-status exit Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
…d lane Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sinity
enabled auto-merge (squash)
September 29, 2026 18:47
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sinity
added a commit
that referenced
this pull request
Sep 29, 2026
…etention (#5851) ## Summary - **Termination receipts (polylogue-peo).** The next daemon start reconciles each earlier run into one `TerminationReceipt`. The receipt classifies the run as `clean`, `handled_signal`, `external_stop`, `watchdog`, `oom_kill`, `cgroup_kill`, `crash`, `host_gap` or `unknown`, keeps observed and inferred fields apart, cites its evidence, gives clock bounds, and gives a reason for each source it could not use. Receipts live in a new ops table and appear in status as `daemon_lifecycle.last_termination`. - **Durable drop counts (polylogue-jtwu.2).** Route observations a process could not record are now written to the ops tier. A reader in any process counts them beside the percentiles, so `analyze latency` answers `ok` when nothing was lost. - **Event-ledger retention without constants (polylogue-20d.13.6).** The fixed 7-day / 250,000-id bound from #5843 is gone. The daemon keeps each row until every live SSE subscriber has read it, plus the newest row of each record kind. A cursor below the new prune watermark gets the typed `aged_out` resync. - **Run id on workload receipts (peo criterion 1).** `WorkloadReceipt` and `RouteObservationReceipt` carry the daemon run id, so a dead run's last workload joins its lifecycle row by id. ## Problem - **Unexplained exits.** A process cannot record its own SIGKILL, OOM kill, cgroup kill, watchdog abort or host loss. Before this change a vanished run was only a stale `daemon_lifecycle` row with no stop marker (`lifecycle_status` state `vanished`), and nothing classified it. - **Drops invisible to readers.** The drop ledger was process-local. A reader in another process always saw `drop_accounting_complete=false`, so `analyze latency` was `degraded(drop_accounting_incomplete)` on every answer, including ones where nothing was lost. - **Unmeasured retention.** The 7-day and 250,000-id constants were chosen without measurement. Retention also removed only id prefixes, so readers of "latest row of kind X" (status's last ingestion batch, the judgment scheduler's suppression check, capture health) could lose that row to age alone. ## Solution **Termination receipts** (`polylogue/operations/daemon_termination.py`, new): - At start, the run records its host identity under `details.host` in `daemon_lifecycle`: pid, boot id, the service-manager invocation id, and its cgroup path, inode and `memory.events` baseline. The invocation id is recorded only when `SYSTEMD_EXEC_PID` equals the run's own pid; an id inherited from an ancestor unit would name the wrong invocation. - `classify_termination` uses only evidence tied to the run by identity: - its own stop marker; - the manager's unit result and main-process exit for that invocation; - kernel OOM records naming its pid; - `systemd-oomd` kills naming its cgroup; - the `oom_group_kill` delta on the same cgroup instance, checked by inode; - a changed boot id. - Proximity in time never upgrades `unknown`: an OOM kill of another pid inside the window is reported under `observed` but not used to classify. - `HostTerminationEvidence` is the production adapter over `journalctl`, `/proc` and `/sys/fs/cgroup`. - A new ONESHOT daemon service, `termination_reconciliation` (production profile), reads evidence off the writer through `asyncio.to_thread` and writes receipts under the writer. Startup does not wait on the journal. - Receipts are written once per run with `ON CONFLICT DO NOTHING`. Every unreconciled earlier run is classified, each bounded by its successor's start. **Durable drops** (`route_observation.py`, `ops_write.py`): - The in-process ledger holds pending drops per ops tier, under a lock. - The next successful observation write to the same tier records those drops in the same transaction. Rows the row cap evicts inside the retention window are recorded as `pruned` drops. At exit, a flush writes whatever is still pending. - A tier that still cannot be written at exit emits the typed `route_observation.drops_unflushed` event. - The reader sums `route_observation_drops` over the window. The outcome is `ok` with nothing lost, `degraded(observations_dropped)` with counted loss, and `degraded(window_exceeds_retention)` for a window that starts before the age horizon. **Retention** (`events.py`, `events_http.py`): - `EventSubscriberRegistry` holds the cursors of open SSE streams. The daemon claims it with `EVENT_SUBSCRIBERS.owning()` for its lifetime, and only the owning process prunes. An emitter in another process cannot see the daemon's subscribers, so it only appends. - A row at or below the lowest live cursor is removed when it is either a granular topic frame (its state is committed in the tier its spec names) or a record superseded by a newer row of the same kind. - Removal is no longer a prefix, so the highest removed id is kept in `daemon_event_retention`, and `_cursor_refusal_reason` refuses from that watermark instead of from `MIN(id)`. - A disconnected subscriber is not tracked. When it resumes below the watermark, it gets the resync and refetches current state. **Schema.** Three new ops tables: `daemon_termination_receipts`, `route_observation_drops`, `daemon_event_retention`. Derived-identity closure: `devtools schema closure` reports **IN** for `polylogue/core/types.py`, `polylogue/storage/sqlite/archive_tiers/ops.py` and `polylogue/storage/sqlite/archive_tiers/ops_write.py`. This PR moves the ops-tier identity, so a daemon running an older build sees `SchemaSkew` and reconverges the disposable ops tier. Every other changed file is `out`. ## Verification - `agentctl job start --workspace <wt> polylogue verify_quick`, job 3958, head `225c8e6283`: `verify: PASSED exit=0`. - `agentctl job start --workspace <wt> polylogue pytest_focused -- <26 files>`, job 3959, head `225c8e6283`: `{'passed': 713, 'failed': 3, 'total': 716, 'flaky': 10}`. The 10 flaky tests failed under the shared pool and passed when rerun alone. - The 3 failures are inherited. The master baseline (job 3932, detached worktree at `efc6c40ab7`, `--on-default-branch`) fails the same three: - `test_direct_status_certifies_a_healthy_archive_without_the_exact_probe` - `test_concurrent_access_safety` - `test_status_snapshot_unreadable_frame_never_certifies_fresh` - The selection covers the new `test_daemon_termination.py`, `test_event_cursor.py`, `test_daemon_events_endpoint.py`, `test_route_observation.py`, `test_diagnostics.py`, and the lifecycle, status, service-registry, daemon CLI, ops-tier, workload-receipt, structured-logging and daemon-resilience suites. - Live probe (scratch archive, real `polylogued run` twice: SIGTERM, then SIGKILL, then a third start): - the first run was reconciled `handled_signal`, observing `lifecycle.signal=SIGTERM`; - the SIGKILLed run was reconciled `unknown`, with `boot_identity.changed=false`, zero cgroup deltas, and `service_manager` missing as `no_manager_records_for_invocation`. That probe predates the `SYSTEMD_EXEC_PID` fix and had inherited an ancestor's invocation id; the fix makes the source report `run_not_under_service_manager` instead. ## Self-review Final pass (pass 3) over `git diff efc6c40..225c8e6`, against `docs/review/codex-review-guide.md` and the worker-contract generic list. Review guide: 1. ✓ **Siblings and owners.** - Retention has one enforcement point, `prune_daemon_events`, and both emit paths call it (`grep -n "prune_daemon_events(conn)" polylogue/daemon/events.py`: 2). - Cursor completeness has one owner, `_cursor_refusal_reason`, used by poll and SSE alike. - Termination classification has one owner, `classify_termination`. - Drop recording has one writer helper, `_insert_route_observation_drops`, used by both the observation write and the exit flush. 2. ✓ **The fix itself.** Pass 1 found three defects inside the new code, fixed in `2cea488308` and `225c8e6283`: - an unlocked read-modify-write in the drop ledger, under free-threaded concurrency; - `exited 143` after a recorded SIGTERM was classified as `crash`; - an inherited `INVOCATION_ID` was trusted. It also found the test reader's real clock tripping `window_exceeds_retention`. The quick gate found a layering violation (daemon importing storage) and new SQLite degradation handlers; the classifier moved to `operations/`, and the handlers were removed rather than baselined. 3. ✓ **Memory and limits.** - The drop reader groups in SQL. - Pending drops are aggregated per (tier, reason, route), not per event. - Retention has no cap or age. - The journal adapter reads output per query, and the only unbounded wait is the journal read itself, which runs off the writer as its own service. 4. ✓ **Cost per unit.** - Each prune deletes `id <= through`, using `idx_daemon_events_kind_id` for the newest-of-kind probe. Rows left at or below the watermark are the newest row per record kind, so they are bounded by the number of kinds. - `unreconciled_daemon_runs` is one window query over the lifecycle rows, which grow by one per daemon start. 5. ✓ **Interruption.** - A reconciliation interrupted before its write leaves no receipt, so the run stays in `pending_reconciliation_runs` and the next start retries it. - The drop write is transactional; a failure restores the drained drops. - An SSE subscription is closed in `finally`. 6. ✓ **Ordering and races.** - The watermark and the page are read in one `BEGIN` snapshot, as before. - The prune and its watermark update share the emit transaction. - The subscriber registry is locked. - A stream registers its cursor before its first read, so no row after that cursor can be pruned under it. 7. ✓ **Failure classification.** - Each unavailable host source is a named `missing_sources` reason: `journalctl_unavailable`, `journal_query_failed`, `cgroup_removed`, `cgroup_recreated`, `run_not_under_service_manager`, and others. - The new code has no `except sqlite3.Error` that returns a negative answer; the layering gate's `sqlite_degradation_site_added` count is 0 at this head. 8. ✓ **Silent outcomes.** - The latency outcome is `ok` only with complete accounting and zero drops. - An empty window is `empty`; an empty window with recorded drops is `degraded`. - A run with no evidence is `unknown` with every missing source named. 9. ✓ **Cleanup on failure.** Drained drops are restored on every failed write and every missing tier. The subscription is closed on every stream exit. 10. ✓ **Identity and keys.** - The receipt key is the lifecycle `run_id`. - `daemon_run_id` appears in the `WorkloadReceipt` payload only when set, so receipt ids outside a daemon are unchanged (`test_a_route_outside_a_daemon_carries_no_daemon_run_id`). - The workload join uses `json_extract` on `route_receipt.daemon_run_id`: an id match, not a time match. 11. ✓ **Lossless transforms.** `restore` keeps both ends of the observed span. 12. ✓ **Degenerate inputs.** Covered cases: an empty ledger, no live subscribers (prune through latest), a zero-row window, a run with no host identity, a cgroup whose inode differs from its baseline, and the archive-less drop (belongs to no tier; stays process-local). 13. ✓ **Consumers.** Removed APIs have no remaining users: `DaemonEventRetention`, the `set_daemon_event_retention` family, the `DAEMON_EVENT_RETENTION_*` constants, the `pruned=` out-parameter, and the always-unaccounted reader (grep: 0 users). Their tests were rewritten, and the judgment fixture `unbounded_event_ledger` was deleted. Also updated: the new writers in `docs/plans/layering.yaml`; the retention and termination text in `docs/atlas/daemon.md`; the CLI latency tests for the new exit codes. 14. ✓ **Tests and stubs.** Each new test drives the production route: a real lifecycle row, a real ops tier, and the real emit, stream and reader. The anti-vacuity mutation for each is named in its module docstring. The host adapter tests use a fake `journalctl` script and fake `/proc` and cgroup trees, never the real host. 15. ✓ **Trust boundaries.** Journal records are parsed, not logged. No secrets reach argv. Receipts hold pids, cgroup paths and unit names from the local host in the disposable ops tier. Generic list: 1. ✓ Criteria and their production-path evidence are listed under "Bead dispositions". 2. ✓ Defect classes were searched in the diff: degradation handlers (0 new), writer inventory (2 added), and imports from `daemon/` into `storage/` (none new). 3. ✓ Consumers: see item 13. 4. ✓ Failure paths are typed: see items 7 and 8. 5. ✓ Anti-vacuity is named per test. 6. ✓ No secrets or personal data. Fixtures are synthetic (pid 4242, zero UUID boot ids). ## Bead dispositions - **polylogue-peo, criteria 1-4 and 6: met.** - Criterion 1: WorkloadReceipt `daemon_run_id` (`test_receipt_joins_the_run_and_its_last_workload_by_run_id`). - Criteria 2-3: the classification tests for each class and `test_temporal_adjacency_alone_stays_unknown`. - Criterion 4: `test_status_reports_the_last_termination_and_pending_runs`. - Criterion 5 is met by construction: no retained evidence means `unknown` with the missing sources named (`test_a_vanished_run_with_no_evidence_names_what_is_missing`). The historical exit-144 run has no retained evidence to reconcile. - **polylogue-jtwu.2, J2-1: met** (`test_drops_held_while_the_tier_was_locked_reach_a_reader_in_another_process`). J2-2 was already met. - **polylogue-20d.13.6, S2-2: rule replaced.** Reopened. Its close reason wrongly called the bound an operator decision; it was a coordinator prompt instruction. - **polylogue-qw8zp, AC8:** the applicable half is met on the only supported interpreter. `tests/unit/test_structured_logging.py` covers fresh threads, a reused executor worker, `to_thread`, and correlation carried without write authority. The GIL half is moot: `flake.nix:724` and `polylogue/runtime.py:227` both refuse a GIL-enabled interpreter. The remaining executor submits are polylogue-1oa7o AC4. - **polylogue-8s70: not in this PR.** It stays open with measurements and a work list. ## Residuals - A drop that cannot be written even at exit is visible only as the `route_observation.drops_unflushed` event. A reader cannot count drops from a process that died without reaching its ops tier. - With no live subscriber, the owning daemon prunes topic frames right after emitting them. A client that reconnects later resyncs instead of replaying. Capture-health history keeps only the newest capture-health row. - `polylogue-8s70` (cold status budget) is unchanged by this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Daemon reads, events and observability residuals from the reindex-2026 daemon-reads group:
daemon_eventsnow has a production retention bound (a week, a 250,000-id span), enforced on every emit at O(expired rows) instead of aCOUNT(*)scan (polylogue-20d.13.6 S2-2).analyze latencycomputes percentiles over every sample in the lookback window instead of the newest 1,000 rows, and decides one terminal outcome (polylogue-jtwu.2).daemon_lifecyclerow, heartbeats and the status projection (polylogue-peo AC1).Problem
DaemonEventRetentiondefaulted to unbounded and nothing in production installed a bound, so the disposable ops-tier ledger grew with everymessage.appended(polylogue/daemon/events.py,_RETENTION = _UNBOUNDED_RETENTIONat 633ec18). The row bound, once installed, ranSELECT COUNT(*) FROM daemon_eventson every emit, and the age bound ranMIN(id) ... WHERE ts_ms >= ?over thets_msindex, which visits every in-window row.analyze latency --limit(default 1000) read the newest N rows per table and computed p50/p95 over them. A route with 1,200 samples whose oldest 200 were slow reported p95 = 10 ms instead of 5,000 ms. That is an arbitrary limit that changes the outcome. The command also decided no terminal outcome, although it is row-bearing and its drop accounting is never complete from a reader process.polylogued runboundrun_id=uuid4().hex[:16]into the logging context (daemon/cli.py:4000), whileDaemonLifecycle.startminted a separateuuid4()for the lifecycle row (daemon/lifecycle.py:86). No event joined to its lifecycle row.polylogued watchbound no run id at all.tests/benchmarks/test_cli_cold_start.pyasserted exit 0, butpolylogue statuswith no daemon now returns the typed unavailable snapshot and exits 1, so the lane could never produce a sample.Solution
events.py:DEFAULT_DAEMON_EVENT_RETENTIONis the installed bound.max_rowsbounds the retained id span (DELETE ... WHERE id <= MAX(id) - max_rows). Ids are AUTOINCREMENT and pruning only ever deletes a prefix, so the span is an upper bound on the row count. The age prune finds its boundary with aNOT INDEXEDrowid walk that stops at the first in-window row. A cursor below the retained range still gets the typedaged_outresync envelope that feat(daemon): Declare event contracts and qualify route latency with drops #5349 added.route_observation.py:read_latency_reportstreams both tables from the cursor over the whole window. The writers' own retention bounds the window, not the reader.read_side_drops,READ_LIMIT_TRUNCATEDand the--limitoption are deleted.RouteLatencyReport.outcomeisdegraded(drop_accounting_incomplete) when drops are not countable,emptywhen there are no buckets, andokotherwise. The CLI prints the outcome and exits with its code. A missingops.dbisdegraded(ops_db_missing).daemon/cli.py:daemon_run_id()returns the run id already bound in the logging context, or binds one.polylogued runcalls it before its first event,run_daemon_servicescalls it on entry (sowatchand embedded callers are covered), andDaemonLifecycle.startnow requiresrun_idand no longer mints its own.docs/atlas/daemon.mddocuments the run id and the ledger bound.test_daemon_golden_parity.py: deleted the unused_strip_read_provenancehelper, which refactor(cli): Remove the direct-read execution fallback #5453 left behind when it removed the direct read leg.Retention value, decided rather than measured: the fresh archive's live
ops.dbholds 7 lifecycle events, so there is no emission rate to measure. The ledger is a resume buffer, not history. A subscriber that falls outside the bound receives a typed resync, never a short page. The age bound matches the ops tier's existing telemetry horizon (ROUTE_OBSERVATION_RETENTION_MS, 7 days). The id span keeps a cold build that emits one frame per session from growing the tier inside that week. Frames hold refs and counters, so the cap is tens of MB.Derived-identity closure: every changed production file is outside the closure (
devtools schema closure:outforpolylogue/daemon/events.py,polylogue/daemon/cli.py,polylogue/daemon/lifecycle.py,polylogue/operations/route_observation.py,polylogue/cli/commands/diagnostics.py). The derived schema identity does not move.Verification
All runs went through AgentCTL on the exact head
4120d6ca461dunless noted.agentctl job start --workspace /realm/worktrees/polylogue-daemon-reads polylogue verify_quick: job 3506,verify: PASSED exit=0(receipt20260929T182816Z-quick-3743796-0ab2b410).agentctl job start --workspace ... polylogue pytest_focused -- <15 files>(events endpoint, event cursor, route observation, diagnostics, lifecycle, golden parity, daemon CLI, queue health, health-check paths, perf floors, judgment automation, catch-up gate, browser pairing, HTTP security, cold-start bench): job 3509, 963 selected, 1 failed (receipt20260929T182909Z-focused-test-3749815-bb3c5ba9). The one failure is inherited:test_daemon_http_security.py::TestNoTokenLogging::test_no_token_in_log_or_print_callsflagspolylogue/browser_capture/server.py:879, a file this PR does not touch. The same test fails on detached master633ec18ffcwith--on-default-branch(job 3481,1 failed).test_daemon_cli.py::test_cold_build_integrity_fault_stays_blocked_in_running_daemontimed out once on an earlier head under host load (load average ~40). It also times out on detached master633ec18ffc(job 3499,TimeoutError). It passed in job 3509.devtools schema closurereportsoutfor every changed production file.Self-review
Last pass over
git diff origin/master, using thedocs/review/codex-review-guide.mdchecklist:prune_daemon_eventsremains the single enforcement point, called from bothemit_daemon_eventandemit_daemon_events. I grepped every reader ofdaemon_events.api/archive.py:1934andjudgment_automation.pyread the latest judgment event only as a fallback behind the typedjudgment_scheduler_receiptsrow, which the same emit writes in the same transaction, so pruning cannot un-ack an outbox entry.archive_verification.py:3172readsMAX(ts_ms), and the row just emitted always survives its own prune. The run id has one owner,daemon_run_id, and both entry points (run, andwatchthroughrun_daemon_services) go through it.DaemonLifecycle.startnow raisesValueErroron an empty id. Its only production caller passesdaemon_run_id(), which never returns empty._exit_with_outcomeraisesSystemExitonly for nonzero codes, and each early branch returns after it, so anokJSON answer does not fall through into text rendering.--limitwas a cap that changed the answer.read_latency_reportiterates the cursors and keeps only the per-bucket samples that the percentile needs. The writers' retention (ROUTE_OBSERVATION_RETENTION_MSwith its row cap,MCP_CALL_LOG_RETENTION_MS) bounds those samples. The ledger bound never refuses or shortens an answer: a cursor outside it gets the typedaged_outresync.COUNT(*)plus aMIN(id)over thets_msindex on every emit. It now costs oneMAX(id)probe plus a rowid walk over the rows that expired since the last emit.query_events_sincekeeps its single-snapshotBEGIN/ROLLBACK.analyze latencywithoutops.dbisdegraded(ops_db_missing), not empty.analyze latencynow decides a terminal outcome (surfaces/outcome.py). An incomplete drop disposition is the named gapdrop_accounting_incomplete, so the answer isdegradedwith or without rows, and the exit code follows it.uuid4().hex) now keys the lifecycle row and the logging context; before, two ids were minted independently.MAX(id)NULL, so the row bound skips. An empty window givesdegraded, oremptyin a fully accounted in-memory report. Both cases are tested.DaemonLifecycle.startcall site passesrun_id(10 test sites, 1 production site).read_side_dropsandREAD_LIMIT_TRUNCATEDhad no other readers (grep). No docs or generated reference named--limitfor latency.docs/atlas/daemon.mdgained the run-id and bound statements.observed_at_mswithout reading a clock,read_latency_reportruns over rows written byrecord_route_observationandrecord_mcp_call, and the CLI JSON outcome is checked. Each test names its anti-vacuity mutation. Two judgment-automation tests replay 1970-dated outbox receipts next to real-time emits, so they now hold the ledger unbounded through the production injection point, with the reason stated in the fixture. The monkeypatch ofread_side_dropswent away with the function.Compatibility: no shim or alias.
--limitis removed, not deprecated.Residuals
polylogue statusmeasured 1.35-1.44 s on this host (load average 15-43), against a 500/800 ms budget. The import profile names the costs:click_option_groups -> origin_filters -> origin_specs -> parsers.otel_genai -> parsers.base_models(pydantic, about 0.9 s cumulative under load),operation_kernel -> daemon_protocol(0.39 s),daemon_reads -> ... -> archive.query.transaction -> archive_tiers(0.38 s) andreadiness(0.35 s). I tried two cuts: rendering root-help markers lazily, and moving the two OTLP dialect constants out of the parser. Together they cutclick_appfrom 1.17 s to 0.28 s cumulative, but wall time improved only about 5%, because the status path imports the same modules later. I reverted both: the second touches two closure-IN files, which is not worth a moved identity for 5%.degraded, but making drops countable needs a durable counter in the ops tier (ops.py/ops_write.py, closure-IN).TerminationReceiptreconciler from systemd, journal, cgroup and heartbeat evidence) need an ops-tier table (closure-IN DDL) and host adapters. They are not in this PR.tests/unit/daemon/test_daemon_http_security.py::TestNoTokenLogging::test_no_token_in_log_or_print_callsfails identically on master (polylogue/browser_capture/server.py:879). This PR does not touch that file.🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg