Skip to content

chore: Route every CLI mutation and long operation through daemon autho… - #5805

Merged
Sinity merged 3 commits into
masterfrom
batch/polylogue-20260929-033122-ac8747d0/integration
Sep 29, 2026
Merged

Sinity merged 3 commits into
masterfrom
batch/polylogue-20260929-033122-ac8747d0/integration

Conversation

@Sinity

@Sinity Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Batch polylogue-20260929-033122-ac8747d0 on base 31432c0f5dc7.

polylogue-5vps8 Route every CLI mutation and long operation through daemon authority

  • 1. Every retained mutation, control, source, generation, assertion/settings, preview/authorization/apply, re-ingest, rebuild and long-running command lowers to exactly one declared daemon operation an

polylogue-re6s3 Delete the surviving CLI writers and make the layering rule see cli-to-api mutations

  • 1. Every listed command lowers to a declared daemon operation or is declared offline-maintenance (design D8) with an audited guard; none opens a writable tier in-process. 2. polylogue/api is in the CL

polylogue-l65ry Finish CLI replacement and delete predecessor control paths in thematic cuts

  • 1. Selected command families have one semantic implementation; retired execution paths are deleted rather than hidden behind forwarding wrappers.
  1. Existing DSL expressiveness, user-facing options an

Sinity and others added 3 commits September 29, 2026 06:45
- Operation declarations carry the authorization a request must present
  (none, confirmation, preview) and the recovery a lost outcome calls for
  (retry, await-request, reconcile). The daemon's confirmation side table is
  gone; the CLI reports a lost write as typed operation_indeterminate with
  the declared recovery instead of runtime_error.
- The declared ingest operation skips durably excised records instead of
  never settling, and parses cohorts through the same session assembly as
  the live writer, so from-empty, daemon and CLI imports write identical
  sessions.
- A single-part durable mutation reports its receipt_ref, so a replayed
  request names its first execution.
- import --wait follows any ingest to its receipt, not only --demo.
- Ranked delete/tag selections act on each session once.
- Demo seeding is declared as the CLI's one offline writer family.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The shared parse-and-assemble helper lived in revision_backfill and batch,
both members of the derived schema-identity closure, so a refactor moved
the index identity. Compose the same two canonical functions in
daemon_ingest instead and leave the closure files untouched.

The daemon-down matrix now covers `polylogue import` with a real export,
so ingest is no longer exempt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lylogue-20260929-033122-ac8747d0/integration
@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.

@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-29T07:08:33.480159Z 32879ed 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 3307355 into master Sep 29, 2026
2 of 3 checks passed
@Sinity
Sinity deleted the batch/polylogue-20260929-033122-ac8747d0/integration branch September 29, 2026 07:38
Sinity added a commit that referenced this pull request Sep 29, 2026
The ingest input route no longer reserves excised bytes, so a request whose
every input is excised accepts nothing. The operator chose to keep that as a
typed, non-retryable ContentExcisedError refusal (polylogue-u6jyu, option d)
instead of #5805's completed outcome, which relied on publishing the excised
bytes again. The test now asserts the refusal and that the bytes stay gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Sinity added a commit that referenced this pull request Sep 29, 2026
…5696)

## Summary
No publication route can put excised bytes back on disk. The reservation
reads the excision ledger in its own write transaction; an excised hash
gets no reservation, and its staged file is discarded (polylogue-u6jyu).

## Problem
Excision is enforced where rows are written (raw sessions, blob refs,
attachment convergence), but a publisher could still reserve and expose
excised bytes first. The parse-time Antigravity `.pb` snapshot
(`_antigravity_raw_snapshot`) published the blob before any check, so
excised content reappeared on disk with a GC-immune reservation until
the reservation was abandoned.

## Solution
- `BlobPublicationReservationStore.reserve_many` reads `excised_content`
for the batch inside its `BEGIN IMMEDIATE`, reserves only non-excised
receipts, and returns the refused hashes.
- `ArchiveBlobPublisher.flush` discards staged files for refused hashes,
drops their receipt ids, and publishes the rest. Every publisher caller
inherits the refusal. The row-level refusals downstream stay as they
are.

