Skip to content

C2: typecheck materialization through the local store - #13482

Open
gunbai-bot[bot] wants to merge 10 commits into
mainfrom
session/jolly-ant-542
Open

gunbai-bot[bot] wants to merge 10 commits into
mainfrom
session/jolly-ant-542

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

C2: typecheck materialization through materialization_store_local, with the seven review fixes.

04_infer.dag is load-bearing. typecheck_module is split into an import-derived head and the module's own tail (TypecheckModuleOwn). The split is required by the entry/closure boundary: the entry must be the tail only, because the full result serializes to ~4 GB (parent envs). typecheck_module_restore re-runs the head from the imports and grafts the stored tail. The stage0 mirror was regenerated in one remote dispatch; fixed point confirmed at byte grain.

Behaviour on a miss is unchanged; control real_module_round_trip (Rust test) shows restore == compute on a real module and a size control that goes red if parent envs leak in. It is not a required floor lane (rung drop rust_unit_tests_over_their_cap).

Items: 1 TypecheckModuleOwn; 2 lookup-first in reconcile_with_typed_cache; 3 DURABLE_ROOT/durable_volume_present deleted, door is seed_lookup_typecheck_hex; 4 OutcomeCounts + store_receipt_line; 5 largest_entry_bytes reported in the receipt (frontier stays OPEN); 6 wet claims run (not route gaps), enrollment reverted; 7 iface producer branding.

🤖 Generated with Claude Code

@briansrls
briansrls marked this pull request as ready for review October 6, 2026 15:23
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

… the frontier on a unused declaration.

C2 now looks up and commits TypecheckModuleRequest from reconcile using content digests, fail-closed prepare/commit/integrity arms, and a family budget derived from the existing per-entry estimate rather than a synthetic interface literal. The durable-budgets frontier stays unbound until that executing consumer is the retirement trigger.

Co-authored-by: Cursor <cursoragent@cursor.com>
Review 77087 was right that a function named measured_largest_entry was still an estimate. The family unit is now typed_module_bytes_per_entry_estimate under its own name, and the wet size check no longer claims to be a real typecheck-entry reading.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Checked review 77087 against the current head (2634f571cd), not the reviewed SHA 15026a54.

  1. Frontier retired with no production consumer. Fixed. materialization_store_durable_budgets_consumer_frontier is unbound_dissolution again; typecheck_materialization_seed_path_note is also unbound. bound_dissolution on open_durable_typecheck_store existing was the false retirement. Production path: reconcile_with_typed_cache → durable_typecheck_lookup / durable_typecheck_commit → seed_lookup_typecheck_hex / seed_commit_typecheck_hex (ensure + lookup + commit) when /var/lib/gunbc/materialization-store is present. Missing volume is Unavailable, not a scratch fallback.

  2. Budget called “measured” but synthetic. The repeat_string(..., 6144) probe is gone. The family unit is typed_module_bytes_per_entry_estimate (existing in-process authority), named typecheck_module_family_entry_budget_unit so it is not a measurement. Wet size check keys on file contents, not paths, and does not store raw .dag source as the interface payload.

  3. Failed prepare as zero bytes. typecheck_module_entry_bytes returns absent on StoreCommitNotPrepared; wet control a_failed_prepare_is_absent_bytes_not_zero.

  4. Refused commit as ordinary miss. typecheck_module_materialize yields TypecheckModuleCommitRefused; it does not re-serve.

  5. Key from path not contents. typecheck_module_request takes Fnv1a64Structural digests; typecheck_module_request_from_hex refuses a non-digest. Seed parts come from typed_module_store_hex_parts (source hash recorded at parse, import interface hashes, compiler identity).

Duplicate C2 PR #13484 was closed in favor of this one.

Merge not requested: review 77087 is still REQUEST_CHANGES on the old SHA, no approval on this head, GitHub mergeStateStatus BLOCKED.

Brian Searls and others added 7 commits October 6, 2026 16:06
The family byte ceiling is still estimate × residency, but the per-entry figure is no longer an untyped authored constant: it carries CitedFigureStanding with a read_obligation naming observed_largest_entry_bytes on the real typecheck commit path, and the budget frontier stays unbound. Drop the live-ladder discharge claim while those frontiers stay open.

Co-authored-by: Cursor <cursoragent@cursor.com>
Import the payload type from std.materialization_object, and keep the wet cold/warm millis if-arms as EpochMs so declarations resolve.

Co-authored-by: Cursor <cursoragent@cursor.com>
The wet family-budget probe refused because map(... as InterfaceHash) cannot coerce Fnv1a64Structural at eval. Seed hex imports use the same pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
The hermetic floor has no DirWithTemplate/Read mock for those identities; their terminal stays the wet lane. Drop the InterfaceHash runtime cast from the hermetic key claim.

Co-authored-by: Cursor <cursoragent@cursor.com>
…hority, typed counted outcomes

Entry is the module's own tail (TypecheckModuleOwn); a hit restores via typecheck_module_restore from the imports. Lookup runs before collect_parent_envs. DURABLE_ROOT and durable_volume_present deleted. Unavailable/commit-missed-open/re-entry are counted and reported by store_receipt_line with largest_entry_bytes. Wet-claim route-gap enrollment reverted. InterfaceHash branded at the producer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants