Repository navigation
chore: Use one retained-input route for every file size - #5834
Merged
Sinity merged 34 commits intoSep 29, 2026
Merged
Conversation
The cold build's own source-baseline.json owns the rebuild denominator. Remove WantedSourcePolicy, WantedSourceReceipt, RebuildPreflightReceipt, their build/write/load/preflight functions, the cold build's published-receipt validation, and their tests and docs. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
A streamed Codex rollout is walked twice (lookahead, then materialization). Every streamed input was pickled into the parse's scratch SQLite index and unpickled on each pass. Streams whose decoded records fit an 8 MiB retained byte estimate now replay from a list; a larger stream spills every record, the retained head first, to the same index as before. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
The append-kill regression test forced its restart deferral with POLYLOGUE_LIVE_WATCHER_PARSE_STAGE_WARM_TIMEOUT_SECONDS. #5691 retired the warm deadline, so the knob does nothing, the first restart page admits the tail, and the test's all-DEFERRED assertion fails. Force the deferral with a failing preparation worker instead, the event that still schedules a retry, so the no-false-DUPLICATE check keeps exercising a pending retry. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
An explicit --cold-build-index build promoted once its source baseline was retained, so a session the active index served from a retained raw outside the baseline (a manual import, a deleted transcript) vanished from every read. Promotion now compares the candidate with the active generation and refuses with ColdBuildCoverageError, a blocked settlement reason active_coverage_incomplete, leaving the active generation serving. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Session excision now resolves the Claude Code tool-results/ and gemini-cli tool-outputs/session-<id>/ sidecar raws a session owns (by the join's own rules: tool_result tool_id stem or a matched sidecar event filename) from each transcript's retained source_path, and seeds every retained revision into the revision closure. Files a sibling transcript owns, and files no transcript claimed, stay. Plan and receipt count source_sidecar_rows. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
mypy rejected reusing `retained` in _parse_records, where a world_state branch binds the same name to a dict. The whale retention docstrings now describe the budgeted in-memory tier and its disk spill. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
…hunk inline A submission fault after a delivered pool result replayed the whole chunk in-process (pool:1, inline:1, inline:2, inline:3) and ran forced-process work in the coordinator. A pool that cannot accept a raw now yields a typed retryable result for that raw; a broken pool is replaced for raws it never accepted; a worker death is retryable instead of a parser defect; a stall refuses unsubmitted raws instead of dropping them. Validation keeps its chosen process mode instead of falling back inline. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Remove hermes_root, browser_capture_spool_path (and every --spool option), hook_sidecar_dir, hook_provider, drive_credentials_path, drive_token_path and antigravity_language_server with their env vars, nix option, callers, tests and docs. Hermes resolves from its own HERMES_HOME; the capture and hook spools live under the archive root; Drive files sit at their XDG locations; the language server is found on PATH, in the vendor's /usr/share install, or in the Nix store. The config loader refuses each removed key. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Two valid producer endpoints decide the session pair, so the messages are no longer traversed first. A disk-backed prepared session answers its occurred_at extrema from its stored rows instead of decoding every message; the answer is read from the rows as they are, so a changed timeline still changes the derived pair. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
… identity Owned-file debt events (oversize, unreadable, less complete than inline) name sidecars the join resolved to the transcript, so excision claims them; only no_owning_* debt is ownerless. The gemini-cli scope directory is now derived from the chat identity's sessionId prefix instead of scanning the project's tool-outputs, and the scope query streams. Fixes a mypy reassignment of the directory variable. Tests now cover pointer-named and slug-named sidecars owned only through the session's sidecar events. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
… lowerings The resident and disk-backed lowerings could disagree on a leaf whose provider id repeats, both marked every occurrence of a chain id, and a second pass read the first pass's storage-default leaf as producer evidence and flipped explicit path=False values. The meaning now lives in sources/active_branch.py: the marked leaf occurrence walks each occurrence's own parent (nearest earlier occurrence, else the last), only chain occurrences are marked, and a storage-default leaf carries a private active_leaf_fallback marker so lowering is idempotent. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
The append kill test forced the restart page to defer with a 1 ms parse warm window. polylogue-slc55 removed that deadline and its setting, so the page now prepares and admits the tail, and the test failed on its stale premise. It now asserts the current contract: the restart admits exactly the six messages, and a later page finds nothing owed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
The outbox had no enqueue caller: nothing wrote a whale receipt, so the startup and periodic drains only listed an empty directory. Large inputs are admitted by the ordinary retained-input route; the separate whale lifecycle this outbox recorded no longer exists. The module, its drains, tests, pattern baseline entry and daemon doc sentence go together. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
prepare_jsonl_blob admitted sessions only when a caller supplied a callback, and its Grok and collected branches relied on the retained finalizer to apply the rule. It now applies the positive-evidence rule on every branch before any callback, the retained finalizer no longer repeats it, and the rule's docstring names its owners instead of a stale caller list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
The only ledger regression bounded traced memory, which a sum-based next_ordinal leaves green. The new test records alternating dispositions, then guards the recorded outcomes and materialized runs so any recount raises, and checks conservation afterwards. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Also realign the tests that named removed override keys. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
The resident normalizer moves beside its disk form in prepared_message_sink.py instead of a new module, so the derived-identity closure does not grow; the fallback marker is serialized for messages only (it was also written into attachment JSON, which has no such field). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
…losure sources/live/cold_build.py is in the derived index identity closure, so the coverage check there moved the index schema identity. The check now lives in operations/cold_build_coverage.py and the daemon settles through promote_cold_build_covering_active_index, one writer call; cold_build.py is back to its base content. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Source discovery, runtime config resolution and the agent-integration installer now share hermes_home(), so a blank HERMES_HOME means the default everywhere. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
…ool alone A broken pool fails every raw in flight. With one raw held the death is attributable and stays a parser defect, so a deterministic kill is not retried forever; with several it is nobody's in particular, so each is retryable. The preparation owner seals every carrier as admitted, and the Grok no-callback test now expects the refusal every publishing route makes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
…rker A sealed revision's storage-default leaf marker was copied onto the merged cohort's messages, so when the latest revision's leaf had been a default the lowering treated the merge's own leaf choice as one too and inferred no active path. The merge now clears the marker with the leaf flag. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
A submission that fails because the pool is shut down or broken leaves the raw retryable; any other refusal (its arguments cannot reach a worker) repeats on every pass, so it is a parser defect instead of an endless retry. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
…lylogue-20260929-130016-35798596/integration # Conflicts: # polylogue/sources/prepared_merge.py # tests/unit/sources/test_prepared_merge.py
…s' into batch/polylogue-20260929-130016-35798596/integration
…5' into batch/polylogue-20260929-130016-35798596/integration
…g' into batch/polylogue-20260929-130016-35798596/integration # Conflicts: # docs/maintenance.md
…h' into batch/polylogue-20260929-130016-35798596/integration
…0' into batch/polylogue-20260929-130016-35798596/integration # Conflicts: # tests/unit/sources/test_live_ingest_kill_recovery.py
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sinity
enabled auto-merge (squash)
September 29, 2026 15:05
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sinity
deleted the
batch/polylogue-20260929-130016-35798596/integration
branch
September 29, 2026 15:09
Sinity
added a commit
that referenced
this pull request
Sep 29, 2026
…#5846) ## Summary The fresh build must never keep the wrong input or report a file it did not admit. This change covers seven reindex-2026 beads, grouped by mechanism. | Group | Bead | Outcome | | --- | --- | --- | | Admission outcomes | polylogue-3p8p7 | Retained replay decodes JSONL strictly, over the same complete-record prefix the live path worker parses. A decode refusal settles as terminal corrupt input with a complete census receipt. | | Admission outcomes | polylogue-xf8qp | Corrupt and truncated captures are settled exclusions (`corrupt_input`), not admissions. The batch metrics, the intake adapter, canonical ingest and the attempt disposition all agree. | | ZIP/blob ownership | polylogue-ihq32 | One function, `retained_blob_source_candidates`, decides which source window proves a retained blob. Backup recoverability and raw-derivation restoration both call it. | | ZIP/blob ownership | polylogue-0y17g | Raw derivation restores an absent ZIP-member blob from its container, through acquisition's ZIP admission. | | ZIP/blob ownership | polylogue-zrb9y | A `<container>:<member>` path is split only at a real ZIP container, in blob integrity, archive debt, ZIP reacquisition and backup. | | ZIP/blob ownership | polylogue-ltj6c | One ZIP member refusal-debt record, `<zip>:#<ordinal>:<member>` with a typed reason, for both content-identity and foreign-origin refusals. | | Limits | polylogue-qlvyu | The 512-per-message in-memory sandbox attachment cap is removed. So is its sibling, the directory-asset size refusal on the ChatGPT route. | polylogue-5hcbg and polylogue-8j9rh were already delivered by #5834 (c950478). This PR does not touch them. ## Problem - **3p8p7.** Replay decoded known-provider JSONL leniently (`_parse_one_raw`, `_parse_stream_raw`, and `prepare_retained_jsonl_artifact` without `strict_jsonl_records`). A rebuild therefore published a session missing a malformed record that live intake had refused. Strict decoding alone livelocked the census: a census worker's error crossed the thread boundary as a string and was rebuilt as `RuntimeError`, which recorded a `failed` receipt, and `uncensused_historical_revision_raw_ids` re-selects failed receipts on every pass. - **xf8qp.** The truncated-not-growing branch of `_ingest_full_records_archive` records `TERMINAL_CORRUPT_INPUT` but left the path in the succeeded set. The in-writer terminal decode branch did the same. The intake outcome was therefore `ADMITTED`, and the batch counted the bytes as ingested. A Claude Code capture with a malformed record also failed `claude_semantic_frontier_for_prefix`, and its cursor write went stale every pass. That made the page `RETRYABLE` forever, reproduced by the new adapter test. - **ihq32 / 0y17g.** Backup (`_source_recoverability_proofs`) and raw derivation (`direct_source_windows`) decided windows separately. Raw derivation read no legacy-append window and no ZIP member (it refused with `container_member`). Backup's direct-file proof read only a whole unchanged file, capped at `MAX_UNCOMPRESSED_SIZE` (`source_too_large`). - **zrb9y.** `blob_integrity._path_is_container_member` was `":" in path`, and `_source_path_availability`, `archive_debt._source_artifact_exists` and `zip_reacquisition_payload` all fell back to a first-colon split. As a result, a deleted loose file whose name holds a colon, with an existing directory prefix, reported its source as available. - **ltj6c.** Content-identity refusals were debt on the ZIP path (`_settle_zip_member_refusals`), while foreign-origin refusals were per-member debt. That is two authorities for one concern. - **qlvyu.** The in-memory ChatGPT route kept 512 sandbox attachments per message and reported the rest as degraded, although that route already holds the whole message in memory. ## Solution - `prepared_jsonl.terminal_decode_evidence` is now the single rule for which decode failures are terminal, shared by live intake and replay. `batch_support.jsonl_parse_prefix_size` is the single rule for which prefix a strict parse reads. It leaves out only an unterminated tail, and live preparation now reads it too. Replay reads the tail without scanning the whole blob (`jsonl_parse_prefix_size_of_handle`). - `RetainedParseFailure` carries the decode kind across the census worker boundary, and `PreparedRetainedInput.parser_decode_failure` carries it for prepared inputs. `_settle_terminal_decode_refusal` records the failure evidence, the parse-failed state and a complete receipt. The failure artifact is not session-parsable, so `raw_membership_census_rows` reports the raw as terminal on later passes. The dead `prepare_retained_jsonl_carrier`, which had no caller and carried a string error, is deleted. - `_ArchiveFullWriteResult.settled_exclusions`, `_FullIngestResult.settled_exclusions` and `LiveBatchMetrics.settled_exclusion_paths` replace the `no_session*` fields, and each exclusion carries a reason from `SETTLED_EXCLUSION_REASONS`. A settled Claude capture with no semantic frontier keeps its byte-prefix cursor, because its failure evidence already forces a full replay. - `storage/source_blob_restoration.py` owns `retained_blob_source_candidates` and the window kinds. The kinds are the backup proof tokens: file prefix, grown-file snapshot prefix, append window or its observed `[0, end)` prefix, legacy append window, and ZIP member. Backup now hashes and recovers windows by streaming. Raw derivation stages them by streaming, and stages ZIP members through `zip_reacquisition_payload`, keeping only byte-identical values. `blob_integrity._current_raw_payload_bytes` and its helpers lost their last caller and are deleted, together with their tests and the `acquisition_boundary` allowlist entry. - `split_zip_member_text` refuses a literal existing path. Every split site goes through it or through `zip_member_coordinate`. - `_record_zip_member_refusal(..., reason=, error=)` is the one debt writer. `_reconcile_zip_member_refusals` clears stale member debt after every completed scan, not only for bound providers. ### Derived-identity closure These closure members change, so this PR must land before any rebuild starts (`devtools schema closure`): `core/raw_coordinates.py`, `sources/assembly_chatgpt.py`, `sources/live/batch.py`, `sources/live/batch_support.py`, `sources/live/metrics.py`, `sources/live/parse_prefetch.py`, `sources/prepared_jsonl.py`, `sources/revision_backfill.py` and `storage/blob_integrity.py`. The closure baseline does not grow: the schema-closure gate is ok. No DDL changes. ## Verification - `agentctl job start --workspace <wt> polylogue verify_quick`, job 3553 on dea458fcba: `verify: PASSED exit=0` (all static gates, including mypy, layering and schema-closure). The pre-push `devtools verify --quick` passed on 992dcd6, which is dea458fcba rebased onto master c0dda6f. The rebase overlap is one non-conflicting `archive_debt.py` label hunk. - `agentctl job start --workspace <wt> polylogue pytest_focused -- <32 files>`, job 3554 on dea458fcba: `1435 passed, 9 failed`. The 32 files are the new and changed tests, plus every test file of the changed modules' routes: revision backfill, live batch and watcher, parse stage, backup, blob integrity and conservation, raw derivation, revision replay, ZIP addressing, ChatGPT parser and assembly, intake, canonical ingest, and archive debt. - The 9 failures are inherited. `pytest_focused -- --on-default-branch <the 9 ids>` in a detached master worktree at b384edc (job 3501) fails the same 9: `test_archive_debt` x2 (SchemaSkew), `test_raw_observation_derivation` x4, `test_retained_tool_output_convergence::test_gemini_full_tool_output_survives_the_loss_of_its_source_tree`, `test_revision_replay::test_chain_replay_supersedes_equal_frontier_quarantined_membership_head` and `test_silent_ingest_loss::test_mid_stream_non_json_failure_raises_the_same_partial_decode_error`. They belong to master-green. ## Self-review Final pass (pass 3) over `git diff origin/master...HEAD`, against `docs/review/codex-review-guide.md` and the orchestrate worker-contract list. Pass 1 found three things, fixed before pass 2: the backup proof must name the hashed window (the #5838 invariant my rewrite first dropped for `[0, end)`), backup read windows into memory, and the replay prefix scan read every blob twice. Pass 2 found the Claude stale-cursor livelock and the directory-asset cap. Pass 3 found nothing new. 1. ✓ **Siblings and owners.** Decode terminality has one owner (`terminal_decode_evidence`; `grep _terminal_decode_evidence polylogue` finds 0). The strict-prefix rule has one owner, `jsonl_parse_prefix_size`, read by the live path worker and all three replay decode sites; `grep "_iter_json_stream(" sources/revision_backfill.py` shows only strict calls. Window choice has one owner, used by backup and raw derivation. A grep for first-colon splits in blob_integrity, archive_debt, zip replay and backup finds 0. ZIP member refusal debt has one writer. ChatGPT caps: the directory-asset refusal was a sibling and is removed. The ZIP route keeps acquisition's ZIP admission, which is policy shared with acquisition. 2. ✓ **The fix itself.** `_settle_terminal_decode_refusal` runs inside the census batch transaction (`manage_transaction=not batched`). `RetainedParseFailure` is a frozen dataclass with a `StrEnum` field, so it is picklable. `jsonl_parse_prefix_size_of_handle` was checked against `jsonl_complete_prefix` over 111,972 generated payloads and chunk sizes, and agrees on every one up to trailing whitespace (probe script, not committed). 3. ✓ **Memory and limits.** The sandbox cap and the directory-asset size cap are gone. Backup windows are hashed and recovered by streaming, which removes the `source_too_large` cap on direct files. The tail read holds only the final line plus one chunk, and trailing whitespace is dropped as it is read. No cap or timeout was added. 4. ✓ **Cost per unit.** Replay's prefix decision reads only the file tail, not a second full pass. The legacy-append predecessor lookup runs only for legacy rows and uses `idx_raw_sessions_source_path`. 5. ✓ **Interruption.** Raw-derivation staging still polls `compute_cancel_requested`, and a cancelled stage discards its staged blobs, as before. Census settlement commits at the existing unit boundary. 6. ✓ **Ordering and races.** A source that changes between the window hash and backup recovery fails `stage_exact_blob`'s digest check and becomes `inexact_payload`. Raw restoration stages only exact digests, and the writer publishes them. 7. ✓ **Failure classification.** Only `JSONL_RECORD` failures (and any decode failure of an unknown provider) are terminal, matching live intake. A known-provider JSON document decode failure keeps its former `failed` receipt (residual below). Read faults stay `OSError` and remain retryable. 8. ✓ **Silent outcomes.** Every settled path is excluded with a typed reason, and the attempt disposition is `corrupt_input` or `unsupported_shape`, never `success`. An empty candidate list is `no_source_window` in raw derivation, and `no_replay_candidate` or `legacy_append_window_missing` in backup. 9. ✓ **Cleanup on failure.** Staged blobs are discarded on every refusal path: `stage_exact_blob` discards a mismatch, and `_stage_absent_blob_restorations` discards on exceptions. 10. ✓ **Identity and keys.** No hash, ID formula or receipt key changed. Member debt subjects keep `<zip>:#<ordinal>:<member>`. 11. ✓ **Lossless transforms.** Replay keeps every complete record and drops only an unterminated tail, as live does. ZIP restoration keeps only byte-identical values. 12. ✓ **Degenerate inputs.** An empty or whitespace-only payload parses whole. A lone unterminated line gives prefix 0 and no records. A zero-byte window stages an empty blob. A missing, non-ZIP or directory container prefix yields `container_coordinate_missing` or `source_missing`. 13. ✓ **Consumers.** Every reader of the renamed fields is updated: intake adapter (admitted paths too), canonical ingest, and tests (`grep no_session_paths` finds 0). The `recover` callback signature changes in its only caller. `_RECOVERABILITY_FAILURE_KINDS` drops the two kinds that are no longer produced. `docs/archive-backup.md` names the owner. 14. ✓ **Tests and stubs.** Each new test drives the production route and names what turns it red: - `test_retained_replay_refuses_a_malformed_middle_record_with_a_terminal_census` goes red under lenient decode (a session is published) or a failed receipt (the raw is re-selected). - `test_retained_replay_parses_the_complete_prefix_before_an_unterminated_tail[bytes,stream]` goes red under whole-payload strict decode, or when a terminated malformed line is excluded. - `test_a_worker_decode_refusal_keeps_its_kind_across_the_worker_boundary`. - `test_a_corrupt_capture_is_excluded_as_corrupt_input` goes red on the former `ADMITTED` or the stale-cursor `RETRYABLE`. - `test_both_routes_prove_and_restore_the_same_window[6 kinds]` and `test_both_routes_refuse_a_source_that_no_longer_holds_the_bytes[6]`. - `test_an_absent_zip_member_blob_is_restored_and_materialized`, which drives converge. - `test_a_colon_path_names_a_container_only_when_its_prefix_is_a_real_zip`. - The updated ZIP refusal debt test. - `test_in_memory_sandbox_links_are_all_recorded` and `test_an_asset_larger_than_the_zip_member_bound_is_acquired_from_a_directory`. 15. ✓ **Trust boundaries.** Fixtures are synthetic, and nothing is logged beyond the existing events. Generic list: (1) each criterion is met on the production route, as listed above; the unmet parts are in the residuals. (2) Sibling greps are in item 1. (3) Predecessors are deleted: `_terminal_decode_evidence`, `prepare_retained_jsonl_carrier`, `_settle_zip_member_refusals`, `direct_source_windows`, `stage_exact_direct_source_blob`, `_current_raw_payload_bytes` and helpers, and the backup window helpers; a grep for all of them finds 0 outside test names. (4) Failure paths are typed (items 7 and 8). (5) Red conditions are in item 14. (6) No secrets or private data are in the diff. ## Residuals - xf8qp: a truncated capture that is still stable (unchanged since capture) is a deferral that parses its complete prefix, not an exclusion. Only the not-stable and not-hot-proven branch is terminal. That branch is tested on the batch route (`test_captured_incomplete_jsonl_is_rejected_after_source_disappears`); an intake-adapter test would need a source that changes mid-pass. - A known-provider JSON document (not JSONL) that does not decode is still a retryable `failed` census receipt, as in live intake. Making it terminal is a live-intake policy change. - Raw derivation restores from the recorded path. Backup also re-anchors a relocated archive root (`_resolved_source_path`), so a ZIP moved with the archive root is recoverable by backup only. - The in-memory ChatGPT route's memory is linear in its input, like every list it already holds. The scratch-spilled prepared route is the bounded one. - Legacy-append predecessor choice still orders by `acquired_at_ms` (noted in #5838). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch
polylogue-20260929-130016-35798596on base0914f89d4c72.polylogue-9m93s Use one retained-input route for every file size
polylogue-i07pw Complete prepared publication and useful worker parallelism on the ordinary route
polylogue-6xcqj One acquisition-to-publication path for incremental updates and fresh construction
polylogue-s8x8s Remove the super-linear and redundant work in parse and cursor commit
polylogue-aar35 Delete the inert wanted-source receipt machinery and per-origin path overrides
polylogue-5hcbg Explicit cold build can promote a candidate missing sessions the active index serves
polylogue-8j9rh Session excision leaves its tool-result sidecar raws and bytes behind
polylogue-b8of0 A kill inside an append's index write leaves the tail unmaterialized and acknowledged
Self-review
polylogue-9m93s: 3 pass(es) against
docs/review/codex-review-guide.md,polylogue/daemon/AGENTS.md, polylogue/sources/AGENTS.md, polylogue/storage/AGENTS.md (Code Review Rules),/realm/project/sinnix/dots/_ai/skills/orchestrate/references/worker-contract.md (generic list)grep -rn 'PicklingError' polyloguefound 2 sites (ingest_batch/_core.py, validation_flow.py), both removed. Undelivered work: the stall path dropped unsubmitted raws, now refused. Worker-death policy: live parse_prefetch (loss streak), storage/derived/raw.py (always retryable) and ingest_batch (sole = defect, shared = retryable) still differ; recorded in unresolved. Admission rule: every append_session_to_shard/prepare_session_shard site in prepared_jsonl.py (13) is preceded by the rule (grep listing checked). Active-branch leaf deciders: write.py list normalizer and sink normalizer unified; prepared_merge's own leaf choice now clears the inherited marker; parsers that set leaves (chatgpt, drive, claude common) are producer evidence and unchanged.polylogue-s8x8s: 3 pass(es) against
docs/review/codex-review-guide.md,polylogue/sources/AGENTS.md (Code Review Rules),/realm/project/sinnix/dots/_ai/skills/orchestrate/references/worker-contract.mdpolylogue-aar35: 2 pass(es) against
docs/review/codex-review-guide.md,polylogue/daemon/AGENTS.md and polylogue/sources/AGENTS.md Code Review Rules,orchestrate worker-contract generic listgit grep HERMES_HOME -- polylogueshows only its docstring and body, plus docs and comments). Pass 1 also found a missed caller: test_hook_producer.py still monkeypatched the removed configured_provider; fixed in 7ee3f4b. Sweeps for every removed name (browser_capture_spool_path, hermes_root key, hook_sidecar_dir, hook_provider, drivepath keys, antigravity_language_server, their POLYLOGUE env vars, spool-path, --spool, WantedSource*/wanted-source) across the repo except CHANGELOG found only the canonical path helpers and the new refusal test.polylogue-5hcbg: 2 pass(es) against
docs/review/codex-review-guide.md (checklist items 1-15, Compatibility, Limits, Do not flag),orchestrate worker-contract generic list (items 1-6),polylogue/daemon/AGENTS.md Code Review Rulespolylogue-8j9rh: 2 pass(es) against
docs/review/codex-review-guide.md,worker-contract generic list (/realm/project/sinnix/dots/_ai/skills/orchestrate/references/worker-contract.md)polylogue-b8of0: 1 pass(es) against
docs/review/codex-review-guide.md,/realm/project/sinnix/dots/_ai/skills/orchestrate/references/worker-contract.md (generic list)grep -rln 'WARM_TIMEOUT|warm_timeout|warm window' polylogue tests docs devtoolsfinds only a prose comment at polylogue/sources/live/parse_prefetch.py:1928 and no knob. Tests set 61 distinct POLYLOGUE_* variables with setenv or delenv; 57 are read in polylogue/ or devtools/. POLYLOGUE_LIFECYCLE_RECEIPT_DIR is read by tests/infra/daemon_service_harness.py:29, and the POLYLOGUE_TEST_* pair is forged input in a devtools test. That leaves POLYLOGUE_DB_PATH as a possibly stale knob, recorded in unresolved. The diff adds no product predicate. It reuses the deferral producer that remains (a failing live_parse_path_worker fills preparation_deferred and _defer_full_cursor_retry, polylogue/sources/live/batch.py:1792-1800), and tests/unit/sources/test_live_watcher_parse_stage_equivalence.py:877 and :929 drive the same producer._owns_parse_stage = parse_stage is None), so watcher.stop() leaves it alone and the test shuts it down. The newparse_stagekeyword on _admit_pages defaults to None, which keeps the existing callers (_admit, the first-ingest test) on the production default stage.needed, ()(watcher.py:592), job 3108 failed at the DEFERRED assertion (test_live_ingest_kill_recovery.py:299) and two restart pages reported DUPLICATE.parse_stagekeyword on the test-local helper _admit_pages.grep -n '_admit_pages(' tests/unit/sources/test_live_ingest_kill_recovery.pyshows its three sites (definition, _admit, the append test), and each is consistent. The retired env knob has no remaining reader or setter anywhere, per the item 1 grep.needed, ()at polylogue/sources/live/watcher.py:592) turns the test red at test_live_ingest_kill_recovery.py:299, with DUPLICATE outcomes (job 3108; the mutation was reverted, andgit status --shortis clean). Removing idempotent message identity or the retry's materialization would turn the (6, 6, 1) assertion red.