## Verification
Head 0ccc5de (master 64a9bd0 merged).
- `agentctl job start --workspace <wt> polylogue verify_quick` (job
2885, on 30a2c8d, the last source change): `succeeded`.
- `agentctl job start --workspace <wt> polylogue pytest_focused --
tests/unit/storage/test_blob_publication_excision.py
tests/unit/daemon/test_antigravity_conversation_acquisition.py
tests/unit/daemon/test_attachment_convergence_excision.py
tests/unit/daemon/test_operation_protocol.py
tests/unit/pipeline/test_ingest_batch.py
tests/unit/pipeline/test_sidecar_blob_locator.py
tests/unit/pipeline/test_blob_publication_crash_matrix.py
tests/unit/pipeline/test_acquisition_excision_policy.py
tests/unit/security/test_excision.py
tests/unit/security/test_excision_shared_blobs.py
tests/unit/security/test_excision_carrier_reach.py
tests/unit/security/test_excision_revision_reach.py
tests/unit/sources/test_live_batch_support.py
tests/unit/storage/test_revision_replay.py
tests/unit/storage/test_revision_application.py
tests/unit/storage/test_ingest_governance.py
tests/unit/sources/test_location_binding.py
tests/integration/test_daemon_ingest_idempotency.py
tests/integration/test_daemon_ingest_redrive.py
tests/unit/operations/test_ingest_acceptance.py
tests/unit/operations/test_ingest_await_result_contract.py
tests/unit/operations/test_daemon_ingest_convergence.py
tests/unit/operations/test_declared_operation_handlers.py
tests/unit/daemon/test_daemon_operation_route.py
tests/unit/cli/test_import.py` (job 2919, head 0ccc5de): `passed 611,
xfailed 1, failed 3, flaky 1`.
- All three failures are inherited. They fail the same way on a clean
detached master 64a9bd0 (job 2802, `--on-default-branch`: `3
failed`):
`test_revision_replay.py::test_chain_replay_supersedes_equal_frontier_quarantined_membership_head`,
`test_ingest_governance.py::test_membership_that_becomes_eligible_after_preparation_defers_publication`
and
`test_antigravity_conversation_acquisition.py::test_common_live_batch_retries_a_failed_vendor_conversion`
(polylogue-rb7tx).
- The flaky test is
`test_operation_protocol.py::test_cli_import_daemon_ingest_and_from_empty_build_write_identical_material`.
Under xdist load its client await timed out (`QueryTimeoutError`); it
passed when rerun alone, and it passed in job 2888 on the same source.
This PR's changes affect only the refusal and failure paths, and that
test does not take either.
- The renamed
`test_reimporting_an_excised_file_is_a_typed_permanent_refusal` passes
(job 2919).
- Derived-identity closure (`devtools schema closure <file>`): IN are
`pipeline/services/ingest_batch/_models.py`, `sources/decoder_zip.py`,
`sources/live/batch.py`, `sources/source_parsing.py`,
`storage/blob_publication.py`, `storage/sqlite/archive_tiers/archive.py`
and `storage/sqlite/archive_tiers/revision_governance.py`. So merging
this PR moves the index/ops schema identity. It has to land before a
rebuild starts, not during one. Out:
`operations/attachment_convergence.py`, `operations/daemon_ingest.py`,
`pipeline/services/ingest_batch/_core.py`,
`pipeline/services/ingest_batch/_summary.py`, `security/excision.py`,
`storage/ingest_governance.py`.

