Repository navigation
fix: restore archive contract verification (#2932) - #2932
Conversation
Repeated archive initialization failed because six user-tier triggers lacked IF NOT EXISTS. Make the complete DDL safely repeatable and align lifecycle/table assertions with the current durable query and comparative-judgment model. Co-Authored-By: Claude <[email protected]>
Each workspace fixture rebuilt five SQLite tier schemas, multiplying DDL and fsync work across xdist workers. Build one locked per-run empty archive and reflink-copy it into isolated workspaces. The clone privacy test proves mutations cannot alter the shared template. Co-Authored-By: Claude <[email protected]>
Periodic maintenance tests still patched asyncio.to_thread after production moved writes behind daemon_write_coordinator. Under immediate sleeps they executed real work indefinitely. Patch the production coordinator boundary, assert maintenance actor names, and align the status fixture with the embeddings v2 schema. Co-Authored-By: Claude <[email protected]>
The run-query fixture expected a Task dispatch to synthesize a virtual subagent run, contradicting the source-derived one-session-per-run model. Seed the actual child session and assert the supported coarse agent identity. Co-Authored-By: Claude <[email protected]>
Fresh seed runs could consume host memory for hours, leave only a partial database, and provide no safe continuation or completion proof. Broad lanes also opted into tmpfs automatically, while affected verification could silently pass with zero selected tests. Persist versioned seed-attempt receipts, resume matching incomplete corpora through testmon, validate every expected node against the dependency database before stamping completion, reject zero selections for executable changes, isolate supervisor tests under xdist, require explicit tmpfs opt-in, and reduce the default per-test timeout to 120 seconds. Co-Authored-By: Claude <[email protected]>
Problem: abrupt termination left a valid dependency database behind but the seed receipt had no node ledger, forcing the next run to discard useful work. Corrective commits also invalidated resume eligibility even though testmon is responsible for selecting changed dependencies. Recover the original node ledger from the immutable selection artifact, scope resume identity to corpus-affecting runtime and marker policy, and preserve git/worktree identities as provenance rather than invalidation inputs. Ref polylogue-b054.1.1. Co-Authored-By: Claude <[email protected]>
Problem: The v37 derived-index lifecycle dropped three obsolete cache tables, but the copy-forward declaration and verifier did not encode or prove those removals. A fresh testmon seed exposed the resulting schema-policy failures. What changed: Declare the removed caches in the lifecycle contract, drop them explicitly in copy-forward, and prove survivor rows, foreign keys, and table counts in the fast-forward receipt and tests. Co-Authored-By: Claude <[email protected]>
Problem: The browser-origin repair proof checked a raw blob reference's digest and size but not its source path. Its mutation test also closed SQLite connections without committing, so the intended path-corruption witness was vacuous. What changed: Require the raw envelope and blob reference to name the same source path, and commit every fail-closed mutation before running the repair inspector. Co-Authored-By: Claude <[email protected]>
Problem: The interrupted full seed exposed stale append fault tests, missing write-stage timings, strict-authority fixtures that no longer reached production, and a real catch-up/watch registration gap that could miss a concurrent append. What changed: Register filesystem watching before catch-up, admit complete singleton raws to membership governance, preserve cursor authority across current live routes, and expose replay write timings. Replace obsolete private-method patches with byte-proven baseline, index-failure, crash-recovery, and compaction witnesses. Co-Authored-By: Claude <[email protected]>
Problem: Source-freshness evaluation read the wall clock directly, bypassing the shared date seam and making time-dependent query behavior harder to freeze reliably. What changed: Expose a UTC clock helper beside date parsing and route relative freshness bounds through it. Co-Authored-By: Claude <[email protected]>
Problem: Several deterministic baseline tests still expected retired provider keys and values after the public query surfaces moved to origin tokens. The MCP field coverage assertion also classified a response-envelope control as a semantic query field. What changed: Assert singular/plural origin pushdown, canonical origin values in benchmarks and neighbor discovery, and explicitly distinguish the affordance response control from query-field descriptors. Co-Authored-By: Claude <[email protected]>
Problem: The clean seed found three assertions lagging their current public contracts: embedding status gained bounded failure fields, shell actions are normalized, and agent-authored blackboard notes enter candidate review rather than active context. What changed: Update the fixtures and assertions to exercise those current contracts without weakening their behavioral checks. Co-Authored-By: Claude <[email protected]>
Problem: The committed root-help snapshot predated the no-daemon option, note command, continuation wording, and current maintenance command grouping. What changed: Refresh the snapshot from the actual Click help surface. Co-Authored-By: Claude <[email protected]>
Fresh worktrees previously required an all-or-nothing testmon seed that could hang, retain partial state, and amplify memory and temporary I/O. Warm affected runs also misclassified an unchanged, already-covered worktree as a zero-selection failure.\n\nAdd adaptive worker and tmpfs budgeting, process-tree resource receipts, deterministic cleanup, resumable content-bound seed ledgers, and exact coverage receipts for repeat affected runs. Refuse heavy pytest below the declared memory floor instead of falling back to disk.\n\nCo-Authored-By: Claude <[email protected]>
The shared dispatcher discarded the root carried by each wake event, scanned historical roots in insertion order, and retained drained roots forever. Stale or unreachable archives could therefore delay current durable acknowledgements past the MCP timeout while growing dispatcher state.\n\nPrioritize the woken root and release drained roots under the state lock with a filesystem recheck. The regression exercises the real spool and daemon route with twelve deliberately slow stale roots.\n\nCo-Authored-By: Claude <[email protected]>
The extension status reply selected a nested archive payload and dropped the request identifier carried by the surrounding receiver state. Recovery clients could no longer correlate a status response with the capture request that produced it.\n\nProject the best available receiver request id into the returned status payload while preserving an id already supplied by the archive state.\n\nCo-Authored-By: Claude <[email protected]>
The multi-provider convergence benchmark maintained a second handwritten set of supposedly realistic wire generators. Those fixtures drifted from the authoritative provider schemas and could not inherit improvements to schema-driven workload generation.\n\nBuild every benchmark corpus through CorpusSpec and SyntheticCorpus while preserving the existing scale tiers, deterministic seeds, provider-native artifacts, and production convergence route.\n\nCo-Authored-By: Claude <[email protected]>
Static allowlists and spelling censuses were enforcing the textual shape of prior refactors instead of behavior, contracts, or runtime invariants. They imposed ongoing maintenance while remaining unable to prove either safe SQL execution or correct origin semantics.\n\nRemove the provider-vocabulary census, its exclusion manifest and generated command entry, the statement-hash SQL allowlist, and a registry-name census. Behavioral query, origin, and mutation tests remain responsible for the actual contracts.\n\nCo-Authored-By: Claude <[email protected]>
Normalized archive objects still carried provider/source_name fields internally, then public surfaces recursively rewrote payload keys and sometimes guessed a provider by reversing the non-injective origin mapping. That made the public contract dependent on lossy compatibility shims and left divergent identity paths across query, insight, and storage hydration.\n\nCarry Origin directly through sessions, messages, actions, insights, rollups, query units, topology, API, CLI, MCP, and daemon payloads. Keep Provider only at raw parser/schema and genuinely vendor-scoped boundaries, remove reverse-mapping detours and the recursive payload projector, and regenerate the affected schemas and examples.\n\nCo-Authored-By: Claude <[email protected]>
The shared Beads database contains concurrent planning updates that were not represented in this worktree because default export resolves through the main checkout. Export the current database explicitly into this branch after validating every JSONL record and the dependency graph.\n\nThis snapshot includes the bounded-verification evidence and residuals, the comprehensive schema-derived workload-profile P1, and contemporaneous agent planning updates already present in the shared database.\n\nCo-Authored-By: Claude <[email protected]>
Attach the exact rebased seed, repeated warm-run, and browser-extension gate results to the bounded-verification bead while preserving a concurrent planning update from the shared Beads database.\n\nCo-Authored-By: Claude <[email protected]>
Syrupy serializes blank lines inside triple-quoted .ambr values with indentation spaces. Git's generic blank-at-eol check therefore reports valid generated snapshots as whitespace defects.\n\nDisable only blank-at-eol for Syrupy snapshot paths while retaining all other whitespace checks and exact snapshot behavior.\n\nCo-Authored-By: Claude <[email protected]>
|
Important Review skippedToo many files! This PR contains 212 files, which is 162 over the limit of 50. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (216)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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: ef228489d8
ℹ️ 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".
|
Post-merge acceptance audit correction: this PR delivered a large, green bounded-verification phase, but it did not satisfy all of polylogue-b054.1.1 AC1-AC7 as the PR body states. The parent Bead remains open. Residuals are: per-node pass/fail/error/timeout/worker-crash receipt classes; content-exact invalidation for edited untracked files; repair of the demo construct-loss race followed by two post-fix clean seeds; ten isolated plus ten xdist sub-10-second repetitions for optimize/WAL/embedding; a real production-dependency testmon mutation proof; and run swap/write accounting with a like-for-like speed comparison. The detailed independent audit is recorded in the Bead notes. This correction narrows the closure claim; it does not invalidate the merged fixes or their green verification evidence. |
## Summary Record the independent post-merge acceptance audit for `polylogue-b054.1.1`, keep the parent open, and split its remaining receipt, mutation, and lifecycle proofs into three execution-grade P1 children. Clarify `polylogue-1xc.14.1` so workload inference retains every useful privacy-safe observation rather than optimizing for a minimal profile. ## Problem PR #2932 substantially repaired the test harness, but its acceptance matrix overstated closure. Independent source review found missing per-node outcome receipts, incomplete untracked-file resume identity, a post-green demo race, absent repeated witness evidence, a mocked rather than real testmon mutation proof, and missing swap/write accounting. Separately, the workload-profile wording could be misread as permission to retain only a smallest sufficient statistic set. ## Solution - Add the assured-close findings to `polylogue-b054.1.1` and leave it in progress. - Create `polylogue-b054.1.1.3` for terminal outcome, identity, swap, and I/O receipts. - Create `polylogue-b054.1.1.4` for real production-dependency mutation proof. - Create `polylogue-b054.1.1.5` for ten isolated and xdist repetitions of all current hang witnesses. - Record that `polylogue-1xc.14.1` preserves every positive-value privacy-safe observation, with boundedness applying to resources/encoding and an explicit novelty/loss inventory for unmodelled signal. Ref polylogue-b054.1.1. Ref polylogue-1xc.14.1. ## Verification - `.agent/scripts/bd-graph-lint` — no dependency cycles; duplicate labels=0, inversions=0, missing AC=0. - JSONL validation — 953 records, 953 unique IDs. - `git diff --check origin/master...HEAD` — clean. - Pre-push Beads gate — zero unhandled findings across 953 issues. Co-authored-by: Claude <[email protected]>
…3307) ## Summary Fixes a stale doc comment found while investigating `polylogue-y6tb`. ## Problem `polylogue-y6tb` asked for a default per-test pytest timeout, on the premise that none was configured. That premise turned out to be stale: `pyproject.toml`'s `[tool.pytest.ini_options]` has had `timeout = 120` (with `timeout_method = "signal"`) since PR #2932 (2026-07-16) — well before this bead was filed/worked. `devtools/pytest_timeout_overrides.toml`'s header comment still claimed a "300-second timeout default", which was never true of the value actually configured on master. ## Solution Corrected the comment to state 120s and point at `pyproject.toml`'s actual setting. ## Verification `devtools verify pytest-timeout-overrides` → 7 explicit override(s), 0 violations. `devtools verify --quick` green via the pre-push hook. Ref polylogue-y6tb
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Restore trustworthy archive verification after the failed dogfood seed, complete normalized archive identity on
Origin, and repair the production defects the full 8-worker runs exposed. The branch also records the resulting Beads evidence and the comprehensive schema-derived workload-profile follow-up.Problem
Fresh-worktree verification depended on an all-or-nothing ~16k-test testmon seed that could hang, retain unusable partial state, amplify RAM/swap and writes, and leave agents without a valid affected-test path. Its anti-vacuity check then made a second unchanged warm run fail forever after the first run updated testmon. Repeated full runs exposed additional real failures: MCP call-log delivery could wait behind every historical archive root and retain drained roots indefinitely; normalized models still reversed non-injective origins into providers and recursively rewrote public payloads; several baseline lifecycle/query/browser contracts had drifted.
Solution
Originthrough normalized sessions, messages, actions, insights, storage hydration, queries, CLI/API/MCP/daemon payloads, topology, and resume models. Remove reverse origin-to-provider detours and the recursive payload projector; retainProvideronly at raw/schema/vendor boundaries.Ref polylogue-b054.1.1. Residual profiling and the one non-reproduced demo witness remain explicit in polylogue-b054.1.1.2 and polylogue-b054.1.1.1. The schema-derived workload-profile implementation is polylogue-1xc.14.1.
Acceptance matrix
Verification
POLYLOGUE_PYTEST_WORKERS=8 devtools verify --seed-testmon --skip-slow --json— final rebased run20260716T112938Z-seed-testmon-335241-c38361b4: 15,905 passed, 1 skipped, zero failures; complete seed receipt; 408.68s end-to-end; 6,006.8 MiB peak PSS.POLYLOGUE_PYTEST_WORKERS=8 devtools verify --json— 7 affected tests passed; 39.43s.zero_selection_coverage=complete_seed; 39.54s.npm testinbrowser-extension/— 15 files, 285 tests passed.npm run lint— ESLint passed.npm run validate— manifest v0.1.0 passed.devtools test tests/unit/cli/test_help_snapshots.py— 1 snapshot passed.devtools verify --quick— all 16 steps passed in 28.55s (20260716T114415Z-quick-359820-866bf854)..agent/scripts/bd-graph-lint— no cycles; zero duplicate labels, inversions, or missing acceptance criteria.git diff --check origin/master...HEAD— clean, with Syrupy.ambrserializer indentation explicitly classified in.gitattributes.