Skip to content

Design: emitted crate partition (Rust realization of agnostic compilation-unit shape) - #6708

Merged
briansrls merged 2 commits into
mainfrom
crate-partition-design
Jul 16, 2026
Merged

briansrls merged 2 commits into
mainfrom
crate-partition-design

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Design artifact (docs-only) — the Rust workflow-layer half of a shared, target-agnostic compilation-unit contract, interface-locked 2026-07-16 with the language-consolidation lane (eager-ferret-110, who authors the shared home + staffs C as the 2nd realization).

What this is

  • Derives the emitted crate partition (which module lands in which crate) — closing stage0_crate_plan()'s hand membership ledger, the last fork #6677 (derived registration) did not cover.
  • Policy: crates ≈ cores, even, flat, acyclic; objective = minimize the parallel critical path (the CI-wall "one giant serial crate" symptom).

Layer split (locked)

  • Shared home (language lane owns): CompilationUnit + partition_fold(module_dag, Map) -> List<CompilationUnit> + per-target R4 validity interface + agnostic Provenance tag. interface/deps are derived-only (fold is sole producer). C realizes the same home (link-cyclic, include-closure, .h/.c).
  • This doc (Rust workflow layer): PartitionParameter/PartitionPolicy/resolve_partition -> Map + Rust R3 linkage + Rust R4 (SCC-atoms/acyclic). Only the resolved Map crosses into the shared fold, so the shared shape never imports the workflow policy (no §3 import-arrow inversion — the F7 class).

Acceptance

Re-anchored on v2.std.determinism/std.perturbation: the partition is a non-semantic perturbation axis; a behavior that depends on it is a determinism leak. Discriminating: a fixed module DAG under ≥2 partitions all build + are behaviorally equivalent; an invalid partition refuses (§5).

Staging

  • Phase 0 (unblocks v2 multi-crate self-host): ExplicitPartition interim grouping as a declared scaffold (HandExplicit provenance + dissolution trigger).
  • Phase 1: derived balanced PolicyPartition replaces the explicit value (same parameter).

Not blocking / gated on

Implementation is gated on main-green (current compile-clean algebra break; fixes #6705/#6701/#6696 in flight) and operator sign-off on the load-bearing src/v1/stage0_crates.dag touch. Orthogonal to the Wave-2 self-emit fan-out (Band A robust to membership churn). Draft until placement is decided.

🤖 Generated with Claude Code

…pilation-unit shape)

Rust workflow-layer half of a shared, target-agnostic contract locked with the
language-consolidation lane (eager-ferret-110): shared home owns CompilationUnit +
partition_fold(module_dag, Map) -> List<CompilationUnit> + a per-target R4 validity
interface; this doc owns PartitionParameter/PartitionPolicy/resolve_partition -> Map +
Rust R3 linkage + Rust R4 (SCC-atoms/acyclic). Only the resolved Map crosses into the
shared fold, so the shared shape never imports the workflow policy (no §3 import-arrow
inversion). Policy = crates approx cores, even, flat, acyclic; acceptance re-anchored on
v2.std.determinism/std.perturbation (partition = non-semantic perturbation axis; a
dependence is a determinism leak); Phase-0 explicit-partition-as-scaffold (HandExplicit
provenance + dissolution trigger) replaces the hand stage0_crate_plan() membership ledger.

