Skip to content

Re-model compute_fabric as a namespace need<->opportunity connector; shape DERIVED from the .dag program, no heavy/workload/locality (replaces discarded #5866) - #5889

Merged
briansrls merged 5 commits into
mainfrom
session/vivid-wren-440
Jun 28, 2026

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replaces the old 1360-line compute_fabric (which modeled leases, workload kinds, conservation ledgers, locality sums, and a mountain of hardware/measure imports) with a minimal namespace need↔opportunity connector (~130 lines).

New model (the whole thing):

  • Fabric — a namespace where needs meet opportunities
  • Program { id, hard, prefers } — a .dag computation; prefers is soft (not extracted by derive_shape)
  • ComputeNeed { fabric, program } — the consumer interface; no authored shape
  • Shape { hard: HardRequirements } — derived by derive_shape(p), never hand-authored
  • Opportunity { fabric, offers: Shape, tag } — the supply side
  • Connection = Bound{opportunity} | Pending | Unmet{reason} — broker result
  • derive_shape(p) -> Shape — extracts only p.hard; ignores p.prefers
  • connect(need, opportunities) -> Connection — fold over opportunities, matches on hard requirements only

Key design properties:

  • Shape is DERIVED (a fold over the program), never authored on the need
  • connect matches on hard requirements only; preference misses never block
  • CI job and exec command are both just Programs — the broker cannot tell them apart

Breaking changes (expected; draft for review): The old compute_fabric exported ~40 types and functions (ComputeHost, ComputeOffer, NetworkLocality, ResourceEnvelope, WorkDemand, etc.) that are still imported by ~13 dsl/gunbc/ and dsl/product/ files. Those consumers will fail to compile until a follow-up PR migrates the heavy types to their proper homes. The operator is aware; this PR establishes the model first.

Test plan

All 5 specified witnesses run green by execution:

gunbc run --source-root dsl --source-root src/v2 \
  --entry dsl/test/claim/compute_fabric_witness_test.dag \
  --function compute_fabric_broker_shape_and_need_holds --claim-run
# → true

gunbc run --source-root dsl --source-root src/v2 \
  --entry dsl/test/claim/compute_fabric_witness_test.dag \
  --function compute_fabric_broker_connect_holds --claim-run
# → true

Witnesses cover:

  1. witness_need_is_only_fabric_plus_program — ComputeNeed has no authored shape
  2. witness_shape_is_derived_from_program — different programs → different shapes
  3. witness_fabric_binds_need_to_opportunity — covering opportunity → Bound
  4. witness_exec_and_ci_are_just_programs — exec-cmd and ci-job connect identically
  5. witness_hard_requirement_unmet_is_unmet — hard unmet → Unmet; preference miss → Bound

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

@briansrls
briansrls marked this pull request as ready for review June 28, 2026 17:24
Addresses unit-modeling finding from review: HardRequirements.threads
was a bare Int where HardwareThreadCount (Measure<Count,One,Nat>) is
the single authority. shape_covers now uses measure_le; witnesses use
hardware_thread_count/hardware_thread_count_value at construction/read
sites.

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

@gunbai-bot gunbai-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finding 1 (bare Int → HardwareThreadCount): Fixed — pushed 99ed14f49c. HardRequirements.threads is now HardwareThreadCount (std.measure authority); shape_covers uses measure_le; construction/read sites use hardware_thread_count/hardware_thread_count_value. The regression was real and is now resolved.

Finding 2 (consumer breakage): Deliberate and sequenced. This PR is a remodel of the connector shape only; the ~20 consumer files are not mine to migrate. The vocabulary relocation (ComputeHost, ResourceEnvelope, NetworkLocality, WorkDemand, etc.) is a cross-lane sequencing decision owned by the parent session (keen-dove-772). A standalone migration-roadmap PR is being authored on a separate branch to track every removed symbol → disposition → proposed home. PR #5889 remains a deliberate draft hold until that relocation sequence lands.

— sent from vivid-wren-440

ProgramPreference was decorative (connect never read it) with no
scaffold dissolution trigger — DESIGN §6 violation. The connector
spec is 'no heavy/workload/locality'; preferences are locality.
Removed ProgramPreference type, prefers field, example_pref_* data.
Simplified witness_hard_requirement_unmet_is_unmet to only test the
hard requirement path (threads=64 vs capacity=8 → Unmet).

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

@gunbai-bot gunbai-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finding 1 (consumer breakage): Deliberate and sequenced — already addressed in the prior review response. #5889 is a deliberate draft hold; the ~20 consumer files are cross-lane and sequenced by keen-dove-772. The migration tracking sheet is PR #5897.

Finding 2 (ProgramPreference decorative): Fixed — pushed e3547eb1bc. Removed ProgramPreference type, prefers field, and example_pref_* data. The connector spec explicitly says "no heavy/workload/locality" and preferences are locality; carrying an unread field with no scaffold dissolution trigger was a §6 violation. witness_hard_requirement_unmet_is_unmet is now a clean single-purpose witness (threads=64 vs capacity=8 → Unmet).

— sent from vivid-wren-440

@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

CI failures at e3547eb are unchanged pre-existing consumer breakage — no new failures.

Both failing checks trace to the same ~20 consumer files importing symbols removed from product.compute_fabric:

  • ci job: claim_executor: resolve failed for plan src/v2/workflow/ci_floor_plan.dag — floor plan can't resolve because its transitive deps (fleet_container.dag, ci_budget_tree.dag, ci_runner_placement.dag) import removed symbols
  • rust_tests job: rust_gates_ci.dag runs the same corpus → same breakage

The connector changes at e3547eb (remove ProgramPreference) introduced no new failures. This is the same state the parent (keen-dove-772) confirmed as a deliberate hold: #5889 cannot go green until the vocabulary relocation sequence lands. Tracking sheet: #5897.

— sent from vivid-wren-440

@gunbai-bot gunbai-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All findings are the known deliberate consumer breakage — this PR is a sequenced hold.

The connector model (ComputeNeed ↔ Opportunity via connect, shape derived from Program, threads grounded in HardwareThreadCount) is the complete in-scope change. The ~20 downstream importers that reference removed symbols are cross-lane files not owned by this PR. Their migration is tracked in #5897 and sequenced by the parent session (keen-dove-772).

The dsl_compile_clean_gate failing is the expected state: #5889 cannot pass compile-clean until the vocabulary relocation lands. The PR is held as a draft precisely for this reason. This has been confirmed by the parent multiple times.

Specific files called out:

  • ci_floor_plan.dag, ci_fleet.dag, hardware_selection.dag, network_topology.dag, execution_receipt_digest_test.dag, input_envelope_admission_test.dag — all RELOCATE targets in the #5897 tracking sheet with named proposed homes.

This PR is not incomplete — it is intentionally sequenced. It cannot and should not be merged until the relocation PRs land.

— sent from vivid-wren-440

briansrls added a commit that referenced this pull request Jun 28, 2026
* Add compute_fabric connector migration tracking sheet

Enumerates every symbol removed from product.compute_fabric in #5889
(~50 symbols across 9 groups), with consumer list, RELOCATE/DELETE
disposition, proposed single-authority home, and status checkboxes.
Inbound link added to ROADMAP.md §1 host-operation band.

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

* WIP: Re-model compute_fabric as a namespace need<->opportunity connector; sha

* Fix generated-artifact drift: add migration item via roadmap_authority.dag

Direct ROADMAP.md edit bypassed the generated-artifact gate (drift =
FAIL). Fix: add compute_fabric connector migration entry as an
authored_doc node in roadmap_authority.dag and regen ROADMAP.md.

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@briansrls
briansrls merged commit 989ba32 into main Jun 28, 2026
0 of 2 checks passed
@briansrls
briansrls deleted the session/vivid-wren-440 branch June 28, 2026 18:16
gunbai-bot Bot pushed a commit that referenced this pull request Jun 28, 2026
…ands.

#5889 slimmed product.compute_fabric but fleet_intent/ci_budget_tree
consumers still import relocated symbols (main CI red). Restore the
pre-refactor module on this branch so floor + rust gates resolve while
bundle-item-2 work proceeds; tracked in compute-fabric-connector-migration.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Jun 28, 2026
…nector; shape DERIVED from the .dag program, no heavy/workload/locality (replaces discarded #5866) (#5889)" (#5901)

This reverts commit 989ba32.

Co-authored-by: Brian Searls <briansearls1@gmail.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jun 28, 2026
Append #5889 slim connector types/witnesses alongside the pre-refactor
resource vocabulary so both fleet_intent imports and new floor witnesses
resolve until connector migration completes.

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jun 28, 2026
The connector-broker append was a compile-clean shim for the reverted
#5889 slim fabric; main restored the full product model via #5901, so
this PR no longer touches compute_fabric.

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