Skip to content

Roadmap: three-way diff as fold instance (construction steer) + operational acceptance tiers, per-node Accept lines, runner-allocation-v0 milestone - #6121

Merged
briansrls merged 4 commits into
mainfrom
session/calm-hawk-722
Jul 2, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/calm-hawk-722

Conversation

@briansrls

@briansrls briansrls commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Encodes two operator directives into the roadmap authority (dsl/gunbc/roadmap_authority.dag); ROADMAP.md, docs/plans/fleet-acceptance-criteria.md, and .githooks/pre-push are the main_wet regens of it.

1. Three-way diff = fold instance, not a bespoke differ (operator, 2026-07-01)

The converge re-land brief said "the three-way-diff carrier does not exist yet" — with nothing stopping a worker from hand-rolling a differ, reinventing the core mechanism. New node 2-keyed-delta-fold (parent of 2-converge-reland) carries the construction steer:

  • diff = keyed fold over aligned rows into a codomain with identity = Unchanged — unchanged rows vanish by the monoid law, never by filtering (that is the "for free")
  • structural equality (v2.std.exact_structural_equality_zip_fold) is the degenerate consumer — an equality verdict is a diff with the hunks discarded (accurately described: its internals are canonicalize-then-compare, not a lockstep zip)
  • three-way = the same fold into a join-semilattice: Conflict = join of two incomparable changes, and a plan that reads Conflict has no apply arm — no-mutation-on-conflict becomes structural, not a runtime guard. Safety caveat encoded: bottom here is the benign Unchanged (the inverse of the DescentEvidence precedent), so the codomain must carry NO Unknown element
  • inverse laws as free RED controls: diff(A,A)=identity · apply(diff(A,B),A)=B · retract = inverse patch — a groupoid, not a total Group (apply is partial: refuses off-base; Conflict has no inverse)
  • §3 grounding: attach to v2.std.change (ChangeKind/ChangeSet, already feeding the affected-set lens), never mint a parallel Hunk/Patch; the algebra anchor picks ONE std authority per the standing de-fork ruling
  • layering: generic fold = std; gunbc.host_converge supplies only the six-variant ConvergeTarget leaf algebra (one string-equality flattens apply-vs-effective splits, byte normalization, verify-only, pin-coherence); live read/apply stays workflow-layer

Every cited name was adversarially verified against the live tree by a 6-agent refutation workflow; the three mischaracterizations it found (zip-fold internals, Group totality, phantom ConvergeKnobs plural) are corrected in the landed text.

2. Operational acceptance — tiers + per-node Accept lines (operator, 2026-07-02)

A roadmap item is not complete because its algebra exists. It is complete only when a named consumer uses it on the live path and produces a receipt.

  • §2 prose now carries the rule + completion tiers T0 modeled · T1 fixture witness · T2 wired to consumer · T3 live dry-run receipt · T4 live apply + independent read-back · T5 periodic/CI keeps it alive; control-plane items close at T4/T5
  • Accept (tier) lines added to: 2-keyed-delta-fold (T2), 2-converge-reland (T4 — the full srv1/srv2 reallocation bar: model-edit → delta plan → apply → systemctl show read-back → hand-edit reds → retract), 2-live-read-seam, 2-host-admission, 2-periodic-actuation (T5), 2-service-receipt (T4), 2-compile-clean-shard-b, 2-strictlease, 2-admission-model, 1-g2-runner
  • New milestone node 2-runner-allocation-v0 — srv1/srv2 as StrictLease runner capacity, hand-config retired: the operational milestone the control plane exists for; added to the §2 milestone spine
  • New modeled plan doc docs/plans/fleet-acceptance-criteria.md (generated from dsl/gunbc/plans/fleet_acceptance_criteria.dag, registered in plan_registry_batch_g) carries the full per-node checklists incl. the 12-step converge-reland flow and the dispatch-brief acceptance block; nodes link to it — node = summary, doc = checklist, no dual representation