## Decision: an all-excised re-import is a typed permanent refusal
(reverses #5805's outcome)
#5805's test expected a re-import of an excised file to settle
`completed`. On master that works only because the ingest input route
publishes and reserves the excised bytes again, and admission then skips
the record. With this PR the flush refuses those bytes, so the request
accepts nothing. The operator chose option (d) of polylogue-u6jyu: keep
the typed permanent refusal. The request settles `failed` with error
code `ContentExcisedError`, `retryable: false` and no accepted
reference; nothing is written, and nothing new keeps the bytes from blob
GC. The rejected options were (a) an empty accepted generation, which
would relax durable audit receipt and manifest models; (b) a no-op
`IngestResult` without acceptance, which would change the wire type and
its consumers; and (c) reserving excised bytes on this route, which
would reopen the hole. The test is renamed
`test_reimporting_an_excised_file_is_a_typed_permanent_refusal`. It
asserts the refusal, and it asserts that the re-import adds no source
item and no reservation for the file's hash.

Making the refusal reliable needed one fix (30a2c8d). A request that
failed before acceptance still fenced and settled an attempt it never
created. Settling takes a settled audit read, which fails while the
caller polls the same request, so the refusal was sometimes reported as
`AuditContinuityPendingError` (job 2862). Fencing and settling now run
only after the acceptance write began or a resent request found its
record (`acceptance_attempted`). The same guard covers the stopped and
transient-refusal branches, which had the same pre-acceptance race.

## Residuals
The rest of the security family (qut1/l6v61, dahse, n3xdn, 8k10u, mdlft,
dzk48) is not in this PR; each bead records its state. An excised
sidecar's text, which parse copies into its `tool_result` block, is
still written on a fresh ingest, as on master (polylogue-bgnxh).

## Self-review
I reviewed the complete diff against master 64a9bd0 at head
0ccc5de. The invariant is that no route puts excised bytes back on
disk or back into the index.


**The publication boundary**
- `reserve_many` reads the excision ledger inside its own `BEGIN
IMMEDIATE` and refuses excised hashes. `flush` discards their staged
files.
- `require_published` rechecks the ledger after flush (`excised_now`).
Every refusal is typed (`ContentExcisedError`) or recorded as not
acquired.

**Excision is serialized with every retained write**
- `apply_session_excision`, retained replay,
`apply_raw_membership_classification` and
`write_parsed_for_retained_raw` all run under the store-level
`_retained_replay_exclusion`.
- A batch holds the publisher slot across its transaction, and excision
targets are resolved under that exclusion.

**Each route turns an excised input into a terminal skip, not a retry**
- A ZIP member's bytes that match an excised hash are skipped at decode.
- On the daemon publish path the member is recorded as `REFUSED` with
diagnostic `content_excised`, and never reaches raw admission.
- An Antigravity `.pb` snapshot refused as excised is reported in the
batch's `excised_paths`, not `failed`.
- Excised sidecars keep master's behavior. This PR tried two designs:
redacting the `tool_result` text at write time, which rewrote hashed
content after its identity was bound, and refusing the session, which
dropped the whole session for one sidecar. Both are removed, and the
decision is recorded in polylogue-bgnxh. Since the third merge, master's
sidecar locators (#5815) carry the refusal: a sidecar the pre-check sees
as excised gets `blob_refusal: content_excised`, and
`_settle_sidecar_blobs` gives the same locator to one the flush refuses,
and counts only what the flush published.
- Excised replay attachments are skipped.
- Excised raws settle as skipped, and the reason is durable.


**Merge with master 64a9bd0.** `_core.py` was the only conflict. I
took master's version (#5815's sidecar locators,
`SIDECAR_BLOB_EVENT_TYPES`, the `source_conn` pre-check,
`sidecar_blobs_refused_excised`) and re-applied this PR's non-sidecar
hunks: the `refuse_excised_attachment_blobs` downgrade, the
`ContentExcisedError` session skip with its durable `content_excised`
diagnostic, and the publisher slot held across the batch transaction.
This PR's predecessor sidecar helpers (`_replaced_sidecar_texts`,
`_with_sidecar_blob_hashes`, event-payload `blob_hash` rewriting) are
gone, and nothing references them (`git grep` count 0). Flush sites
master added since the last merge (the hook-evidence, work-event and
raw-artifact writes) go through raw admission after the flush, and
admission raises `ContentExcisedError` at the source-write boundary. The
flush refusal therefore adds no untyped outcome there.

