Repository navigation
increment 3: realization materialization arm — reconcile→Share collapse (KeySource-keyed) - #5168
Conversation
A scannable in-flight task index for gunbc (the compiler/language). Explicitly NOT a second authority — DESIGN.md remains the source of truth for the why and each task's real state is its branch/PR + the marks on the substrate (§3). Product / ctrl features are tracked elsewhere. Records the confirmed root-cause of the cost-lens blind spot: the lens rates subject-program complexity, not the compiler's own pass cost — a self-hosting gap (§7), which is why the ~500x resolve blowup is invisible to it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…exity violation, not a new lens The cost-lens 'blind spot' is not a new issue: complexity_lens is general and the budget roster is designed to enroll compiler-stage bodies (waves 2+). Fix is the planned enrollment, not a scaffold. Drops the interim step-count ratchet idea. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… landed claim (review #5129) cursor/composer-2.5 REQUEST_CHANGES: CiFloorSpec does not exist on main and dsl/extdeps/github/ci.dag still records ci.yml as hand-edited, so the 'Recently landed' line overstated. Now claims only the verifiable #5101 consolidation; ci.yml generation stays honestly under Next. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per operator: each task one line for quick scanning; details go to indented sub-bullets. Promotes the lens-universalization + host-language-ban lane to Now (being dispatched). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…oved to scope-a PR body) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…se (KeySource-keyed) Re-introduce the trimmed Placement / Materialization (Recompute|Memoize|Share) / RealizedStep vocab in std.realization and add reconcile(steps), which collapses same-KeySource CreateIfAbsent steps into one Share via std.effects.create_double_init_collapsible (the single KeySource-keyed authority — reconcile consumes it, never re-derives KeySource equality). Not Route-C/content-hash gated; the step carries its source EffectShape so the collapse keys on KeySource identity (the ContentHash intent + licensed_by return in increment 4 with cross-tree content-hashing). Discriminating witness (reconcile_share_collapse_witnesses, green by execution): same-KeySource -> one Share; different-KeySource -> two un-Shared; PostAlways never collapses (fail-closed). Fix latent effects.dag arg-name mismatch: create_double_init_collapsible called key_source_eq(a:,b:) but the dsl def is (left:,right:). Latent until now (no dsl consumer); realization.dag is the first. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…h DESIGN.md CI section Two follow-ups on the increment-3 branch: (1) review #5168 (cursor/composer-2.5 REQUEST_CHANGES): std.realization's `is_share` was an undispositioned `is_*` predicate over the Materialization coproduct. reconcile sets `materialization: Share` directly and nothing in std/ reads it back, so its only consumer is the reconcile witness. Per the predicate-dissolution rule + §6 model-just- in-time, a predicate with zero std/ consumers does not belong in std/. Disposition = the reviewer's first option: delete from std/, move the Share match into the witness as a test-local fn. std.realization keeps only the fold-bearing reconcile arm. (2) DESIGN.md CI section refresh: the "two composed passes / claim_batch / ci_gates.dag" paragraph was stale. Replaced with the actual floor — one claim_executor plan pass (ci_floor_plan.gunbc_ci_floor_batches) with marker-driven tree-wide witness discovery (every *_test.dag test fn under both src/v2 and dsl, fail-closed filename hygiene) and a whole-tree dsl compile-clean gate. Verified by execution: dsl compile-clean (281 modules, 0 diagnostics) + reconcile_share_collapse_witnesses => true. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
a2ad073 to
504bbcc
Compare
|
Addressed in 504bbcc. Took the first option from the review: deleted |
|
Thanks — approval noted. The |
Increment 3 of the realization sequence (the materialization arm), following the increment-1
CreateEffectidempotency vocabulary already on main.What this does
Re-introduces the trimmed materialization vocab in
std.realizationand adds thereconcile → Sharecollapse:type Placement = LocalInProcess | LocalFilesystem | RemoteNetworktype Materialization = Recompute | Memoize | Sharetype RealizedStep { shape, placement, materialization, cost }fn reconcile(steps)— collapses two same-KeySourceCreateIfAbsentsteps into ONE step withmaterialization: Share; distinct identities (or non-create effects) stay separate.The collapse decision is
std.effects.create_double_init_collapsible(the singleKeySource-keyed authority).reconcileonly consumes it — it never re-derivesKeySourceequality (§3 single authority).Not Route-C / content-hash gated
The collapse keys on
KeySource(create_double_init_collapsible → key_source_eq, pure structural over the closedKeySourcecoproduct), never on a content hash. The step carries its sourceEffectShapeso the collapse can key on identity now.RealizedStep'sintent/licensed_byContentHashfields return in increment 4 with cross-tree content-hashing (trim marker kept in the header).Proven by execution
dsl/test/claim/realization_reconcile_witness_test.dag→reconcile_share_collapse_witnessesis green by execution, with a discriminating +/- design:KeySource→ exactly ONE step, exactly ONEShare.KeySource→ TWO steps, ZEROShare(a collapse-on-anything-but-KeySource bug flips this red).PostAlwayscreate-always → never collapses (TWO steps, ZEROShare).Whole-tree
dsl compile-cleanpasses (281 modules, 302 files, 0 diagnostics); existingrealization_witnesses(independence arm) still green (no regression).Latent bug fixed (pre-existing, not new scope)
create_double_init_collapsiblecalledkey_source_eq(a:, b:), but the dslkey_source_eqis defined(left:, right:). Latent because nothing in the dsl tree consumedcreate_double_init_collapsibleuntil now —reconcileis the first consumer, so the whole-tree compile-clean gate would have broken without the fix.Deferred to later increments
realize()+ re-introduceRealizeIntent { target: ContentHash }(needs cross-tree Node content-hashing).Share(the seed change): wireMaterialization::Sharethrough the executor /resolved_graph_cacheso the CI floor resolves shared closures once.🤖 Generated with Claude Code