Receipts

  • drift gate run_generated_artifact_drift_gate_body: RED before regen, GREEN after (discriminating consumer, by execution)
  • roadmap_authority/emit/document/status/page/frontier/spawner witnesses: PASS
  • generated_artifact_drift_witnesses, plan_lens (dissolution-trigger walls incl. RED controls), doc_reachability (no orphan, no dangling), githooks_pre_push_emit: PASS

🤖 Generated with Claude Code

@gunbai-bot gunbai-bot Bot changed the title fable 2 Roadmap: three-way diff as fold instance (construction steer) + operational acceptance tiers, per-node Accept lines, runner-allocation-v0 milestone Jul 2, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 2, 2026 00:34
@briansrls
briansrls merged commit 3dcef2b into main Jul 2, 2026
2 of 5 checks passed
@briansrls
briansrls deleted the session/calm-hawk-722 branch July 2, 2026 00:48
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
briansrls added a commit that referenced this pull request Jul 2, 2026
…eyed fold into algebraic codomain, Unchanged vanishes BY MONOID LAW; three-way = join-semilattice, Conflict = join of incomparables with NO apply arm (structural); attach to v2.std.change or consciously de-fork (no parallel Hunk/Pa (#6129)

* WIP: 2-keyed-delta-fold — generic keyed zip-fold per #6121 steer: diff = keye

* Add generic keyed delta fold carrier and wire first consumers.

Model std.change as the single authority for keyed zip-fold diff/three-way
patch algebra (monoid identity, derived inverse, ConflictPlan with no apply
arm); migrate host_identity_knob onto it; add host_converge_delta fixture
consumer with law witnesses for all ten acceptance criteria.

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

* WIP: 2-keyed-delta-fold — generic keyed zip-fold per #6121 steer: diff = keye

* Wire keyed fold through declared monoid/join algebra and fix plan codomain.

Route two-way and three-way folds through keyed_patch_monoid and
keyed_leaf_verdict_join so Unchanged vanishes by identity contribution,
add KeyedPlanAdd/Remove to distinguish add/remove plans, and witness
monoid laws plus Added/Removed round-trip laws.

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

* WIP: 2-keyed-delta-fold — generic keyed zip-fold per #6121 steer: diff = keye

* Dissolve parallel plan type and std.change predicate duplication.

Delete KeyedConvergePlan (verdict is the plan), prefix two-way diff
kind variants as KeyedDiff* and three-way add/remove as KeyedVerdict*,
remove std.change is_/has_ predicates and keyed_hunk_kind_equal/
keyed_key_in_list, single-pass keyed_three_way_patch_insert_entry,
and update witnesses/consumers to match structurally.

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

* WIP: 2-keyed-delta-fold — generic keyed zip-fold per #6121 steer: diff = keye

* WIP: 2-keyed-delta-fold — generic keyed zip-fold per #6121 steer: diff = keye

* Fix keyed_leaf_verdict_join idempotency for Added/Removed arms.

Mirror ApplyHunk agreement logic so join(x,x)=x for KeyedVerdictAdded
and KeyedVerdictRemoved, preserving join-semilattice laws for three-way
patch append; witness idempotent and disagree-to-Conflict cases.

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

* Upsert Added hunks in keyed_apply_patch and name converge scaffold trigger.

Filter existing key before append on KeyedDiffAddedHunk (symmetric with
Modified arm) to preserve row-key uniqueness; witness double-apply upsert.
Add converge_knob_values_equal_dissolution_trigger for scaffold marker.

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

* WIP: 2-keyed-delta-fold — generic keyed zip-fold per #6121 steer: diff = keye

* Remove downstream has_conflict/has_apply verdict Bool wrappers.

Delete unused host_converge_three_way_has_apply and inline
keyed_leaf_verdict_fold at the single witness call site instead of
re-wrapping patch-level Bool walkers in product code.

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
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