**Sidecar settle fix (85661ff).** Found by
`test_write_session_counts_no_refused_sidecar_blob`: with a publisher
but no `source_conn`, master's locator named a blob the flush then
discarded, and counted it as written. The fix counts after the flush and
gives the typed refusal locator to a sidecar the flush refused.

**Pre-acceptance settle guard (30a2c8d).** Every exit branch of
`execute_ingest_operation` (stopped, transient, generic) checks the
guard. `acceptance_attempted` is set before the acceptance write, so the
path where acceptance committed but the handler raised still fences and
settles. A resent request also sets it. `IngestRedrive` does not go
through this function.

**Checklist (review guide and worker contract).** Consumers updated: all
publisher callers inherit the refusal, and `publication_refused` has
four callers. No compatibility path is added. No cap or timeout:
`_excised_hashes` pages its `IN` list by 500 and reads every row. Tests
assert typed outcomes and counts, not prose. No fixture holds private
data.

🤖 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]>
Sinity added a commit that referenced this pull request Sep 29, 2026
…5850)

## Summary

Makes master's focused suites green again. The baseline run on master
`633ec18ffc` (job 3431, 30 files) had 41 failures and 1 error, and every
other PR was running into them. They come from 20-odd separate causes.
Where production was wrong, this PR fixes production and uses the
failing test as the regression. Where a merged PR had deliberately
changed the contract, it updates the test to the new contract and cites
that PR. Two failures remain, each with a bead and the evidence below.

Beads: polylogue-ouv5f (all eight tests fixed), polylogue-0e6m3,
polylogue-h9da0 and polylogue-wple (audited and noted; their open
criteria are listed under Residuals).

## Problem

Job 3431 (`pytest_focused --on-default-branch`, 30 files, 1539 tests)
reported `passed 1497, failed 41, error 1`. Its failed-test rerun also
crashed: the rerun passed `…::test_x@web-reader[param-…]` back to
pytest, and pytest answered `ERROR: not found`.

## Solution: production defects fixed

