Repository navigation
fix(core): Close sixteen live P1 findings across seven areas - #5413
Conversation
`source-conservation` reported three blocking terms for healthy archives. `frontier_orphan` counted every raw not bound to a *current* frontier member, so a configured source ingested at hash A, changed, and ingested again at hash B made A a blocking orphan even though the forward classifier already types it `revision_superseded`. The term means "outside the configured frontier"; a raw at a configured canonical path is inside it, whatever its revision. `content_mismatch` joined `raw_session_memberships` to `sessions` on `raw_id` alone, so a grouped JSONL/ZIP raw emitting two sessions paired each membership with every sibling and the off-diagonal pairs disagreed by construction. The witness is per membership: its normalized content must be the content of one of the sessions that raw materialized. A `MUTABLE_SQLITE` member's ownership test was vacuous: `digest_matches` was true for any archived raw at the member's path whenever `logical_sha256` was set, so conservation reported success for a database whose current logical revision had never been archived. That member's `content_sha256` already *is* the canonical logical export's digest (`observe_source_members` -> `sqlite_member_revision`), and acquisition retains exactly those export bytes, so the ordinary digest comparison is the logical-revision comparison. Also index the acquired rows by canonical source path once. The member loop rescanned every raw for every member: 100k configured files against 100k archived raws is ~10^10 Python-level comparisons per run. Verification: `devtools test tests/unit/maintenance/test_source_conservation.py` passes (exit 0). Anti-vacuity executed by restoring the file at base 17566b0 and rerunning the same selection: 3 failed -- `assert 1 == 0` (frontier_orphan), `assert 2 == 0` (content_mismatch, exactly the two off-diagonal pairs), `assert 0 == 1` (frontier_unacquired). Each new test also pins the opposite direction so a blanket pass cannot stay green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
…arent accounting `parent-session-accounting` returned ERROR for two states that are not defects, and OK for one that is. An `authority-contradicted` edge (polylogue-foee) records that acquired hook evidence named a different parent for the same child, so the inferred edge lost while both evidence sources stayed retained. Its null `resolved_dst_session_id` is the recorded verdict -- the parent question was answered by the winning edge, which the census counts under its own identity -- but the census read only `resolved_dst_session_id IS NOT NULL` and typed the loser `materialized_unresolved`, making every ordinary Codex hook/transcript conflict a blocking ERROR. `QUARANTINED` stays blocking: per `TopologyEdgeStatus` that status means the graph SHAPE is wrong, which is a real structural problem, and `test_materialized_parent_with_unresolved_reference_is_blocking` pins it. Materialization and durable source survival are independent axes. A parent present only in rebuildable `index.db.sessions`, with no retained raw in `source.db`, was typed `materialized` and counted in `source_available_total` -- the report contradicted its own `ParentReferenceEvidence.source_available` rule -- so derived-only damage satisfied the gate. It now types `materialized_without_source` and warns: no read is broken today, but the evidence that would rebuild it is gone and the report has to say so. Verification: `devtools test tests/unit/maintenance/test_archive_verification.py tests/unit/maintenance/test_parent_session_accounting.py` passes (exit 0). Anti-vacuity executed by neutralising each decision in place (excluded subset forced to zero; the no-source branch disabled; the old disposition-list `source_available_total` restored) and rerunning: 2 failed -- `assert 0 == 1` on `excluded_reference_count`, with the census again reporting `disposition='materialized_unresolved'` for the overruled edge, and `assert 1 == 0` on `materialized_parent_total`. Both tests also assert the intact/winning direction so neither can be a blanket pass. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
A saved view marked `watch=true` with an expression such as `sessions where near:text:"query compiler"` passed validation because `QuerySemanticPredicate` survives the durable payload round trip. It is not executable: `ArchiveCanonicalPlanEvaluator.evaluate` puts the restored predicate straight into `SessionQueryPlan.boolean_predicate`, and `_boolean_predicate_clause` has no semantic branch, so it reaches `raise TypeError(f"unsupported Boolean query predicate: ...")`. That happens inside the standing-query convergence stage, so one such watch failed the whole stage on every tick and stopped unrelated watches from advancing. Serializability is not executability. Refuse the predicate at definition time -- including nested under NOT/AND/OR/EXISTS -- so this is the typed refusal the surface can answer with, rather than a recurring convergence failure with no owner. Verification: `devtools test tests/unit/archive/test_watch_definition.py tests/unit/daemon/test_standing_queries.py` passes (exit 0). Anti-vacuity executed by disabling the guard in place and rerunning: `test_semantic_watch_definition_is_refused` fails with `Failed: DID NOT RAISE WatchDefinitionError`. `test_semantic_predicate_breaks_the_evaluator` stays green under that mutation on purpose -- it drives the production lowering and asserts `TypeError: unsupported Boolean query predicate`, so the refusal test cannot decay into an assertion about its own wording. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
`claude-opus-5` and `claude-sonnet-5` are declared in
`MODEL_CREDIT_RATES` -- the archive bills sessions on them -- but the
sole vendored LiteLLM catalog had no row for either, direct or routed.
`PRICING.get("claude-opus-5")` returned `None`, so `estimate_cost`
returned 0.0, `compute_session_cost` downgraded the breakdown to
`unknown`, and every session on the current model reported an unknown
API-equivalent total.
Rates follow the same relation the credit table already documents
(credits are twice the dollar price per million, divisor 15): Opus 5
$5/$25 per million in/out, Sonnet 5 $2/$10, cache read at a tenth of
input and 5-minute cache write at 1.25x, matching every neighbouring
Anthropic row. Inserted as text beside their predecessors so the
vendored file stays byte-identical elsewhere.
`_LIST_PRICES` now covers both, and a new
`test_every_credited_model_has_an_api_price` makes the *class* of gap
visible instead of only the two instances: any model with a subscription
credit rate and no catalog price is named.
Verification: `devtools test tests/unit/core/test_current_model_pricing.py`
passes (exit 0). Anti-vacuity executed by restoring the catalog at
17566b0 and rerunning the same selection: 5 failed (pytest-report.json;
the rerun step's "ERROR: not found" lines are the >100-char nodeid
rewrite, not a selection mistake) --
`AssertionError: claude-opus-5 is absent from the catalog`,
the same for `claude-sonnet-5`, both subscription-credit parametrisations,
and `test_every_credited_model_has_an_api_price`.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
`_canonical` returned ordinary dicts and lists, so a content-addressed identity was not actually fixed: a consumer could save `definition.ref_text`, mutate `definition.content`, and have the same object produce a different ref -- and any receipt persisted before the mutation disagreed with every later serialization. `EvaluationWorld.resolved_bounds` and `world_id` had the same hole. The canonical payload is now frozen all the way down through `FrozenMapping` (a `dict` subclass, so `json.dumps`/`hash_payload`/`isinstance(x, dict)` are unchanged) and `FrozenSequence`. `ResultEnvelope` accepted any runtime string as `value_state` and accepted a concrete `value` behind `unknown`/`unavailable`/`redacted`, so `to_dict()` emitted both and consumers had to decide for themselves whether the value was usable. The vocabulary is now closed and a non-`known` state must carry no value, matching the `EvidenceObservation` invariant. `TypedReceiptEnvelope` validated only its own declared privacy, so a secret unpromoted ad-hoc definition embedded in a `private`/`audit` receipt serialized its content for durable audit persistence with no retention or excision metadata. Classification now follows the content carried: `effective_privacy_class` is the stricter of the two. `ImprovementLoopContract.compatible_with` compared `state_ref.kind` while comparing the scheduler ref whole, so `workspace:curriculum-state` and `workspace:recovery-state` were "compatible" -- the exact per-loop state fork `require_shared_loop_contract` exists to reject. Verification: `devtools test tests/unit/core/test_analysis_contracts.py tests/unit/insights/measurement/test_public_claims.py tests/unit/storage/test_public_claims_projection.py` passes (exit 0). Anti-vacuity executed by reverting all four decisions in place and rerunning: 4 failed, each `Failed: DID NOT RAISE` on its own law. Every new test also asserts the permitted direction (a valueless non-known state, a retained promoted secret definition, an ephemeral receipt, a genuinely shared state ref, and that the frozen payload still round trips through `json.dumps`), so none can be a blanket refusal. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
Two independent failures made the drift signal wrong in both directions.
`detect_drift` never resolved `$ref`. A `{"$ref": "#/$defs/Provenance"}`
node is a Mapping with no `properties` and a permissive default
`additionalProperties`, so every legitimately declared nested field under
one was reported as `Unexpected` and ingest recorded spurious `new_field`
observations for ordinary browser-capture and Codex payloads and for
`allOf` wrappers. The walk now carries the root document and follows
local pointers; an external or unresolvable ref observes nothing, because
refusing to observe a node whose declarations are not in hand is correct
while reporting all of it as drift is not.
A dynamic-key container skipped its entries entirely. The KEY of a
dynamic map is not a named field -- that suppression is right -- but
`additionalProperties` declares the structured node under it, so a new
provider field such as `mapping..new_provider_field` in a ChatGPT export
is real drift that ingest can silently discard. The key stays suppressed
and the value is walked.
Verification: `devtools test tests/unit/schemas/test_drift_walk_resolution.py
tests/unit/schemas/test_provider_reconciliation.py
tests/unit/storage/test_archive_tiers_source_write.py
tests/unit/browser_capture/test_capture_jobs.py` passes (exit 0).
Anti-vacuity executed by disabling ref resolution and restoring the
unconditional dynamic-container `continue`, then rerunning:
`assert ['Unexpected field: provenance.captured_at'] == []`,
`assert ['Unexpected field: payload.anything'] == []`, and
`assert [] == ['Unexpected field: mapping.k1.new_provider_field']`.
Each test also pins the opposite direction, so neither change can become
"report everything" or "report nothing".
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
`reconcile_provider_matrix` consulted `counts.conserves` only on the zero-diff branch. A pass that inventoried two of four admitted frontier members and reported one changed package version therefore took the `generated` branch, produced no blocker, and let the matrix exit successfully while omitting half the declared corpus -- which is exactly what the conservation term exists to catch. A changed version is not evidence that the denominator was consumed. Conservation is now checked first, for every outcome. Verification: `devtools test tests/unit/schemas/test_provider_reconciliation.py` (with the drift-walk, terminal-carrier and capture-job selections) passes (exit 0). Anti-vacuity executed by moving the conservation check back after the changed-version branch and rerunning: `assert 'generated' == 'failed'`. The test's conserved half reports the same changed version and must stay `generated`, so the check cannot become a blanket refusal. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
`artifact_observation_id` is stable by (source, path, index) and carries
no raw identity, so when a path holding a terminal failure carrier is
replaced by different bytes, the new raw's ordinary classification lands
on the same `artifact_id`. `terminal_carrier_overwrite_predicate`
compared artifact kinds only, so it suppressed that update even though
the newer raw had already won the upsert's timestamp/rowid ordering. The
newest coordinate was then left with no artifact receipt of its own,
which the raw-frontier check reports as
`source_raws_without_accepted_head` and which blocks catch-up.
A terminal refusal is a durable statement about the bytes it refused, not
a permanent claim on the coordinate. The guard now applies only when the
conflicting rows name the same raw -- which is the case its own docstring
describes ("re-observing the SAME coordinate re-derives an ordinary path
classification").
Verification: `devtools test tests/unit/storage/test_archive_tiers_source_write.py`
(with the drift-walk, reconciliation and capture-job selections) passes
(exit 0). Anti-vacuity executed by removing the `raw_id` comparison and
rerunning: the coordinate keeps the OLD raw and `terminal_corrupt_input`
(`assert ('f5f4920930a...', 'terminal_corrupt_input') == ('0223d699452...',
'session_export')`). The test's second half re-observes the SAME raw with
an ordinary classification and the terminal carrier must survive, so the
guard does not become "any ordinary observation wins".
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
The production extension calls `update()` then `checkpoint()` (`browser-extension/src/background/runtime.js`). For a job already at a terminal retry state, `_retention_after_retry` therefore ran while the job held no timeline event and recorded `eligible`/`timeline_authoritative=false`. Checkpointing is the only route that ever creates a timeline event -- no client posts to the event route and the `created` event carries no conversation ref -- so the event appended a moment later never revised that verdict, and `gc()` deleted the fresh checkpoint, its receipts and that very timeline once the lease expired. Authoritativeness is a fact about retained evidence, not a client policy choice, so it is recomputed after the checkpoint's event exists. Nothing else about the retention object is touched: a `held` job keeps its hold and an `active` job keeps its state. Verification: `devtools test tests/unit/browser_capture/test_capture_jobs.py` (with the drift-walk, reconciliation and terminal-carrier selections) passes (exit 0). Anti-vacuity executed by making the recomputation a no-op and rerunning: `assert False is True` on `retention.timeline_authoritative` after the checkpoint. The test's second half drives the terminal update with no checkpoint at all and the job must still record `false`, so the recomputation stays conditional on retained evidence. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
Two places where the retained-inputs decision says more than its evidence
supports.
§5 concluded that "there is nothing for a retirement pass to reclaim in a
correctly-converged archive". §7 measured one synthetic Codex rollout --
an append-only log. A declared `MUTABLE_SQLITE` member has no delta
representation: `_default_policy` selects `SQLITE_LOGICAL_EXPORT` and
`retained_content_revision` returns that export's own blob hash, so
content addressing collapses only identical revisions and 40 continuous
observations of a database whose title column changes once per
observation retain roughly 40 full copies of the unchanged rows. That is
the logical-containment case §5's own rule 1 defines, so the unqualified
conclusion could rule out a path its measurement never covered. Scoped to
the material class measured, with the unmeasured one named.
R6 ("disappearance is an observation, never a delete") had no defect,
owner or production-route regression anywhere in the document.
`LiveSourceWatcher._watch_changes` skips `Change.deleted` outright
(`sources/live/watcher.py:510`) and the one existing absence statement,
`source_missing`, is recomputed from the live filesystem on every run, so
no durable absence observation is ever written and a latest-value
projection keeps presenting the prior value as current. Added D6 and V8
so the requirement reads as a residual rather than a decided one.
Verification: prose only, no code change. Every cited path and line was
read at 17566b0; `devtools verify --quick` and `devtools render all
--check` results are reported with the branch.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
`gate mypy` went red on the new `FrozenMapping` aliases and on the test that drives them: four blanket `type: ignore[assignment]` comments were unused, and the test reached `setdefault`/`append` through the declared `Mapping[str, JsonValue]` type and splatted a `dict[str, object]` into `ResultEnvelope`'s typed fields. Only `popitem` and `__ior__` have base signatures the refusal cannot satisfy, so only those two carry an override, with the reason stated. The test now casts at the two mutation points and builds envelopes through a typed local helper. Verification: `devtools gate mypy` -> "Success: no issues found in 2988 source files". `devtools verify --quick` at head is 21/22 gates ok with only the inherited `gate atlas` red on `docs/atlas/daemon.md` -- byte-for -byte the same failure and the same 263/40/1 citation counts as at base 17566b0, measured in a detached checkout. `devtools test tests/unit/core/test_analysis_contracts.py` (with five sibling selections) passes, exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
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. |
|
Warning Review limit reachedNext included review available in 27 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (19)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65b8fb96b3
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
## Summary Lands the verified part of ChatGPT worker 11's pass over Codex review findings in `polylogue/sources` (parts 7-8) and `polylogue/schemas` (beads polylogue-1tyq5.96, .97, .86, .87; 71 findings). 22 fixes are kept, each with a regression test that fails on master. The other 49 are recorded below as fixed-already, stale or not reached. ## Problem The kept findings reproduce on current master: - OTel GenAI: a structured, numeric or boolean `gen_ai.tool.call.result` becomes an empty result block, and span fields outside the projected set (end time, links, trace state, flags, dropped counts) are missing from `otel_span_evidence`. - Revision backfill: the frozen-shard lookup hand-formats `origin:native_id` without the identity helper's strip, so a padded native id raises `ShardRefusedError`. The owned-generation emptiness probe validates the final index layout, so a generation with deferred secondary indexes reports schema skew instead of the nonempty-generation refusal. - Source cut: staging can be created inside a bound source root. Two SQLite ids sharing a stem (`state.first`, `state.second`) both map to `state.jsonl`. Any sibling directory with the request prefix is deleted as orphaned staging. Archive-member items are checked against the whole ZIP's size and digest, so every intact archive cut is reported as mutated. - Source census: a directly configured file counts as zero candidates, symlinks and FIFOs drop out of the denominator, `inspection_bytes` claims read I/O it never measured, and an lstat fault silently drops a candidate from the production walk. - Schemas: the audit's package exemption misses provider aliases (`XAI`, `GROK`). A content-bearing property name beside an existing dynamic map is kept as a literal property, and the annotation audit skips named fields retained beside a collapsed map. `SchemaCommitPrivacyError` and `SchemaArchiveEvidenceError` escape the devtools `ValueError` boundaries as tracebacks. The module schema CLI resolves the archive from the generation directory. Relation annotations are cached by object id, so an in-place edit is ignored. The drift walk drops an allOf base's union branch, loses the dynamic-keys marker across unannotated conjuncts, and discards `$ref` sibling declarations. ## Solution - `sources/parsers/otel_genai.py`: a non-string result is serialized as sorted JSON (absent stays absent); evidence carries `unprojected_span_fields`. - `sources/revision_backfill.py`: the lookup uses `identity_law.session_id`; the probe opens with `validate_index_layout=False`. - `sources/source_snapshot.py`: `execute_source_cut` refuses a destination overlapping a bound directory root (resolved paths). The SQLite export name appends `.jsonl`. Staging carries an owner marker naming the request; reclamation deletes only marked, non-symlink directories, and the marker is removed before publication. `reacquire_candidate` hashes each archive member by name from the copied ZIP, opening each ZIP once. - `sources/source_walk.py`: the census resolves file-or-directory like `_resolve_source_paths`, takes supported-name entries before the regular-file filter, records walk errors, and reports `candidate_bytes` (renamed and documented as entry size). `_walk_source_paths` keeps a supported-name candidate whose lstat fails, so the per-file read records the failure on the cursor instead of the scan reporting it as absent; unsupported names are filtered before any lstat. - `schemas/audit/workflow.py`: canonicalizes the provider before the subject lookup. `schemas/audit/checks.py`: counts named fields beside a collapsed map. - `schemas/generation/dynamic_keys.py`: beside an existing map only individually dynamic names fold into it. - `schemas/operator/commit.py`, `schemas/sampling_db.py`: both refusal types derive from `ValueError`. - `schemas/operator/schema_inference.py`: passes the configured `ArchiveLocation`. - `schemas/synthetic/relation_solver_runtime.py`: the cache key is a SHA-256 of the canonical JSON, parsed from that snapshot. - `schemas/validator.py`: the allOf base selects its union branch first, a dynamic-keys marker on any conjunct survives the merge, and `$ref` siblings join the resolved node. Worker changes not landed: - 96.02 (OTel parent edges): master now declares OTel `message_parent` as a derived topology capability in `_otel_genai_spec`, the finding's second option, so removing the parent mapping would contradict the declared contract. Recorded as fixed-already. - The worker's lstat fix propagated the error out of `_walk_source_paths`, so one vanished or unreadable entry (even an unsupported temp file) aborted the whole source scan. Replaced by keeping the candidate for the per-file failure route. - The worker's `reacquire_candidate` refused duplicate ZIP member names, which the cut itself publishes; it now reads by name as the cut does. ## Verification - `agentctl job start polylogue verify_quick --workspace /realm/worktrees/salvage-w11` → job 2600 at head 152a132: `verify: PASSED exit=0`. - `agentctl job start polylogue pytest_focused --workspace /realm/worktrees/salvage-w11 -- <24 test files>` → job 2602 at head 152a132: `805 passed, 3 failed`. The 3 failures (`test_common_live_batch_retries_a_failed_vendor_conversion`, `test_dynamic_key_maps_do_not_emit_drift_warnings`, `test_antigravity_brain_metadata_sidecar_is_rejected_from_live_and_schema_routes`) fail the same way on unmodified master (job 2551). The earlier head 649039f gave `807 passed, 3 failed` (job 2550); 152a132 merges #5798, #5779 and #5704, which overlap this diff only in `source_walk.py` (#5798's directory-link cycle guard, compatible with the lstat change), `revision_backfill.py` and `commit.py` (disjoint hunks). - Proof that the tests fail without the fixes: the branch's test files copied onto unmodified master 1beb2e5 and run with the same selection as job 2551: `29 failed, 781 passed`: all 26 new or changed regression cases for the kept findings plus the 3 master failures above. The two control parameters (`padded_native_id=False`, `deferred_indexes=False`) pass on both heads, as intended. Selection: `tests/unit/core/test_synthetic_relations.py tests/unit/devtools/test_schema_commit_command.py tests/unit/devtools/test_schema_lab_commands.py tests/unit/schemas/test_audit_declared_packages.py tests/unit/schemas/test_drift_walk_resolution.py tests/unit/schemas/test_promotion_monotonicity.py tests/unit/sources/parsers/test_otel_genai.py tests/unit/sources/parsers/test_otel_genai_contract.py tests/unit/sources/test_origin_specs.py tests/unit/sources/test_revision_backfill.py tests/unit/sources/test_source_snapshot.py tests/unit/core/test_schema_validation.py tests/unit/core/test_audit.py tests/unit/core/test_schema_laws.py tests/unit/schemas/test_historical_payload_resolution.py tests/unit/schemas/test_source_structure_witnesses.py tests/unit/sources/test_agent_memory_documents.py tests/unit/sources/test_antigravity_source_acquisition.py tests/unit/sources/test_artifact_taxonomy.py tests/unit/sources/test_source_laws.py tests/unit/sources/test_source_root_admission.py tests/unit/daemon/test_antigravity_conversation_acquisition.py tests/unit/pipeline/test_resilience.py tests/unit/pipeline/test_ingest_outcomes.py` ## Self-review - **Sibling sites.** `with_suffix` on a source id occurs once in `source_snapshot.py`; the other export branch already appends. Staging reclamation has one caller. The session-id format in `_required_shard_prepared_rows` was the only hand-built `origin:native_id` on the shard path. Both devtools schema boundaries catch `ValueError`, so rebasing the two refusal types covers `schema commit`, `schema generate` and every other caller; no intermediate `except ValueError` on the sampling or commit path swallows them (the drift check catches `Exception` and reports WARNING, unchanged). `SourceInferenceError` and `SchemaFrontierError` are other `RuntimeError` refusals; they belong to not-reached findings and are left as residuals. - **Cancellation and shutdown in loops.** No new loop waits or sleeps. `reacquire_candidate` holds its ZIP handles in an `ExitStack`, so an exception closes them. - **Unbounded reads.** Member verification streams in 1 MiB chunks rather than `archive.read`. The relation cache serializes the annotation list it already held in memory. - **Fail-open fallbacks and compatibility shims.** None added. `inspection_bytes` is renamed, not aliased; it had no production reader. A crashed staging directory without a marker is kept rather than deleted (fail closed). The overlap guard refuses rather than relocating staging. - **Removed symbols.** `SourceRootCensus.inspection_bytes` is gone; its only reader was a test, updated here. No monkeypatch target was removed. - **Tests prove the production route.** The tests drive `parse_payload`, `backfill_historical_revision_evidence`, `execute_source_cut`/`reacquire_candidate`, `census_source_root`, `_resolve_source_paths`, `audit_provider`, `merge_observed_structure_schemas`/`check_annotation_coverage`, the `schema_commit`/`schema_generate`/`schema_inference` entry points, `_RelationConstraintSolver` and `SchemaValidator.validate`. `census_source_root`, `reacquire_candidate` and `cut_source_inputs` have no production caller yet (unfinished code, not obsolete); the tests exercise them directly. ## Derived-identity closure These changed files are in `docs/plans/schema-closure-baseline.json`, so the derived identity moves and this must land before the fresh rebuild: `polylogue/schemas/generation/dynamic_keys.py`, `polylogue/schemas/sampling_db.py`, `polylogue/schemas/validator.py`, `polylogue/sources/parsers/otel_genai.py`, `polylogue/sources/revision_backfill.py`, `polylogue/sources/source_snapshot.py`, `polylogue/sources/source_walk.py`. The OTel result-block text and evidence payload are hashed parser output, so OTel sessions re-derive. ## Per-finding dispositions Counts: 22 fixed, 0 dropped as not real, 21 fixed-already, 2 stale, 0 refuted, 26 not reached. Per bead: .96 4 fixed / 7 fixed-already / 1 stale / 13 not reached. .97 8 / 0 / 1 / 4. .86 7 / 12 / 0 / 6. .87 3 / 2 / 0 / 3. | key | disposition | evidence | test | |---|---|---|---| | 96.01 #4724 `polylogue/sources/parsers/local_agent.py:236` | fixed-already | polylogue/sources/parsers/local_agent.py:564-565 (displayContent is extracted before the empty-message guard.) | - | | 96.02 #5530 `polylogue/sources/parsers/otel_genai.py:250` | fixed-already | worker fix rejected: `_otel_genai_spec` in polylogue/sources/origin_specs.py now declares `message_parent` as a derived topology capability (span.parentSpanId -> parent span output:0), the finding's second option; the parent mapping and the capability contract agree | - | | 96.03 #5530 `polylogue/sources/parsers/otel_genai.py:297` | fixed | polylogue/sources/parsers/otel_genai.py `_messages_for_span`: a non-string decoded result is serialized as sorted JSON; an absent attribute stays absent | tests/unit/sources/parsers/test_otel_genai.py::test_dispatch_preserves_structured_tool_results | | 96.04 #5530 `polylogue/sources/parsers/otel_genai.py:389` | fixed | polylogue/sources/parsers/otel_genai.py `_span_evidence_event`: every span field outside the projected set is kept under `unprojected_span_fields` | tests/unit/sources/parsers/test_otel_genai.py::test_dispatch_retains_unprojected_span_fields_in_evidence | | 96.05 #5584 `polylogue/sources/prepared_jsonl.py:556` | not reached | polylogue/sources/prepared_jsonl.py:734 (Numeric native IDs remain excluded from metadata capture. The f95 carrier file differs from the upload; no partial metadata edit is supplied.) | - | | 96.06 #5610 `polylogue/sources/prepared_jsonl.py:649` | not reached | polylogue/sources/prepared_jsonl.py:650 (Per-Grok-session scratch rows still allocate pages in the shared sealed preparation database. A real scratch-lifetime/store separation remains, not a VACUUM workaround.) | - | | 96.07 #5610 `polylogue/sources/prepared_message_sink.py:539` | not reached | polylogue/sources/prepared_message_sink.py:1205-1209 (The streaming ChatGPT mapping reader still presents a leading UTF-8 BOM to ijson. No reader/fixture change is supplied.) | - | | 96.08 #4969 `polylogue/sources/retained_assembly.py:236` | not reached | polylogue/sources/retained_assembly.py:230-236 (Windows sidecar coordinates still use host-dependent Path handling. Cross-platform coordinate parsing remains.) | - | | 96.09 #5548 `polylogue/sources/revision_backfill.py:905` | not reached | polylogue/sources/revision_backfill.py:4442-4551 (Retryable preparation/infrastructure exceptions are still converted into semantic census failure text. The complete worker-to-controller failure route is not changed.) | - | | 96.10 #5548 `polylogue/sources/revision_backfill.py:941` | not reached | polylogue/sources/revision_backfill.py:1332-1357 (Prepared authority promotion still needs the coherent membership-outcome update, including previously observed authority. No half-update is supplied.) | - | | 96.11 #4993 `polylogue/sources/revision_backfill.py:1626` | not reached | polylogue/sources/revision_backfill.py:2326-2414;3396-3408 (Frozen evidence still constructs prepared-session shards inline on the controller path. Worker preparation/transport ownership remains.) | - | | 96.12 #4993 `polylogue/sources/revision_backfill.py:1626` | not reached | polylogue/sources/revision_backfill.py:2326-2414;3396-3408 (Duplicate cited coordinate, distinct storage/lifetime obligation: unused historical prepared shards are still materialized. No cleanup/lifetime fix is supplied.) | - | | 96.13 #5585 `polylogue/sources/revision_backfill.py:2352` | fixed-already | polylogue/sources/revision_backfill.py:2427-2465;2819-2880 (Census uses raw-ID pages and resumes/rebinds expiring source frames.) | - | | 96.14 #4993 `polylogue/sources/revision_backfill.py:2402` | fixed | polylogue/sources/revision_backfill.py `_required_shard_prepared_rows`: keys the lookup through `identity_law.session_id`, the helper `prepare_session_shard` uses | tests/unit/sources/test_revision_backfill.py::test_frozen_inactive_generation_replays_through_sealed_session_shards[padded_native_id=True] | | 96.15 #5435 `polylogue/sources/revision_backfill.py:2530` | fixed | polylogue/sources/revision_backfill.py `_owned_generation_is_empty`: the read-only probe opens with `validate_index_layout=False` | tests/unit/sources/test_revision_backfill.py::test_owned_nonempty_generation_refuses_cold_build_deferral[deferred_indexes=True] | | 96.16 #5594 `polylogue/sources/revision_backfill.py:2752` | not reached | polylogue/sources/revision_backfill.py:2490-2542;2828 (The raw-ID page bound does not bound membership-join fanout. Paging the joined result without losing logical-source memberships remains.) | - | | 96.17 #4993 `polylogue/sources/revision_backfill.py:2842` | fixed-already | polylogue/sources/revision_backfill.py:4135-4165;4345-4374 (Required-shard refusal for lineage slicing has an explicit canonical-write degradation; the strict prepared-carrier path remains retryable.) | - | | 96.18 #4982 `polylogue/sources/revision_backfill.py:2921` | not reached | polylogue/sources/revision_backfill.py:4411-4415 (The terminal global FTS corruption condition can still fail a selected replay unit because of unrelated existing corruption. No narrower verification-scope change is supplied.) | - | | 96.19 #4382 `polylogue/sources/revision_backfill.py:3028` | fixed-already | polylogue/sources/revision_backfill.py:6335-6343 (Spill reparse passes the archive source connection to replay-safe enrichment.) | - | | 96.20 #4941 `polylogue/sources/revision_backfill.py:3279` | fixed-already | polylogue/sources/revision_backfill.py:6310-6319;6335-6343 (Both spill routes recover the original source path and pass it into enrichment.) | - | | 96.21 #5432 `polylogue/sources/revision_backfill.py:3710` | fixed-already | polylogue/sources/revision_backfill.py:4927-4955 (Prefetch hits are removed before representative selection and executor dispatch.) | - | | 96.22 #4275 `polylogue/sources/source_acquisition_components.py:370` | not reached | polylogue/sources/source_acquisition_components.py:447 (Plain-file admission evidence is not yet carried across every sibling acquisition route. ZIP/Drive provenance closure remains.) | - | | 96.23 #4174 `polylogue/sources/source_acquisition_components.py:516` | not reached | polylogue/sources/source_acquisition_components.py:623-689 (ZIP split-payload indexing still needs correction for grouped inline documents. No acquisition-file edit is supplied.) | - | | 96.24 #4634 `polylogue/sources/source_parsing.py:49` | not reached | polylogue/sources/source_parsing.py:38-49 (Decoded positive session evidence can still be overridden by the pathname classification. No admission-policy edit is supplied.) | - | | 96.25 #4883 `polylogue/sources/source_parsing.py:303` | stale | polylogue/pipeline/services/archive_ingest.py and `parse_sources_archive` were removed by #5787 (mutations route through the daemon); no API sequential writer assigns a generic raw ID | - | | 97.01 #4452 `polylogue/sources/source_parsing.py:452` | not reached | polylogue/sources/source_parsing.py:469 (Antigravity vendor prepass and saved JSON exports can still yield competing copies. Precedence and retained provenance must be solved together.) | - | | 97.02 #4452 `polylogue/sources/source_parsing.py:455` | not reached | polylogue/sources/parsers/antigravity/census.py;polylogue/sources/source_parsing.py:408 (Antigravity source census still lacks the saved export-document role. The role and its consumers are not changed.) | - | | 97.03 #4452 `polylogue/sources/source_parsing.py:455` | stale | the sequential API writer (`parse_sources_archive`) that skipped the evidence gate was removed by #5787 | - | | 97.04 #4732 `polylogue/sources/source_root_admission.py:58` | not reached | polylogue/sources/source_root_admission.py:48 (Ancestor-only refusal does not exclude a foreign archive nested below a selected directory. Discovery pruning plus explicit refusal accounting remains.) | - | | 97.05 #4441 `polylogue/sources/source_snapshot.py:866` | fixed | polylogue/sources/source_snapshot.py `execute_source_cut`: refuses a destination whose staging parent is inside, or which contains, a bound directory root (resolved, so aliases count) | tests/unit/sources/test_source_snapshot.py::test_cut_refuses_staging_inside_source_before_mutating_it | | 97.06 #4945 `polylogue/sources/source_snapshot.py:917` | fixed | polylogue/sources/source_snapshot.py `execute_source_cut`: appends `.jsonl` to the full source id instead of replacing its suffix | tests/unit/sources/test_source_snapshot.py::test_sqlite_cut_keeps_dotted_source_ids_distinct | | 97.07 #4441 `polylogue/sources/source_snapshot.py:969` | fixed | polylogue/sources/source_snapshot.py: staging carries an owner marker naming the request; `_reclaim_orphaned_staging` deletes only marked, non-symlink directories; the marker is removed before publication | tests/unit/sources/test_source_snapshot.py::test_cut_reclaims_only_staging_it_owns | | 97.08 #4441 `polylogue/sources/source_snapshot.py:992` | fixed | polylogue/sources/source_snapshot.py `reacquire_candidate`: archive-member items are verified against the member bytes read by name from the copied ZIP | tests/unit/sources/test_source_snapshot.py::test_archive_cut_reacquires_member_bytes_and_detects_member_mutation | | 97.09 #4432 `polylogue/sources/source_walk.py:54` | fixed | polylogue/sources/source_walk.py `census_source_root`: a directly configured file is the one candidate, as in `_resolve_source_paths` | tests/unit/sources/test_origin_specs.py::test_root_census_includes_a_directly_selected_file | | 97.10 #4432 `polylogue/sources/source_walk.py:60` | fixed | polylogue/sources/source_walk.py: the metric is renamed `candidate_bytes` and documented as candidate entry size, not read I/O (the finding's second option) | tests/unit/sources/test_origin_specs.py::test_root_census_includes_a_directly_selected_file | | 97.11 #4788 `polylogue/sources/source_walk.py:149` | fixed | polylogue/sources/source_walk.py `census_source_root`: supported-name entries are taken before the regular-file filter; links and FIFOs count as unsupported | tests/unit/sources/test_origin_specs.py::test_root_census_accounts_for_rejected_nonregular_candidates | | 97.12 #4788 `polylogue/sources/source_walk.py:151` | fixed | polylogue/sources/source_walk.py `_walk_source_paths`: an uninspectable supported-name candidate stays in the walk so its per-file read records the failure on the cursor; the census records it as unexplained | tests/unit/sources/test_origin_specs.py::test_source_walk_keeps_uninspectable_candidate_and_census_records_it | | 97.13 #4879 `polylogue/sources/sqlite_snapshot.py:344` | not reached | polylogue/sources/sqlite_snapshot.py:406;polylogue/sources/live/watcher.py:1286 (Physical watcher tokens can remain stale when acquisition itself establishes an idle WAL. Snapshot/watcher cursor rebasing must be changed together.) | - | | 86.01 #5411 `polylogue/schemas/audit/workflow.py:59` | fixed | polylogue/schemas/audit/workflow.py `_package_not_required_reason`: canonicalizes the provider token before the subject lookup | tests/unit/schemas/test_audit_declared_packages.py::test_audit_aliases_preserve_declared_package_exemptions | | 86.02 #4835 `polylogue/schemas/generation/dynamic_keys.py:27` | fixed-already | polylogue/schemas/generation/dynamic_keys.py:35-71 (Required arrays are recursively canonicalized before structure hashing.) | - | | 86.03 #5277 `polylogue/schemas/generation/dynamic_keys.py:194` | fixed | polylogue/schemas/generation/dynamic_keys.py `_merge_observed_structure_pair`: beside an existing map only individually dynamic names fold into it; static names stay | tests/unit/schemas/test_promotion_monotonicity.py::test_observed_merge_rehomes_content_keys_beside_an_existing_dynamic_map | | 86.04 #5277 `polylogue/schemas/generation/dynamic_keys.py:195` | fixed | polylogue/schemas/audit/checks.py `check_annotation_coverage`: named fields retained beside a collapsed map are still counted | tests/unit/schemas/test_promotion_monotonicity.py::test_collapsed_object_keeps_retained_fields_visible_to_annotation_audit | | 86.05 #4828 `polylogue/schemas/generation/workflow.py:119` | fixed-already | polylogue/schemas/generation/workflow.py:99-105 (Provider and input provider tokens are canonicalized before selection.) | - | | 86.06 #4836 `polylogue/schemas/generation/workflow.py:185` | fixed-already | polylogue/schemas/generation/workflow.py:175-193 (Source witness overflow is propagated to the schema extension and manifest lower bound.) | - | | 86.07 #4835 `polylogue/schemas/generation/workflow.py:185` | fixed-already | polylogue/schemas/generation/workflow.py:165-178 (Reused versions retain prior exact structure witnesses.) | - | | 86.08 #5444 `polylogue/schemas/operator/commit.py:62` | fixed | polylogue/schemas/operator/commit.py: `SchemaCommitPrivacyError` derives from `ValueError`, the command boundary's refusal type | tests/unit/devtools/test_schema_commit_command.py::test_schema_commit_renders_typed_refusals_as_json[privacy] | | 86.09 #4828 `polylogue/schemas/package_publication.py:46` | fixed-already | polylogue/schemas/package_publication.py:36-46 (The publication snapshot enumerates all retained files, not JSON alone.) | - | | 86.10 #4837 `polylogue/schemas/packages.py:106` | fixed-already | polylogue/schemas/packages.py:105-111 (The requested historical-key read is already present. No migration or compatibility code is added by this batch.) | - | | 86.11 #4837 `polylogue/schemas/runtime_registry.py:764` | fixed-already | polylogue/schemas/runtime_registry.py:762-790 (Refresh takes maxima across prior manifest, prior schema, and incoming coverage counters.) | - | | 86.12 #4836 `polylogue/schemas/runtime_registry.py:776` | fixed-already | polylogue/schemas/generation/dynamic_keys.py:74-127 (The capped source-witness partition excludes shorter archive structure IDs; archive IDs are retained without this cap.) | - | | 86.13 #4838 `polylogue/schemas/runtime_registry.py:816` | fixed-already | polylogue/schemas/runtime_registry.py:909-919 (Retained historical packages pass through witness/counter synchronization before publication. No migration is added.) | - | | 86.14 #4854 `polylogue/schemas/sampling_db.py:66` | fixed | polylogue/schemas/operator/schema_inference.py `cli_main`: passes `ArchiveLocation.resolve(config.archive_root)` | tests/unit/devtools/test_schema_lab_commands.py::test_schema_module_cli_preserves_configured_archive_location | | 86.15 #4854 `polylogue/schemas/sampling_db.py:318` | fixed | polylogue/schemas/sampling_db.py: `SchemaArchiveEvidenceError` derives from `ValueError` | tests/unit/devtools/test_schema_commit_command.py::test_schema_commit_renders_typed_refusals_as_json[archive_evidence]; tests/unit/devtools/test_schema_lab_commands.py::test_schema_generate_handles_missing_archive_evidence | | 86.16 #4828 `polylogue/schemas/source_inference.py:559` | fixed-already | polylogue/schemas/source_inference.py:569-591 (An explicitly selected file is resolved before non-following file-type inspection.) | - | | 86.17 #4847 `polylogue/schemas/source_inference.py:612` | fixed-already | polylogue/schemas/source_inference.py:643-689 (Unrecognized logical-export filenames are bound using the export header member.) | - | | 86.18 #4899 `polylogue/schemas/source_inference.py:640` | not reached | polylogue/schemas/source_inference.py:679 (A recognized basename can still win over an authoritative logical-export header. Header-first acquisition identity remains.) | - | | 86.19 #4936 `polylogue/schemas/source_inference.py:763` | not reached | polylogue/schemas/source_inference.py:1549 (ZIP sidecars still enter unconditional export-array expansion, unlike equivalent plain structured documents. No ZIP strategy change is supplied.) | - | | 86.20 #4936 `polylogue/schemas/source_inference.py:1267` | not reached | polylogue/schemas/source_inference.py:SourceEvidenceRecipe (The source-evidence recipe still permits reuse of pre-envelope-preservation cache output. Must change with the actual observation semantics, not silently accept the old cache.) | - | | 86.21 #4847 `polylogue/schemas/source_inference.py:1273` | fixed-already | polylogue/schemas/source_inference.py:1384-1406 (Logical-export DDL is reconstructed for declared not-null and primary-key column metadata.) | - | | 86.22 #4923 `polylogue/schemas/source_inference.py:1298` | not reached | polylogue/schemas/source_inference.py:1373 (Live SQLite table/column observations still lack one explicit read transaction covering the complete observation.) | - | | 86.23 #4923 `polylogue/schemas/source_inference.py:1301` | not reached | polylogue/schemas/source_inference.py:1373 (Read-only WAL input without SHM still needs a writable, WAL-preserving temporary snapshot adapter. Immutable main-image fallback would lose evidence and is not added.) | - | | 86.24 #4847 `polylogue/schemas/source_inference.py:1334` | not reached | polylogue/schemas/source_inference.py:_collect_database_schema_candidate (Identical database reacquisitions still retain path-derived logical-source identities and double-count evidence. No guessed native identity or broad deduplication is added.) | - | | 86.25 #4634 `polylogue/schemas/synthetic/relation_solver_runtime.py:80` | fixed | polylogue/schemas/synthetic/relation_solver_runtime.py `_parsed_annotations`: keyed by a SHA-256 of the canonical JSON and parsed from that snapshot | tests/unit/core/test_synthetic_relations.py::test_relation_solver_honors_in_place_annotation_changes_between_generations | | 87.01 #4912 `polylogue/schemas/validator.py:110` | fixed | polylogue/schemas/validator.py `_schema_branch_for_value`: the allOf base selects its own union branch before merging | tests/unit/schemas/test_drift_walk_resolution.py::test_validation_selects_a_sibling_union_before_allof_observation | | 87.02 #4912 `polylogue/schemas/validator.py:114` | fixed | polylogue/schemas/validator.py `_schema_branch_for_value`: an explicit dynamic-keys marker on any conjunct survives the allOf merge | tests/unit/schemas/test_drift_walk_resolution.py::test_validation_preserves_dynamic_annotation_across_unannotated_conjuncts | | 87.03 #4912 `polylogue/schemas/validator.py:116` | not reached | polylogue/schemas/validator.py:309 (The observation-only allOf merge is still reused by empty-array normalization and can lose type constraints. The three drift-walk edits do not claim to solve this.) | - | | 87.04 #5413 `polylogue/schemas/validator.py:125` | fixed | polylogue/schemas/validator.py `_resolve_local_ref`: `$ref` sibling declarations join the resolved observation node | tests/unit/schemas/test_drift_walk_resolution.py::test_validation_keeps_local_ref_sibling_declarations | | 87.05 #4829 `polylogue/schemas/validator.py:307` | fixed-already | polylogue/schemas/validator.py:514-609;polylogue/pipeline/services/validation_runtime.py:57-66 (PayloadValidation retains the chosen probe samples/results and consumers use them without another full validation.) | - | | 87.06 #4830 `polylogue/schemas/validator.py:344` | fixed-already | polylogue/schemas/validator.py:528-565 (Rejected candidates stop on the first invalid record; only the initial fallback candidate is completed if no candidate accepts.) | - | | 87.07 #4830 `polylogue/schemas/validator.py:368` | not reached | polylogue/schemas/validator.py:587-597 (Accepted historical schema selection still preserves package_default as its reason and can cause false unseen_shape classification.) | - | | 87.08 #4830 `polylogue/schemas/validator.py:368` | not reached | polylogue/schemas/validator.py:587-597 (Duplicate cited coordinate, separate review comment: accepted historical resolution still needs distinct truthful classification. No reason-enum/interface change is supplied.) | - | ## Residuals - 26 findings stay not reached and open in their beads (listed above). - 86.10 is fixed-already, but the fix it asked for is a dual read of the old key `omitted_current_structure_witness_count` in `schemas/packages.py`. Whether committed packages still need that read is a separate cleanup. - The source-cut and census functions are exercised only by tests until an acquisition owner calls them. - Three focused tests fail identically on master (see Verification); they are not touched here. 🤖 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]>
|
Closing out open Codex review threads on this PR (evidence checked against master at ef10e59):
Resolving the fixed, stale and refuted threads; tracked threads stay open. |
Summary
Sixteen live P1 review findings closed across seven small areas — archive, maintenance, mcp, core, schemas, browser_capture, docs — from a triage of all 69 anchored findings in those briefs.
24 STALE, 35 LIVE, 10 WONTFIX / needs-owner.
The one with immediate consequence
The Claude 5 family had no prices.
claude-opus-5andclaude-sonnet-5are both declared inMODEL_CREDIT_RATES, but neither had a direct or routed row in the vendored catalog —PRICING.get('claude-opus-5')returnedNone. In an archive whose purpose includes honest cost accounting, the current models were costing nothing.The durable half is
test_every_credited_model_has_an_api_price: the defect was not "two models are missing", it was that nothing required the two lists to agree. Verified after the fix: 10 credited models, 0 missing prices.Four fail-open holes in the analysis contract kernel
Each mutation produced
DID NOT RAISEon its own law:_canonicalreturned plaindict/list, so mutatingdefinition.contentafter readingref_textchanged the refResultEnvelope(value_state='unknown', value=42)constructed successfully, andvalue_stateaccepted arbitrary stringsTypedReceiptEnvelope.__post_init__read onlyself.privacy_class, so a secret unpromoted definition inside a private/audit receipt constructed andto_dict()serialized its contentcompatible_withcomparedstate_ref.kindwhile comparingscheduler_refwhole, soworkspace:loop-stateandworkspace:recovery-statewere compatibleSource conservation
Four findings, one commit:
digest_matcheswas vacuously true for every raw at a mutable member's path —or (member.logical_sha256 is not None and str(source_path) in {str(root)}). A MUTABLE_SQLITE member'scontent_sha256already is the logical export digest, so the plain comparison was the logical-revision comparison all along.frontier_orphan, though the forward classifier types itrevision_superseded(assert 1 == 0).content_mismatch == 2— the two off-diagonal pairs of a raw_id-only join (assert 2 == 0).Also fixed
parent_session_accounting—source_available_totalsummed a disposition set including_MATERIALIZED, contradicting the row's ownsource_availableproperty; deleting a parent'sraw_sessionsrow left both totals at 1. Now typesmaterialized_without_source.watch_definition—compile_watch_definition('sessions where near:text:"..."')compiled a semantic predicate that_boolean_predicate_clausecannot lower, reproducingTypeError: unsupported Boolean query predicatethrough the real evaluator. Now refused at definition time.detect_driftsilently acceptedmapping.k1.new_provider_field(dynamic-map values never walked) and falsely reportedprovenance.captured_at(local$refnever resolved).provider_reconciliation—if changed: generatedprecededelif not counts.conserves: failed, so a receipt inventorying 2 of 4 admitted members with a changed version reportedgenerated(assert 'generated' == 'failed').artifact_observation_idhashes only (source_name, source_path, source_index), so a replacement raw collides with the old terminal carrier and a kind-only guard suppressed the update; the coordinate kept the old raw and its refusal.browser-extension/src/background/runtime.js:182-183(update then checkpoint); the terminal update recordedtimeline_authoritative: Falseand the later checkpoint never revised it.Declines worth reading
Several declines are better outcomes than the fixes would have been:
AUTHORITY_CONTRADICTEDonly. Declined forQUARANTINED: perTopologyEdgeStatusthat status means the graph shape is wrong, and an existing test deliberately pins a writer-quarantined self-parent cycle as blocking.planted_count > 0, so a witness can reportplanted_count=0, conserved=true. The reviewer's exclusion-list narrowing was declined because_route_conservation_exclusionsdocuments a deliberate partition that could not be falsified without driving generator→receipt→parser end to end. The durable fix is named instead: require a non-zero denominator for any route claimingconserved.existing_accepted_raw_id, but the named harm (downgrading a byte-governed head) has no concrete input: a DOM capture head already carriesaccepted_frontier_kind='semantic'._ENVELOPE_KEYSrequires all six fields simultaneously; the reviewer named no artifact with that shape and the declared taxonomy has none.Verification
Rebased onto master.
devtools verify --quick→ exit 0, 25/25 gates green. (At the lane's original base this was 21/22 with the then-inheritedgate atlasred, byte-identical at base and head; fix(storage): Close seventeen live P1 review findings in the storage tier #5408 has since fixed it.)devtools render all --check→ exit 0,grep -c 'out of sync'= 0.devtools gate mypy→ 0, no issues in 2,988 files.devtools testbatches, all PASSED, covering every changed file plus the neighbours of each change — validator neighbours, terminal-carrier consumers, browser-capture receiver contract, standing queries.Nine anti-vacuity mutations executed in place, each restored. One deserves note:
test_semantic_predicate_breaks_the_evaluatorstayed green by design under the refusal mutation, because it drives the production lowering and asserts the underlyingTypeError— anchoring the refusal to its cause rather than its wording.Schema closure
IN:
archive/query/watch_definition.py,core/raw_failure_evidence.py,schemas/validator.py. Out: the other seven.index:752d44b9…→49a426e9…ops: unchangedThe index identity moves, so this must land before a fresh rebuild starts, never during one. Membership unchanged, so no
--update. Other lanes are moving the same value concurrently — re-measure after rebase rather than pinning this.Scope
Declared expansion:
polylogue/archive/(watch_definition.py,semantic/data/litellm_model_prices.json).archive.mdwas an assigned brief butarchive/was absent from the written scope list; it is not in the excluded set. Alsotests/unit/storage/test_archive_tiers_source_write.py— tests are in scope, and thecore/predicate it covers has its only consumers instorage/. No production storage file was touched.Collisions, not edited
cli/read_view_registry.py(missingorchestrationview) ·storage/.../write.py+archive.py(ArchiveMessageRowtoken fields) ·storage/derived/session/profile_cost.py+queries/model_usage.py(ModelUsageTotalspartial lane) · an additive source migration +blob_integrity+daemon/backup(content_identityceiling) ·agent_integration/spec.py.Timing collision, deliberately respected: three LIVE
source_inferencefindings change source-inference admission or cache keys and would have invalidated a liveschema_sourcescensus mid-flight. Left unimplemented for that reason as well as blast radius.Residuals
session-summary,action-evidence,aggregate-with-evidence,file-evidence,cost-rollup) are rejected bymcp_query_projection_names()yet shipped in thequerytool description and three executable recipes. An agent followingresume-sessiongetsinvalid_argumentat its first query. Needs a scope expansion intoagent_integration/plus a check binding every RecipeStep projection to the live vocabulary.blob-reference-closurereports ERROR with no supported route to clear it. Needs an owner decision between a guarded additive recovery and a daemon convergence stage.source_inferencegaps: a declared Codex database with a removed logical table typesunsupportedinstead of attributable drift; fact artifacts and sidecars carryingsessionIdshare a logical source id with the transcript; observing a retained logical export losesdeclared_type/NOT NULL/PK positions; a WAL-onlyALTER TABLEtakes a structure-cache hit because_cache_keyhashes only the main file.dynamic_keysnon-monotonic field loss, measured: 256 properties survive one merge, all 256 lost on the next. What a third merge should do is a semantics decision that moves generated packages.🤖 Generated with Claude Code
https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy