Skip to content

Delete unused memo and preparation carriers (native-memory-inert-carriers) - #13615

Closed
briansrls wants to merge 1 commit into
parse-memo-deletefrom
inert-memo-carriers
Closed

briansrls wants to merge 1 commit into
parse-memo-deletefrom
inert-memo-carriers

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Roadmap node native-memory-inert-carriers. This PR stacks on #13582 (parse-memo-delete). CI will not run on it until it is retargeted to main, after #13577 and #13582 land.

What was deleted (by symbol)

1. The compile-stage memo (operator ruling 2026-10-08). Its only lookup, resolve_cache_miss, answered Miss every time, so the governed door never served a hit.

  • v2.compiler.compile: resolve_cache_miss, plus the cached_stage_realization match and the cached_stage_governed wrapping inside compile_ingest_staging. compile_ingest_staging is now the plain then_outcome sequence tokenize → parse → normalize → resolve → translate. Stage results and stage refusals still flow through it unchanged.
  • v2.compiler.materialization_carriers: deleted compile_stage_memo_demand_identity, the compile-stage demand, provider and id, v2_compiler_cache_providers, v2_compiler_materialization_demands/verdicts/ladder_holds, the process, run and workflow frames, admitted_prescription(_in) with its diagnostic and admission readers, CachedStageRealization, cached_stage_realization, cached_stage_governed, realized_step_for, compile_stage_realized_step, and every compile_stage_memo_* control. The prose-as-String note row also goes. The module keeps only materialization_allows_memo_store and its disposition, because the self-host emitted contract consumes them.
  • v2.std.staging: deleted CacheProbe, resolve_probe and cached_stage. then_outcome stays.
  • extdeps.realization.compile_stage_memo: the file is deleted. Its references are gone from extdeps.cache (cache_catalog, cache_layer_default_order, the projected row), gunbc.materialization_provider_targets, gunbc.doc_graph_roots, legacy_extdeps_scope_frontier.tsv, gunbc.commit_workflow (the compiler_materialization_witness_test enrollment) and witness_row_cost_basis.tsv.
  • src/v2/test/claim/compiler_materialization_witness_test.dag and the two cached_stage_* claims in staging_test.dag are deleted.
  • After Delete the v2 packrat parse memo carrier (R2, stacked on #13577) #13582 and this PR, the compiler-provider scaffolding is empty, so it is removed too, as the handback asks.

2. Claim-cache machinery (v2.compiler.eval). Deleted TestClaimCacheKey, TestClaimCacheReceipt, test_claim_cache_key_*, test_claim_cache_receipt(_node) and test_claim_cache_receipt_claim. TestClaimRun.cache is replaced by TestClaimRun.claim: TestClaim, and test_claim_run_claim reads it directly. The constructors updated to match are in emit_host, language_behavior_equivalence_test (the rejected-emit arm now carries its sentinel claim) and manual/infer_ground_add. Seven manual translate tests had only an unused import, which is removed.

3. v2.workflow.floor_preparation: the whole module is deleted, including prepared_floor_subject_serve, PreparedFloorSubjectRequest and prepared_claim_subject_identity. So is its only consumer, dag/test/claim/floor/floor_preparation_witness_test.dag. In std.materialization_provider, in_process_materialization loses the two admit_callers rows that named that witness, and its frontier sentence drops the phrase "floor-preparation witnesses". The FNV preimage-verified exception and minted_in_process are unchanged.

4. v2.workflow.floor2_prepared_subject: deleted FloorSelectionPosture, FloorExecutionKey (with OnePreparedSubjectKey), floor_execution_key, floor_execution_key_is_one_prepared_subject and PreparedSubjectSpec, whose only consumer was the key.

5. v2.workflow.native_cache_fusion and src/v2/test/claim/native_cache_fusion_test.dag are deleted. The real emit-host native build cache is untouched.

Bookkeeping

  • floor_grandfathered_roster: added WitnessDeleted rows for the 8 cut members this PR deletes (3 compiler_materialization_witness, 2 staging.cached_stage_*, 3 native_cache_fusion_test).
  • floor_unimported_bare_provider_debt_roster: the compiler_materialization_witness_test.dag row moves from Retired ImportsFixed to Retired FileDeleted. The floor demanded this (RetiredImportsFixedButFileAbsent).
  • cache_layer_planner_test now uses parse_cache_id and parse_cache_projected as its in-process layer.
  • materialization_provider_witness_test: consumer_target_frontier_names_five_caches… becomes …names_four_caches… with == 4, the same pattern Delete the v2 packrat parse memo carrier (R2, stacked on #13577) #13582 used.

What was kept, and why (red_control)

  • Ordinary stage results and refusals: compile_ingest_staging has the same five stages, and then_outcome composes them as before. compile_eval_thesis_proof_test passes.
  • EvalContext.cache_authority.interpretation, eval_context_interpretation, effect_io, and every claim result and verdict field.
  • inferred_tree_digest and its whole diagnostic/extent/ByteOffsetCacheKey digest chain, plus test_claim_cache_interpretation_hash_node and the other digest functions. Nothing was renamed to "computation_identity".
  • WitnessIdentity and witness_identity_qualified_name, which the terminal and wet-evidence ledgers use.
  • The general std.materialization_provider machinery, including its FNV preimage-verified exception.
  • The emit-host native build cache.

Where #13582's generic ladder controls went

#13582 moved four controls onto the compile-stage demand. With that demand deleted:

  • Ladder-level obligations live on fixture subjects in test.claim.materialization_ladder_witness. These are RefusedScopeTooNarrow for an isolated plural site, RefusedNoProvider without a provider, discharge for a demand that recurs inside the provider's scope, and single recompute. The cells are provider_scope_too_narrow_is_refused, obligation_without_provider_is_typed_refusal, unbounded_siblings_frame_obligates_up_front / declared_replay_frame_obligates_up_front, and single_pure_demand_is_accepted_recompute. All 32 claims in that module pass on this head. I did not add copies of them.
  • Door-level controls (an_unruled_identity_is_not_admitted, a_refused_identity_is_not_admitted) tested admitted_prescription_in, the green-or-nothing admission door in materialization_carriers. That door's only production caller was the compile-stage demand. Keeping it alive on a test-local fixture would keep a mechanism nothing in production calls, only so its controls had a subject (DESIGN §3c). So the door and its controls are deleted together. This is the one judgment call in this PR, and it is easy to reverse: if reviewers want the door kept as a generic rule, it can move next to std.materialization_ladder, with these two controls on a fixture demand.

Consumer census (grep across src/, dag/ and the src/v1 Rust before each deletion)

  • compile_stage_memo*, cached_stage*, CacheProbe, resolve_probe: the consumers are the ones listed above. Some code comments still name them as historical specimens (trait_bound_witness_test self-contained fixture strings, anonymous_record_head_use_line_witness_test, src/v1/05_emit_rust.dag, docs/plans/*). The committed snapshot fixture frontier_probe_elision_boundary_overlay also mentions them. These were left as they are. No seed Rust or stage0 mirror references any deleted symbol, so neither stage0 nor the generated artifacts were regenerated.
  • TestClaimCache*: emit_host, language_behavior_equivalence_test, manual/infer_ground_add, and 7 manual translate tests (import only).
  • floor_preparation: only its own witness, plus the two admit_callers rows.
  • floor2 routing symbols: zero consumers.
  • native_cache_fusion: only its own test.
  • Path-list snapshots left untouched: srv1_residue_rehearsal and docs/rung-drops/required_lanes_do_not_resolve_product_layer_modules_2026-09-20.txt.

Evidence (local, head 0b92d40)

  • cargo build --release (gunbc, claim_batch, claim_executor): succeeded. No Rust changed, so clippy and fmt were not run.
  • claim_batch over 16 entries (231 claims): 227 passed, 4 failed. All 4 also fail on the base branch (parse-memo-delete 427b080) with this binary:
    • floor_eval_step_budget_witness_test.every_declared_removal_names_a_cut_row_and_has_left_the_roster: removal row v2.test.claim.compiler.kernel_value_type_roster_witness_test.kvr_a_named_calls_bool_formal_is_counted_not_judged_holds is not in the cut. That row is also on main. My 8 new removal rows are all members of the cut.
    • external_model_scope_witness_test.roster_paths_resolve_on_disk and carriers_declare_scope_on_disk.
    • doc_graph_reference_partition_witness_test.doc_graph_production_population_loses_nothing.
    • The 16 entries: staging, cache_layer_planner, materialization_provider_witness, materialization_ladder_witness, materialization_carriers_emitted_contract, floor_eval_step_budget_witness, floor_terminal_ledger(_wire), evaluation_store_address_census, cache_key_completeness, external_model_scope, witness_row_cost_drift, commit_check_demand, doc_graph_reference_partition, local_repo_wet_terminal, wet_evidence.
  • claim_batch over branch_eval_by_execution, effect_io_eval_by_execution, compile_eval_thesis_proof, manual/rust_add_emit_translate and emit_host_add_equals_eval: 17 of 17 passed.
  • claim_executor --required-ci --required-lane witnesses: exit 1. The only failed phase is the local-repo wet lane, with 16 refusals, all on the known baseline: mtcollins1_kvm_observer_protocol_wet_witness (7), allocation_client_execution_wet_witness (8), and v41_source_patch_converge_witness red5 (1, intermittent, cause unresolved). There were no other refusals. 15 changed witnesses were planned and passed (blocking=0), including cache_layer_planner ×3 and consumer_target_frontier_names_four_caches_with_typed_binds.
  • The build lane was not run, because stage0 is unchanged.

Not executed or unresolved

  • language_behavior_equivalence_test holds its claims as test data rows, which claim_batch --functions would not address, so I did not run it on its own. It compiles in the lane's prepared subject.
  • manual/infer_ground_add has no test fn. Its constructors changed but did not execute on their own.
  • materialization_carriers now holds only a predicate whose sole consumer is its self-host emitted contract. Deleting the whole module would also mean editing the self-host rosters and receipts, which is outside this bounded PR.
  • Also unconsumed but outside this boundary: floor2_prepared_subject SubjectExclusionGround, WitnessSite and FloorBindingStrictnessRegression.
  • Fix every T? == T site the whole-population census found #13549 edits dag/test/claim/floor/floor_preparation_witness_test.dag, which this PR deletes. Whichever lands second gets a modify/delete conflict, and resolving it means deleting the file.

🤖 Generated with Claude Code

…ert-carriers)

Compile-stage memo (operator ruling 2026-10-08): its only lookup,
resolve_cache_miss, answered Miss unconditionally, so the governed door
never served. Deleted: resolve_cache_miss and the cached wrapping in
v2.compiler.compile compile_ingest_staging (the tokenize -> parse ->
normalize -> resolve -> translate then_outcome sequence is unchanged);
v2.compiler.materialization_carriers compile-stage demand, provider,
verdicts, admission door (admitted_prescription_in and its controls),
CachedStageRealization, cached_stage_realization, cached_stage_governed,
realized_step_for and v2_compiler_cache_providers; v2.std.staging
CacheProbe/resolve_probe/cached_stage; extdeps.realization.compile_stage_memo
with its cache catalog, provider-target, scope-frontier, doc-root and
commit-gate rows. The cache planner claims now use the parse_cache row
as their in-process layer. materialization_allows_memo_store stays (its
self-host emitted contract consumes it).

v2.compiler.eval: TestClaimCacheKey, TestClaimCacheReceipt and their
helpers are deleted; TestClaimRun carries the claim directly, so
test_claim_run_claim reads run.claim. inferred_tree_digest, the
interpretation digest chain and every claim result field are unchanged.

v2.workflow.floor_preparation and its only witness are deleted; the two
in_process_materialization admit_callers rows that named that witness
go with it (the FNV preimage-verified exception is unchanged).

v2.workflow.floor2_prepared_subject: FloorSelectionPosture,
FloorExecutionKey, floor_execution_key,
floor_execution_key_is_one_prepared_subject and PreparedSubjectSpec are
deleted; WitnessIdentity and witness_identity_qualified_name stay.

v2.workflow.native_cache_fusion and its own claims are deleted; the
emit-host native build cache is untouched.

Grandfathered-roster removals carry WitnessDeleted dispositions; the
compiler_materialization_witness debt row retires as FileDeleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Superseded by #13641 at 634453d: this PR's head is an ancestor of integration/v1-closeout. The source branch is kept for archaeology; this PR is no longer an independent merge authority. — sent from neat-wolf-604

@gunbai-bot gunbai-bot Bot closed this Oct 9, 2026
@gunbai-bot gunbai-bot Bot mentioned this pull request Oct 10, 2026
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.

1 participant