| Failure | Cause | Fix |
|---|---|---|
| `test_raw_observation_derivation` ×4,
`test_retained_tool_output_convergence` (Gemini) | For providers with no
assembly spec, `enrichment_dependency_digest` skipped the evidence
digest that every retained seal computes. Every prepared artifact of
those providers therefore read as stale, and `publish` returned False
forever, so Hermes, Antigravity, ChatGPT and Gemini retained raws never
converged. | Every provider digests its evidence, empty or not
(`sources/revision_backfill.py`). |
| `test_observation_runtime::test_structured_raw_only_sidecar…` | An
artifact-scoped identity hashed to the same `{"source": path}` value
that `_old_path_fallback` refuses, so new sidecar evidence never reached
the cache. | The artifact-scoped identity gets its own namespace
(`schemas/source_inference.py`). |
| `test_verification_evidence_lane` |
`reconcile_and_record_abandoned_verify_runs` compared `cache.parent`
(that is, `.cache`) to the checkout, so the test was never true. The
checkout's reconciled runs went to cache-local history, and cache-local
evidence too (#5720), instead of the durable lane. | Compare the
checkout root, `runs_root.parents[2]`. The checkout uses the XDG history
and `verification_evidence_path()`; a relocated cache keeps local files.
|
| `test_web_reader::test_archive_filter_kwargs…` | #5795 gave
`iter_search_summaries` an `actions_only` lane parameter. The count
route still counted every FTS hit for `retrieval_lane="actions"`. |
`count_search_sessions(actions_only=…)` and the count route pass the
lane. New regression:
`test_actions_lane_count_counts_only_sessions_its_search_returns`. |
| `test_command_catalog::test_tool_outcome_help…` | A Click-level
required option refused `--help` before argparse could print it (#5720).
| argparse owns requiredness, and the metavar is `PATH`. |
| idempotence properties (found while fixing the harness) |
`refresh_session_repos*` stamped `repos`, `repo_checkouts` and
`session_repos` with the wall clock, so no rebuild could reproduce them.
| Stamp them with the session's own time, as `_write_repo_edges` does.
New test: `test_refresh_stamps_the_session_time_not_the_wall_clock`. |
| `test_daemon_http_security` | The daemon client that carries the
credential was chained into the receipt call, so the token scan flagged
the receipt. | Bind the client first (`browser_capture/server.py`). No
allowlist entry was added. |
| failed-test rerun | `report_nodeid_to_selector` did not handle
`name@group[param-…]`, the shape that shortened ids take under
loadgroup, and the long-id map stored uncollectible `@group` ids. |
Handle that shape, and record both map sides in selector form
(`devtools/pytest_rerun.py`, `tests/conftest.py`). |
| `test_session_partition_convergence` (fd leak) | The per-thread
connection cache kept every archive a test built until the descriptor
check ran. | The autouse fixture clears the cache at teardown. |
| `test_session_partition_convergence` (`fields_digest`) | #5799's
column was neither projected nor excluded. | Exclude it, with the reason
(`derived/session/input_binding.py`). |

## Solution: tests updated to contracts that merged PRs changed

- `test_import_preflight`: several unidentified trajectories are refused
(#5711); the old test expected ids minted from row position.
- `test_artifact_taxonomy`: a brain sidecar is observed as
`agent_sidecar_meta` schema evidence (#5781), never as a session.
- `test_tool_result_unknown_reason_contract` ×3: a step with no verdict
field is `not_reported` (#5798). A new route covers
`unsupported_construct` with an unmapped status.
- `test_source_laws`: the stand-in parser accounts for its outer records
(#5816).
- `test_revision_replay`: the direct replay binds Codex enrichment
evidence as the retained writer does (#5643).
- `test_retained_tool_output_convergence` (Gemini): the fixture sidecar
is longer than the 40,000 characters the envelope advertises (the #5643
partial-write guard).
- `test_schema_policy_contracts`: FTS triggers are matched by whole
table name (`messages_fts_readiness_binding` is not FTS-backing); the
restart test clears the bootstrap memo as a restart does (#5428).
Deleted `test_every_prior_index_schema_version…`: at fresh v1,
`SCHEMA_VERSION - 1` is 0, which is the "interrupted create" state that
is re-created by design. No prior version exists.
- `test_durable_migrations`: an archive two slots behind gets the typed
refusal from #5806, and the tier is untouched. The docstring of
`apply_declared_durable_migrations` is corrected. Filed as
polylogue-7yq3f.
- `test_schema_validation`: the member schema names `id` (#4856 reports
unnamed fields), and the keys are plain names, so the marker is what
suppresses them.
- `test_synthetic_wire_support::test_chatgpt_witness…`: the part text
also survives on the tool block, so the test drops it there too.
- `test_archive_ingest_shared_raw`: a ZIP member with a malformed record
is `terminal_corrupt_input` (#5823 F039); a census runs once per raw.
- `test_plain_cli_snapshots`: empty is exit 2 and degraded is exit 1
(`surfaces/outcome.py`).
- `test_cross_surface_agreement`, `test_query_composition_laws`: the CLI
reads through a real daemon (#5805). The naive-join mutant lifts the
read authorizer (#5642) the way `attach_readonly_database` does.
- `test_resource_pilot` ×2: parser scratch SQLite (`:memory:` and temp
files) is allowed; any database file or tier is not.
- `test_codex_debt_w1` and the convergence properties: the harness bound
each session's own evidence to message 0 and stamped replayed messages
with the child's values. Since #5826 shares only an identical prefix, no
lineage prefix was shared at all, and the append-prefix laws were
vacuous. A fork now replays its parent's parsed prefix exactly, and its
own evidence moves to the first message it authored. The mutation test's
`_resolve_session_graph` mutant returns `set()` to match the current
signature.
- `test_query_exec_laws` ×4: stub the convergence probe in fake-store
stats tests (#5700), add the `tool_input` projection field, and expect a
second window sized to the remaining limit.
- devtools: `test_verify` stubs the executor,
`test_pytest_suite_cost_plugin` builds the recorder before patching RSS,
`test_verification_terminal_receipts` updates the sizing stub signature,
and `test_verification_result` adds the #5720 `flaky` field.
`test_http_bounded_mutations` adds the #5723 summary read to its test
double.

Derived-identity closure (`devtools schema closure`): these files are
IN: `archive/query/archive_execution.py`, `schemas/source_inference.py`,
`sources/revision_backfill.py`,
`storage/derived/session/input_binding.py`,
`storage/derived/session/repo_observations.py`,
`storage/sqlite/archive_tiers/archive.py`. The rest are out.

## Verification

- Baseline, master `633ec18ffc`, job 3431: `passed 1497, failed 41,
error 1`.
- `agentctl job start --workspace
/realm/worktrees/polylogue-master-green polylogue pytest_focused -- <61
files>`, job 3578, head `a7f4465c56`: `passed 2336, failed 2` after the
in-slot rerun. The first attempt ran under host I/O contention, with
workers in D state. 25 of its 27 first-attempt failures were `Timeout
(>120.0s)`, and every one of those passed when rerun alone.
- `test_web_reader::…searches_from_archive_tiers`: a socket timeout
under the same load. It passed alone in job 3861 (`devtools test: PASSED
exit=0`).
-
`test_supported_routes_validate_selected_schema_and_parser_entry_point`:
inherited, see Residuals.
- Master baseline for the added files, job 3562: `test_query_exec_laws`
×4, idempotence ×7 and mutations ×2 fail on master the same way. All of
them are fixed here.
- Harness consumers and count seams at head `1d3b3545c5`, job 3920 (24
files): `passed 589, failed 1` after the in-slot rerun. The one failure,
`test_inferred_corpus_loop::test_every_supported_inferred_element_reaches_convergence_and_red_twin`,
was a `Timeout (>120.0s)` inside `load_package_catalog` under the same
host load. It passed alone in job 3973 (`devtools test: PASSED exit=0`).
- `verify_quick` on head `1d3b3545c5`, job 3921: `verify: PASSED
exit=0`. The hosted `ci/circleci: quick-gate` passes.
- `verify_quick` on head `a7f4465c56`, job 3579: `verify: PASSED
exit=0`.

## Self-review

I did two passes over the full diff against `master`, using
`docs/review/codex-review-guide.md` and the generic worker-contract
list. Pass 1 found two defects, both fixed in `1d3b3545c5` and
`3ec0a5fa2f`. Pass 2 was clean.

1. ✓ **Siblings and owners.** The actions-lane count was also wrong in
two more places: the facade/daemon seam
`_archive_count_sessions_for_spec` and the daemon `count` mode
(`operations/daemon_reads.py`). Pass 1 found them with `grep -rn
count_search_sessions polylogue` (7 call sites); both are fixed and have
a regression test. The MCP route already reports `total=None` for
actions (`mcp/archive_support.py` `ranked_only`), and `sessions.search`
is lexical only. The enrichment digest has a single owner
(`enrichment_dependency_digest`) used by both the live and the retained
check. Every seal computes the evidence digest unconditionally, the live
enricher included. A search of `polylogue/storage/derived` for
wall-clock stamps found two others: the marker cursor `applied_at_ms`
(operational metadata) and `profiles.now_iso` (materialized-at). Neither
is a semantic column.
2. ✓ **The fix itself.** Pass 1 found that `_replayed_parent_prefix`
would recurse forever on a declared parent/child cycle
(`cycle_candidate=True`). It now tracks the lineage it walks, and picks
the parent revision the way `authoritative_sessions` does.
`count_search_sessions(actions_only=False)` defaults to today's
behaviour for every other caller.
3. ✓ **Memory and limits.** Nothing new grows with the input. The repo
stamp is one indexed `SELECT` per refreshed session. No caps or timeouts
were added.
4. ✓ **Cost per unit.** One predicate on the count query and one
primary-key read per repo refresh. `with_retained_assembly_evidence`
returns at once for providers without assembly evidence
(`sources/retained_assembly.py:470-479`).
5. N/A **Interruption.** No loops, waits or multi-step state changes
were added.
6. ✓ **Ordering and races.** The repo stamp is read inside the
materializer's own transaction, on the same connection that writes the
rows.
7. ✓ **Failure classification.** The reconciler's history and evidence
appends keep their existing `suppress(OSError, ValueError)`.
`verification_evidence_path()` now expands `~`, as the old inline
override did.
8. ✓ **Silent outcomes.** Actions-lane totals now count what the lane
can return. Exit codes follow outcomes (`surfaces/outcome.py`), and the
updated CLI tests assert exit 2 for empty and 1 for degraded.
9. N/A **Cleanup on failure.** Nothing new is acquired.
10. ✓ **Identity and keys.** Artifact-scoped source identity now lives
in its own `{"artifact": …}` namespace, so it can no longer collide with
the retired `{"source": path}` identity. Old cache rows under the path
identity are still refused by `_old_path_fallback`.
11. ✓ **Lossless transforms.** The rerun selector keeps the `[param-…]`
label, and the long-id map now stores both sides in collectible form.
The harness deep-copies the parent messages it replays.
12. ✓ **Degenerate inputs.** A missing session row stamps 0, the
writer's own default. A child with no own messages keeps position-0
evidence. A shared prefix of 0 replays nothing.
13. ✓ **Consumers.** `count_search_sessions` gained an optional keyword;
every test double takes `**kwargs`, and none asserts the exact kwargs
(checked at `test_query_exec_laws.py:1301,1385,2099` and
`tests/infra/archive_store_double.py:255`). The unused `now_iso`
parameters were removed, and `grep` finds no callers passing them.
14. ✓ **Tests and stubs.** Each production fix has a test that goes red
without it. The count tests go 2 → 3 without `actions_only`. The repo
test goes red if the rows are stamped with the wall clock. The
evidence-lane pair covers the checkout and the relocated cache.
`test_rerun_selector_strips_the_xdist_group_suffix` covers the new id
shape. The source-inference test goes red without the separate
namespace. Stubs follow the current signatures: the
`resolve_worker_argument` stub takes `**sizing`, the
`_resolve_session_graph` mutant returns `set()`, and the test double
implements `get_session_summaries`.
15. ✓ **Trust boundaries.** The capture handler binds the
credential-holding client apart from the receipt, and no token-scan
allowlist entry was added. The fixtures are synthetic.

Generic list: (1) criteria are met on production routes (probes and job
3578). The unmet ones name their blockers (4xyn9, 7yq3f, h9da0, 0e6m3,
wple). (2) Siblings: see item 1. (3) No predecessor is kept beside a
replacement. (4) No silent fallback was added. (5) Each new test names
the change that turns it red. (6) The diff, receipts and text carry no
secrets or private data; the paths are worktree scratch paths only.


## Residuals

- polylogue-4xyn9:
`test_supported_routes_validate_selected_schema_and_parser_entry_point`
still fails. The claude-ai v2 coverage witnesses combine mutually
exclusive groups, so 529 of 844 keywords are missing. It fails the same
way on every commit back to #5485 at least. Honoring the exclusions in
coverage mode alone still leaves 319 missing, so this needs a coverage
planner.
- polylogue-7yq3f: catch-up across more than one numbered slot is
refused, and a backup is taken before the refusal. Nothing breaks until
the second migration of a tier ships.
- polylogue-3p8p7 (owned elsewhere): a loose malformed workflow journal
still reads as `workflow_journal` through the lenient retained decode;
the ZIP route is strict.
- polylogue-h9da0: quick-pool xdist width is sized from the slice's
current headroom, not from a per-job share. Two jobs that start together
can both admit a full width. Left open.
- polylogue-0e6m3: the per-cache retention measurements need a scheduled
broad run. Left open.
- polylogue-wple: master already enforces the foreign-interpreter and
foreign-import checks. Detecting copied testmon or verify state is still
open.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
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