Repository navigation
Audit the materialization-kernel closing frontier - #7686
Conversation
…witnesses Brace-escaping in a string literal, Optional construction (Present/Absent via v2.std.optional, not some/none), piped filter, and the every-clause- has-evidence predicate (NotDelivered.reason counts as evidence) were all broken in the WIP commit. All 11 witnesses in the paired test now pass by execution via claim_batch, including the expect-red control proving the AND-fold genuinely evaluates false over today's audited clauses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wiring the existing typecheck_compute_count counter through the real disk-tier seam (per the prior evidence's own plan) surfaced a blocking, pre-existing defect: a second same-process real resolve through the disk-tier cache exhibits catastrophic memory growth (~175MB -> >8GB RSS), reproducible on an unmodified sibling test with zero diff to cli_run.rs/resolved_graph_cache.rs on this branch vs main. The new test was written, reproduced the finding, then reverted rather than landed, since a test that reliably OOMs the runner is not a safe witness to enroll. Clause 2 stays PartiallyDelivered; evidence now names the real blocker and its next trigger instead of an unattempted plan (DESIGN §4b/§5 — no untracked stall). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The auto-merge with main's DESIGN.md edits to the adjacent "five-minute CI gate" entry dropped this entry as part of the same auto-heal commit. The audit clause evidence and the Rust test comment both cite it as filed in DESIGN.md; restoring it so that claim is true again (review 47584).
|
Fixed (499978c): the disk-tier Open Threads entry was genuinely dropped from DESIGN.md — not by anything in this diff, but by the auto-merge/auto-heal commits (66d1cf4 merging main, 520e604 auto-heal) that landed on this branch after my last push, which reconciled the adjacent "five-minute CI gate" entry and lost this entry as a casualty. Restored it verbatim so the audit clause evidence and the Rust test comment both cite something real again (review 47584). On review 47578's non-blocking — sent from quick-swift-501 |
…try durably The disk-tier repeat-resolve memory-growth Open Threads entry was restored twice by direct DESIGN.md edits and reverted twice by the ci-auto-heal drift regeneration, because DESIGN.md's Open Threads section is a generated projection of design_document.dag's open_threads_blocks() fn — a hand edit to the markdown file is not a durable fix. The entry now lives in design_document.dag itself; this commit is DESIGN.md regenerated via main_wet so the two stay in sync (review 47584).
|
Re review 47584: confirmed and fixed, correcting my earlier claim. My first fix (499978c) directly re-added the disk-tier entry to DESIGN.md. That was insufficient and got silently reverted a second time by the ci-auto-heal drift regeneration (9d81fd2) — DESIGN.md's Open Threads section is a generated projection of The durable fix (674e625) adds the entry as a new — sent from quick-swift-501 |
…GN.md) The audit clause's evidence field previously restated the full diagnosis already recorded in DESIGN.md Open Threads, duplicating one fact across two carriers — the §2/§3 violation this audit itself checks for. The clause now cites the DESIGN.md entry instead of re-narrating it; the DESIGN.md Open Threads row remains the single durable home for reproduction steps and the next trigger. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Merge landed #7717's materialization_provider kernel contract-shape note and other main changes cleanly; both this branch's disk-tier repeat-resolve OOM entry and #7717's kernel closing-contract note survive in dag/gunbc/design_document.dag. Regenerated DESIGN.md via tools.generated_artifact_gate::main_wet at the merged head so the projection matches the authority (no hand edits). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Lane F (brief from parent session
still-bat-561, subject "Lane F — materialization closing contract, NO second cache"): this PR is an audit, not a closing contract. It records, per obligation in the brief's seven-step sequence, whether PR #7534's deliveredv1-materialization-kernelmachinery satisfies that obligation — Delivered / PartiallyDelivered / NotDelivered, each with a named reason citing an executing witness or the concrete blocking symbol.This does NOT bind or accept
v1-materialization-kernel.gunbc.materialization_kernel_closing_frontier_audit(dag/gunbc/materialization_kernel_closing_frontier_audit.dag) says so explicitly in its header note: the module'sDelivered/PartiallyDelivered/NotDeliveredverdicts are authored findings from an investigation, not execution-derived observations — a genuine closing contract would need each clause to carry a typedExecutedPass/ExecutedRefusal/Unavailableobservation with the verdict derived from it, and that machinery does not exist here. The AND-fold summary (materialization_kernel_all_clauses_delivered) is a derived summary over the audited rows for readability, not a roadmap execution contract, and the roadmap node's own red control/handback is not satisfied by anything in this PR.No second cache mechanism was built; this is model + audit only.
Where the kernel's own closing contract actually lives: #7717 (merged to
main) is the closing-contract statement for thedag/std/materialization_provider.dagdoor itself — four independent review passes closed every known forgery/omission path on the contract shape, and it's tracked at duplicate-work-graph-lens-design.md §11. This PR is the adjacent, narrower thing: whether the parent brief's seven per-clause obligations for thev1-materialization-kernelroadmap node are discharged by execution. Checked both directions after merging main: #7717 doesn't resolve or contradict any verdict below (it documents which of 7 consumer targets call the door, not whetherresolved_graph_cache_id's warm hit is proven-by-execution to skip semantic recompute — a strictly narrower claim this PR'sPartiallyDeliveredverdict is about), and nothing here restates or duplicates #7717's contract-shape claim.Status as of 2026-08-03 ~04:15 UTC (operator winding down — this is the state to merge from)
DONE, green by execution:
FrontierClauserows (dag/gunbc/materialization_kernel_closing_frontier_audit.dag).materialization_kernel_closing_frontier_audit_witness_test.dag).maininto this branch (post-Materialization provider kernel: closing contract + delivered-vs-not audit #7717/Record the native-at-small-scale status once, in one typed receipt #7718/Retry model + attempt lineage + legacy-attempt supersede (operator P3, re-dispatch of wedged item): StartNewAttempt{supersedes} clears the live srv1 legacy refusal walls; RetryMechanism/ResumeAttempt/WorkerTurn; legacy rows present as supersedable, not belt faults #7715/v1 emitter: extend Clone-bound WF propagation to FN/IMPL emission #7708/Run merge admission as ordered CI success stages #7522), regeneratedDESIGN.mdfrom source (tools.generated_artifact_gate::main_wet, exit success), and verified the merge did not silently drop any row two independent ways beyond the initial grep check: (1)git diff origin/main...HEAD -- dag/gunbc/design_document.dag DESIGN.mdshows exactly one intentional hunk per file (the OOM entry insertion); (2) a byte-level oracle (strip common prefix/suffix lines, then common prefix/suffix characters within the changed middle) run against both files reportsremoved=0chon both — pure insertion, zero bytes removed or altered anywhere else in either file.580e0357ae07c95c49d93c99e8d6f1d0a35d9fc3: claude (review 47751, opus-4-7) and cursor (review 47755, composer-2.5), 0 REQUEST_CHANGES outstanding.adhoc-44fb018f-81d, workercrisp-boar-681) rather than inside this audit — that worker now has its own draft PR Root-cause disk-tier repeat-resolve memory growth (>8GiB OOM on second resolve through v1 disk cache seam) #7728 open with the diagnosis handed off in full (defect location, repro viaulimit -v, sibling-test zero-diff-vs-main confirmation, candidate root causes). Nothing further owed here from that thread.IN FLIGHT:
pull_requestevent, started 2026-08-03T03:10Z —buildandregenjobs already green; thecijob (historically ~41-42 min) is still running as of this update. This is the sole remaining item ondashboard-ops reviews 7686'smerge_criteria.requirements: everything else (approvals,request_changes,active_reviews,open,draft) reportsok:true; onlychecks(pending) andmergeable(UNKNOWN, which historically resolves once checks finish) are outstanding. No further action from me is needed here beyond waiting for this run to finish — nothing to fix unless it goes red.BLOCKED: nothing, on anyone. This PR does not depend on the OOM root-cause work (#7728) landing first — the
PartiallyDeliveredverdict on warm-hit-skips-semantic-recompute already correctly names the OOM defect as its blocking evidence and does not assume a fix.NOT ATTEMPTED (by design, not oversight):
lookup-ahead-of-index-construction— NotDelivered, correctly gated on the warm-hit clause above per the brief's own sequencing (can't validate ahead of construction until the warm-hit clause itself clears).real-production-invocation— NotDelivered; opt-in env var wiring exists but is explicitly not "production invocation" per the brief's bar, so no attempt was made to claim it.If continued, next step would be: once CI goes green and
mergeableresolves toMERGEABLE/CLEAN, this PR is merge-ready as-is (an audit-only artifact; nothing here is blocked on the OOM fix). No further code changes are anticipated from this session unless CI surfaces a genuine failure.Update 2026-08-03 ~04:20 UTC — OOM root-caused and fixed (not by this PR, not merged yet):
crisp-boar-681(work itemadhoc-44fb018f-81d) root-caused and fixed the disk-tier repeat-resolve OOM in draft PR #7728. Recorded here rather than only in a message thread, per the operator's "nothing may exist only in one session" directive:materialization_provider_ctxwhile its memo slot was still empty (written only after the cold build returns) — triggering unbounded re-entrant rebuild, ~1 GiB of resolved graph per recursion level.decode_v3_payload_from_fileprobes never fired — decode is never reached), NOT structural non-sharing acrossMultiEntryIndexinstances, NOTinstall_cross_process_materialization_hit(a plain memo-insert, never reached). Also refuted: growth is entirely inside the FIRST resolve, not triggered by the second index as I'd framed it — the second index is only where a reader notices.same_subject_resolves_share_one_graph_store_hits_v2_diskreproduces the SIGKILL on unmodifiedorigin/mainand passes with the fix (41.73s).warm-hit-skips-semantic-recomputeclause (currentlyPartiallyDeliveredhere) can be re-attempted — the previously-blocked discriminating witness should no longer OOM the runner. That re-attempt is explicitly not done in this PR (start-nothing-new during wind-down); it is the next lane's work, not mine tonight. This PR's verdicts stand as audited above and do not change until that re-attempt actually runs.What's in it
dag/gunbc/materialization_kernel_closing_frontier_audit.dag— the audit: 7FrontierClauserows against the brief's sequence.dag/test/claim/materialization_kernel_closing_frontier_audit_witness_test.dag— 11 tests, incl. an expect-red AND-fold control per DESIGN §4b so a future silent regression from Delivered back to NotDelivered flips a real assertion.Repeat-resolve OOM finding — one durable home
Investigating the warm-hit-skips-semantic-recompute clause surfaced a pre-existing, unrelated defect: a second real resolve through the v1 disk-tier cache seam in the same process reliably OOMs the process (measured:
ulimit -v 6000000, allocation failure at 632 bytes, exit 134/core dump, growth from ~175MB baseline to >8GB RSS within seconds). This is not introduced by this PR — it reproduces on an already-merged, unmodified sibling test (same_subject_resolves_share_one_graph_store_hits_v2_diskinsrc/v1/tests/src/resolve_cross_process_cache_test.rs) with zero diff to the touched files versus main.The full diagnosis, reproduction steps, and next trigger live in exactly one place: DESIGN.md Open Threads, "disk-tier repeat-resolve memory growth". The audit clause's evidence field and a one-line comment in
resolve_cross_process_cache_test.rsboth cite that entry rather than restating it — collapsed from three copies of the same diagnosis to one, per DESIGN §2/§3 (the exact class this audit checks for). Root-cause work is now tracked separately: work itemadhoc-44fb018f-81d, workercrisp-boar-681, draft PR #7728 — not this PR's scope.Host-boundary Rust test disposition (per still-bat-561's Lane D inflow measurement)
No new Rust tests were added by this PR — the audit examines PR #7534's existing Rust surface rather than adding to it.
resolve_cross_process_cache_test.rsandmaterialization_provider_resolved_graph_consumer_test.rsare host-boundary by nature and not expressible as.dagfloor witnesses (real subprocess spawn, byte-level on-disk cache corruption, concurrent-write races) — this paragraph is their stated disposition.Test plan
target/release/claim_batch --source-root dag --source-root src/v2 --entry dag/test/claim/materialization_kernel_closing_frontier_audit_witness_test.dag --functions <all 11>— all PASS.main(post-Materialization provider kernel: closing contract + delivered-vs-not audit #7717/Record the native-at-small-scale status once, in one typed receipt #7718/Retry model + attempt lineage + legacy-attempt supersede (operator P3, re-dispatch of wedged item): StartNewAttempt{supersedes} clears the live srv1 legacy refusal walls; RetryMechanism/ResumeAttempt/WorkerTurn; legacy rows present as supersedable, not belt faults #7715/v1 emitter: extend Clone-bound WF propagation to FN/IMPL emission #7708/Run merge admission as ordered CI success stages #7522) into this branch, confirmed by two independent content-level checks (three-dot diff + byte-level removed/inserted oracle, both detailed above) that no row was silently dropped, regeneratedDESIGN.mdfrom that authority, and reran the build/checks at the resulting head — CI run 30781126269 in flight as of this writing,build/regengreen,cijob running.