Design artifact only; implementation gated on main-green + operator sign-off on the
load-bearing src/v1/stage0_crates.dag touch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 16, 2026 03:04
@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Marking ready — the design content is complete and interface-locked with the language-consolidation lane (eager-ferret-110). Note for reviewers: this is a docs-only design artifact; its CI will show red on the inherited main baseline (the compile-clean algebra field-authority break — src/v2/std/{diagnostic,logic,integer}.dag, trigger #6686, fixes #6705/#6701/#6696 in flight), which a docs-only diff can neither cause nor fix. Review the content (esp. §2 layer split and §13 interface summary); the check will green once main greens. Implementation placement (me-dispatched vs. elsewhere) is a pending operator call and does not affect the locked design.

@briansrls
briansrls merged commit 8322580 into main Jul 16, 2026
3 checks passed
@briansrls
briansrls deleted the crate-partition-design branch July 16, 2026 04:21
gunbai-bot Bot pushed a commit that referenced this pull request Jul 16, 2026
#6708 landed docs/plans/emitted-crate-partition-design.md with no inbound
link from any doc root, so doc_graph_has_no_orphan_docs went red and has
kept main red on every push since 04:21.

Adds the ROADMAP §1 bullet the doc was missing, summarizing the lane from
the doc's own framing (hand-drawn crate membership as the last uncovered
fork over frontier.dag, #6677 as the registration layer it builds on) and
carrying its declared status: design, interface-locked, owner TBD.

Green by execution (claim_batch, both source roots):
  doc_graph_has_no_orphan_docs      exit=0  (RED control: exit=1 FAIL
                                             with the link line removed)
  doc_graph_has_no_dangling_links   exit=0
  doc_graph_universe_is_nonempty    exit=0

Does NOT address the root cause: #6708's own CI was green because the
docs-only shortcut (ci_spec.dag:351) skips the whole witness corpus, so
the doc-graph witness never ran on the one diff class that can break it.
Raised separately -- that touches a load-bearing gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jul 16, 2026
Unblocks doc_graph_has_no_orphan_docs inherited from main #6708 orphan.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 16, 2026
…the doc graph (#6723)

#6708 added docs/plans/emitted-crate-partition-design.md with no inbound link,
orphaning it in the doc-reachability graph — doc_graph_has_no_orphan_docs has been
red on main since (run 29471295796), blocking every open PR via the refs/pull/N/merge
ref (head ∪ main).

Fix: add it to the v2-self-hosting tracker's Related list (its topical home — the
self-host compiler's emitted crate layout, peer to seed-shrink-census et al.),
reachable from the ROADMAP.md root. Authored in the .dag authority
(dag/gunbc/plans/v2_self_hosting.dag) and regenerated .md kept in sync.

Placement is provisional — the doc declares "Implementation owner TBD (operator
considering placement)"; re-home freely, the constraint is only that it be reachable.

Verified green-by-execution (release claim_batch, this tree):
- doc_graph_has_no_orphan_docs: PASS (was FAIL on main — the discriminating RED control)
- doc_graph_has_no_dangling_links: PASS (link targets a real file)
- run_generated_artifact_drift_gate_body: PASS (.md == emit(.dag), no drift)

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jul 16, 2026
#6708 landed docs/plans/emitted-crate-partition-design.md with no inbound
link from any doc root, so doc_graph_has_no_orphan_docs went red and has
kept main red on every push since 04:21.

Adds the lane to dag/gunbc/roadmap_authority.dag (the single authority) and
regenerates ROADMAP.md from it. The lane summary comes from the design doc's
own framing -- hand-drawn crate membership as the last uncovered fork over
frontier.dag, #6677 as the registration layer it builds on -- and carries the
doc's declared status: design, interface-locked, owner TBD.

v1 of this PR hand-edited the emitted ROADMAP.md, which would have traded the
orphan red for a drift-gate red (review 38709). ROADMAP.md is emitted from the
authority via expected_roadmap_md() and byte-compared by GeneratedArtifactDriftGate.

Green by execution (claim_batch --source-root dag --source-root src/v2):
  run_generated_artifact_drift_gate_body  exit=0  (RED control: exit=1 FAIL
                                                   with the authority row added
                                                   but ROADMAP.md not regenerated)
  doc_graph_has_no_orphan_docs            exit=0  (RED control: exit=1 FAIL
                                                   without the lane row)
  doc_graph_has_no_dangling_links         exit=0

Does NOT address the root cause: #6708's own CI was green because the
docs-only shortcut (ci_spec.dag:351) skips the whole witness corpus, so
the doc-graph witness never ran on the one diff class that can break it.
Raised separately -- that touches a load-bearing gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 16, 2026
* Fix main: link the orphaned emitted-crate-partition design doc

#6708 landed docs/plans/emitted-crate-partition-design.md with no inbound
link from any doc root, so doc_graph_has_no_orphan_docs went red and has
kept main red on every push since 04:21.

Adds the ROADMAP §1 bullet the doc was missing, summarizing the lane from
the doc's own framing (hand-drawn crate membership as the last uncovered
fork over frontier.dag, #6677 as the registration layer it builds on) and
carrying its declared status: design, interface-locked, owner TBD.

Green by execution (claim_batch, both source roots):
  doc_graph_has_no_orphan_docs      exit=0  (RED control: exit=1 FAIL
                                             with the link line removed)
  doc_graph_has_no_dangling_links   exit=0
  doc_graph_universe_is_nonempty    exit=0

Does NOT address the root cause: #6708's own CI was green because the
docs-only shortcut (ci_spec.dag:351) skips the whole witness corpus, so
the doc-graph witness never ran on the one diff class that can break it.
Raised separately -- that touches a load-bearing gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix main: link the orphaned emitted-crate-partition design doc

#6708 landed docs/plans/emitted-crate-partition-design.md with no inbound
link from any doc root, so doc_graph_has_no_orphan_docs went red and has
kept main red on every push since 04:21.

Adds the lane to dag/gunbc/roadmap_authority.dag (the single authority) and
regenerates ROADMAP.md from it. The lane summary comes from the design doc's
own framing -- hand-drawn crate membership as the last uncovered fork over
frontier.dag, #6677 as the registration layer it builds on -- and carries the
doc's declared status: design, interface-locked, owner TBD.

v1 of this PR hand-edited the emitted ROADMAP.md, which would have traded the
orphan red for a drift-gate red (review 38709). ROADMAP.md is emitted from the
authority via expected_roadmap_md() and byte-compared by GeneratedArtifactDriftGate.

Green by execution (claim_batch --source-root dag --source-root src/v2):
  run_generated_artifact_drift_gate_body  exit=0  (RED control: exit=1 FAIL
                                                   with the authority row added
                                                   but ROADMAP.md not regenerated)
  doc_graph_has_no_orphan_docs            exit=0  (RED control: exit=1 FAIL
                                                   without the lane row)
  doc_graph_has_no_dangling_links         exit=0

Does NOT address the root cause: #6708's own CI was green because the
docs-only shortcut (ci_spec.dag:351) skips the whole witness corpus, so
the doc-graph witness never ran on the one diff class that can break it.
Raised separately -- that touches a load-bearing gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 16, 2026
…the existing value-expression path, prove behavioral equivalence to v1 seed (hermetic per-PR + wet oracle), flip frontier row SeedRetained->SelfEmitted. Copy the use_site_verdict pilot template (#6675). v2-only leaf, shim-free. NOT (#6703)

* WIP: Wave 2 Band A self-emit: parse_engine_hooks — self-emit its Rust via the

* Wave 2 Band A: finish parse_engine_hooks self-emit pilot receipts.

Fix wet behavioral transport (shim-free minimal linkage, Symbol newtype
seed oracle, emit-content validation), hermetic test import, and crate
layout witnesses for the second SelfEmitted frontier row.

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

* WIP: Wave 2 Band A self-emit: parse_engine_hooks — self-emit its Rust via the

* Fix stage0 crate-layout witness for second SelfEmitted row.

Derive expected self-emitted count from compiler_frontier_self_emitted_count()
instead of hardcoding 1 — parse_engine_hooks flip makes baseline 2.

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

* Fix merge conflict in stage0 crate layout: keep std_lens_verdict and parse_engine_hooks.

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

* Link emitted-crate-partition plan in ROADMAP for doc reachability.

Unblocks doc_graph_has_no_orphan_docs inherited from main #6708 orphan.

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

* Revert ROADMAP hand-edit — orphan fix belongs in #6724.

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

* WIP: Wave 2 Band A self-emit: parse_engine_hooks — self-emit its Rust via the

* WIP: Wave 2 Band A self-emit: parse_engine_hooks — self-emit its Rust via the

* Remove accidental scratch log files from repo root.

Addresses review 38737 REQUEST_CHANGES — shell captures are not modeled artifacts.

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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