Skip to content

feat(daemon): bound the event ledger, read latency whole, share run id - #5843

Merged
Sinity merged 5 commits into
masterfrom
feat/daemon-reads-observability
Sep 29, 2026
Merged

Sinity merged 5 commits into
masterfrom
feat/daemon-reads-observability

Conversation

@Sinity

@Sinity Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Summary

Daemon reads, events and observability residuals from the reindex-2026 daemon-reads group:

  • The SSE replay ledger daemon_events now has a production retention bound (a week, a 250,000-id span), enforced on every emit at O(expired rows) instead of a COUNT(*) scan (polylogue-20d.13.6 S2-2).
  • analyze latency computes percentiles over every sample in the lookback window instead of the newest 1,000 rows, and decides one terminal outcome (polylogue-jtwu.2).
  • One daemon run id is shared by the run's events, its daemon_lifecycle row, heartbeats and the status projection (polylogue-peo AC1).
  • The cold-status benchmark accepts the typed unavailable snapshot that status now returns without a daemon (polylogue-8s70).

Problem

  • DaemonEventRetention defaulted to unbounded and nothing in production installed a bound, so the disposable ops-tier ledger grew with every message.appended (polylogue/daemon/events.py, _RETENTION = _UNBOUNDED_RETENTION at 633ec18). The row bound, once installed, ran SELECT COUNT(*) FROM daemon_events on every emit, and the age bound ran MIN(id) ... WHERE ts_ms >= ? over the ts_ms index, 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 run bound run_id=uuid4().hex[:16] into the logging context (daemon/cli.py:4000), while DaemonLifecycle.start minted a separate uuid4() for the lifecycle row (daemon/lifecycle.py:86). No event joined to its lifecycle row. polylogued watch bound no run id at all.
  • tests/benchmarks/test_cli_cold_start.py asserted exit 0, but polylogue status with 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_RETENTION is the installed bound. max_rows bounds 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 a NOT INDEXED rowid walk that stops at the first in-window row. A cursor below the retained range still gets the typed aged_out resync envelope that feat(daemon): Declare event contracts and qualify route latency with drops #5349 added.
  • route_observation.py: read_latency_report streams both tables from the cursor over the whole window. The writers' own retention bounds the window, not the reader. read_side_drops, READ_LIMIT_TRUNCATED and the --limit option are deleted. RouteLatencyReport.outcome is degraded (drop_accounting_incomplete) when drops are not countable, empty when there are no buckets, and ok otherwise. The CLI prints the outcome and exits with its code. A missing ops.db is degraded (ops_db_missing).
  • daemon/cli.py: daemon_run_id() returns the run id already bound in the logging context, or binds one. polylogued run calls it before its first event, run_daemon_services calls it on entry (so watch and embedded callers are covered), and DaemonLifecycle.start now requires run_id and no longer mints its own.
  • docs/atlas/daemon.md documents the run id and the ledger bound.
  • test_daemon_golden_parity.py: deleted the unused _strip_read_provenance helper, 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.db holds 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: out for polylogue/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 4120d6ca461d unless noted.

  • agentctl job start --workspace /realm/worktrees/polylogue-daemon-reads polylogue verify_quick: job 3506, verify: PASSED exit=0 (receipt 20260929T182816Z-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 (receipt 20260929T182909Z-focused-test-3749815-bb3c5ba9). The one failure is inherited:
    • test_daemon_http_security.py::TestNoTokenLogging::test_no_token_in_log_or_print_calls flags polylogue/browser_capture/server.py:879, a file this PR does not touch. The same test fails on detached master 633ec18ffc with --on-default-branch (job 3481, 1 failed).
  • test_daemon_cli.py::test_cold_build_integrity_fault_stays_blocked_in_running_daemon timed out once on an earlier head under host load (load average ~40). It also times out on detached master 633ec18ffc (job 3499, TimeoutError). It passed in job 3509.
  • devtools schema closure reports out for every changed production file.

Self-review

Last pass over git diff origin/master, using the docs/review/codex-review-guide.md checklist:

  1. ✓ Siblings and owners. prune_daemon_events remains the single enforcement point, called from both emit_daemon_event and emit_daemon_events. I grepped every reader of daemon_events. api/archive.py:1934 and judgment_automation.py read the latest judgment event only as a fallback behind the typed judgment_scheduler_receipts row, which the same emit writes in the same transaction, so pruning cannot un-ack an outbox entry. archive_verification.py:3172 reads MAX(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, and watch through run_daemon_services) go through it.
  2. ✓ The fix itself. DaemonLifecycle.start now raises ValueError on an empty id. Its only production caller passes daemon_run_id(), which never returns empty. _exit_with_outcome raises SystemExit only for nonzero codes, and each early branch returns after it, so an ok JSON answer does not fall through into text rendering.
  3. ✓ Memory and limits. The deleted --limit was a cap that changed the answer. read_latency_report iterates the cursors and keeps only the per-bucket samples that the percentile needs. The writers' retention (ROUTE_OBSERVATION_RETENTION_MS with 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 typed aged_out resync.
  4. ✓ Cost per unit. A prune used to cost a COUNT(*) plus a MIN(id) over the ts_ms index on every emit. It now costs one MAX(id) probe plus a rowid walk over the rows that expired since the last emit.
  5. N/A Interruption. No new loops or multi-step state. The prune runs inside the emit's existing transaction.
  6. ✓ Ordering and races. The prune and the insert share one transaction and one connection. query_events_since keeps its single-snapshot BEGIN/ROLLBACK.
  7. ✓ Failure classification. analyze latency without ops.db is degraded (ops_db_missing), not empty.
  8. ✓ Silent outcomes. analyze latency now decides a terminal outcome (surfaces/outcome.py). An incomplete drop disposition is the named gap drop_accounting_incomplete, so the answer is degraded with or without rows, and the exit code follows it.
  9. N/A Cleanup on failure. Nothing is acquired.
  10. ✓ Identity and keys. One run id (uuid4().hex) now keys the lifecycle row and the logging context; before, two ids were minted independently.
  11. N/A Lossless transforms. None.
  12. ✓ Degenerate inputs. An empty ledger has MAX(id) NULL, so the row bound skips. An empty window gives degraded, or empty in a fully accounted in-memory report. Both cases are tested.
  13. ✓ Consumers. Every DaemonLifecycle.start call site passes run_id (10 test sites, 1 production site). read_side_drops and READ_LIMIT_TRUNCATED had no other readers (grep). No docs or generated reference named --limit for latency. docs/atlas/daemon.md gained the run-id and bound statements.
  14. ✓ Tests and stubs. The tests drive production routes: the real emit prunes against its own observed_at_ms without reading a clock, read_latency_report runs over rows written by record_route_observation and record_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 of read_side_drops went away with the function.
  15. N/A Trust boundaries. No secrets or files are involved.

Compatibility: no shim or alias. --limit is removed, not deprecated.

Residuals

  • polylogue-8s70 stays open. Cold polylogue status measured 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) and readiness (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 cut click_app from 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%.
  • polylogue-jtwu.2 J2-1 is not fully met. Drop counters live in each emitter's process, so a reader never sees the daemon's or a finished CLI's drops. The answer is now honestly degraded, but making drops countable needs a durable counter in the ops tier (ops.py/ops_write.py, closure-IN).
  • polylogue-peo AC2-6 (next-start TerminationReceipt reconciler from systemd, journal, cgroup and heartbeat evidence) need an ops-tier table (closure-IN DDL) and host adapters. They are not in this PR.
  • Inherited: tests/unit/daemon/test_daemon_http_security.py::TestNoTokenLogging::test_no_token_in_log_or_print_calls fails 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

Sinity and others added 5 commits September 29, 2026 20:15
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@Sinity
Sinity enabled auto-merge (squash) September 29, 2026 18:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-29T18:52:22.787230Z 4120d6c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Sinity
Sinity merged commit 2175f9b into master Sep 29, 2026
3 checks passed
@Sinity
Sinity deleted the feat/daemon-reads-observability branch September 29, 2026 18:51
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant