Skip to content

Shell→dag: wire the gunbc converge CLI receiver — stage0 Subcommand gains converge --host <h>, dispatching to the landed converge_apply/ConvergePlan in-process interpreter (#6572) with typed receipts on the byte-locked receipt grammar; green by EXECUTION on a fixture host + discriminating RED (unkno - #6598

Merged
briansrls merged 7 commits into
mainfrom
session/deep-crane-705
Jul 14, 2026

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session deep-crane-705.
Pushing to session/deep-crane-705 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

Brian Searls added 4 commits July 14, 2026 07:27
CI's whole-tree compile-clean gate failed with "expected item declaration"
in fleet_converge_cli.dag and its witness test — both used // line comments,
which the parser doesn't support post-#5579.
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 14, 2026 08:23
Brian Searls added 2 commits July 14, 2026 08:32
…, duplicated fold

Splits refusal causes into a typed ConvergeCliRefusalCause coproduct
(PolicyUnsound/UnknownHost/KnobFrontier) instead of reusing
ConvergeVerdict.Absent's "no observation" meaning for four different
states; derives the Converged receipt's applied count from the actual
reconciled HostEffectIntent instead of recomputing it from the input;
dedupes host_converge_for_identity against fleet_compute_host_for_identity
via a shared find_by_identity<T> helper; adds a Terminal disposition
receipt for the new stage0 hand-Rust CLI transport handler.
@gunbai-bot

gunbai-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Addressed the review findings (commit 07cae42):

  1. Verdict state-space conflation (blocking) — confirmed valid. ConvergeVerdict.Absent is singly-authored for "no observation of effective state" (host_converge.dag:123-125); the CLI receipt reused it for four unrelated causes. Fix: minted ConvergeCliRefusalCause = PolicyUnsound{reason} | UnknownHost{host} | KnobFrontier{reason} as the typed internal/stderr representation, with converge_cli_refusal_message rendering the final string. The wire receipt line itself is unchanged (still the byte-locked host/applied/drifted/verdict grammar from fleet_converge_emit.dag's shell reference, which is itself 3-valued on verdict — that's the locked authority, not something this PR can widen); the typed split lives one layer up, in the cause carried alongside it. Witness test now asserts on the discriminated typed cause instead of substring-matching free text.

  2. Fabricated applied count — confirmed valid, though the "divergence" was not actually reachable today (the same host_converge value flows unmodified into intent.effect via host_effect_apply's pass-through). Still a real single-authority violation per DESIGN §5 (reconstructing a fact instead of reading it from the actual evidence). Fixed: converge_cli_applied_knob_count now derives the count from the reconciled HostEffectIntent.effect's ConvergePlan.policy.knobs, falling back to the input only for the two HostEffect variants this call site never constructs.

  3. Duplicated find-by-identity fold — confirmed valid. Extracted find_by_identity<T> in gunbc.host_converge and repointed both fleet_compute_host_for_identity (fleet_converge_apply.dag) and host_converge_for_identity (fleet_converge_cli.dag) onto it.

  4. Hand-Rust receipt — added a Terminal disposition (gunbc_converge_cli_stage0_receiver_disposition in fleet_converge_cli.dag) documenting handle_converge as the permanent CLI transport handler (DESIGN §3 transport-is-a-handler) rather than scaffold pending dissolution — it carries no converge logic, only argv parse → in-process interpreter call → stdout/exit-code projection, so there's no dissolution target to name honestly. Cited from a Rust doc comment on handle_converge itself.

Re-verified whole-tree compile-clean (0 diagnostics) and live execution: gunbc converge --host srv1 (knob-frontier refusal) and --host no-such-fleet-host (unknown-host refusal) both still produce the unchanged byte-locked receipt line, now with typed, discriminated causes underneath.

— sent from deep-crane-705

@gunbai-bot

gunbai-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Addressed the review-37851 finding: the Absent arm in converge_cli_receipt_for_host (apply-layer lookup miss against fleet_intent_known_hosts) was reusing UnknownHost, which is genuinely a different cause than the CLI-level policy-resolution Absent arm in converge_cli_run. Split it into a distinct ComputeInventoryAbsent { host } cause on ConvergeCliRefusalCause, with its own message text, and added a witness (witness_converge_cli_unknown_host_and_compute_inventory_absent_are_distinct_causes) directly discriminating the two causes and their rendered messages (this arm isn't reachable via current fixture data — the three fixture hosts fully overlap between the deployment-plan and compute-inventory lists — so the witness constructs both causes directly rather than through a live converge_cli_run path).

Verified green by execution via claim_batch (remote): PASS fleet_converge_cli_witness_holds (now 6 ANDed witnesses), plus unchanged live CLI receipts for srv1/no-such-fleet-host. Commit c7eda9fac.

— sent from deep-crane-705

@briansrls
briansrls merged commit 86f4e63 into main Jul 14, 2026
3 checks passed
@briansrls
briansrls deleted the session/deep-crane-705 branch July 14, 2026 14:52
briansrls added a commit that referenced this pull request Jul 14, 2026
…rge_cli_applied_knob_count one-special-variant dispatch (#6598 x #6586 stale-base interaction made main compile-red); floor compile-clean refusal now prints located hard diagnostics (it previously printed ok=false with zero located errors — this patch is what found the non-exhaustive match); nfr lens-precision note (field-scrutinee matches are lens-invisible, no roster row)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 14, 2026
…, compile-clean non-exhaustive match — and locate the compile-clean refusal (#6604)

* Fix the two nightly reds: roster orch_emit_let_step (nfr, masking receipt #9) + re-land the live-read design doc link lost to the #6564 merge race

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Fix the third nightly red (compile-clean) + locate the refusal: converge_cli_applied_knob_count one-special-variant dispatch (#6598 x #6586 stale-base interaction made main compile-red); floor compile-clean refusal now prints located hard diagnostics (it previously printed ok=false with zero located errors — this patch is what found the non-exhaustive match); nfr lens-precision note (field-scrutinee matches are lens-invisible, no roster row)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Roster the two #6582 structural-eq sites (live_read_carrier_eq, path_pattern_eq — coordination: silent-eagle-662's resolved audit, supersedes #6614) + dedupe the replace-all's second roster insertion

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 20, 2026
…spatch onto finished work)

Wave C4's brief described fleet_converge_emit.dag as ~275 lines of
Doc-literal bash (12+ fn defs, for-loops, while-read drain, arithmetic,
verdict if/elif) to route through EmitArtifactThenThinRun. That state no
longer exists: the keystone landed as #6572 (ConvergePlan +
EmitArtifactThenThinRun + converge_apply), #6585 (committed
.github/fleet-converge.sh golden shrunk 323 -> 21 lines), and #6598
(gunbc converge --host CLI receiver); FLAGs 2a(i)/2b/2c were
signed/discharged 2026-07-14. Receipts re-verified by execution
2026-07-20: fleet_converge_emit_{bootstrap,thin_run,policy}_holds,
fleet_converge_emit_holds, and fleet_converge_apply_holds all PASS,
including the drift gate vs the committed golden and its one-byte
perturb RED.

The stale "~275 lines" framing has now produced two worker dispatches
onto finished work (slice 0 on 2026-07-16, slice 2 on 2026-07-20 — this
session). Mirroring #6878 (the Phase-0/1 landing-record precedent), this
change updates the authority carriers so it cannot recur:

- roadmap_authority.dag 6-shell-slice2: reworded to MERGED /
  operator-sign-off-PENDING with the landing PRs and receipt date
  (done stays false — the sign is the operator's; mirrors
  6-shell-intent-phase1's shape).
- plans/shell_emission_model.dag: section-1 status and the slice-2 row
  updated to the merged/receipt state; dispatch note added.
- shell-to-dag-residual-census-and-arc-completion.md (hand-authored, no
  carrier): category-C fleet_converge_emit row marked dissolved with
  receipts; section-2 goal marked achieved (sign-off pending); sequence
  steps 1-2 marked landed, step 3 annotated still-open (the doc
  projection trigger remains a Scaffold binding
  fleet_converge_thin_invocation); P2 consumer slice marked landed
  (#6573); critical-path summary flipped from "P4 execution" to
  P5/P6 + the operator sign.
- ROADMAP.md / docs/plans/shell-emission-model.md /
  .github/live-deploy-srv1-apply.sh regenerated via
  generated_artifact_gate main_wet; drift gate green
  (run_generated_artifact_drift_gate ExitSuccess), and
  roadmap_authority_witnesses + roadmap_page_keystone_holds PASS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 21, 2026
…closeout: keystone already merged as #6572/#6585/#6598) (#6948)

* WIP: Wave C4 (shell->dag): fleet_converge_emit (~275 lines Doc-literal bash:

* Record shell-emission slice-2 landing in authority carriers (no re-dispatch onto finished work)

Wave C4's brief described fleet_converge_emit.dag as ~275 lines of
Doc-literal bash (12+ fn defs, for-loops, while-read drain, arithmetic,
verdict if/elif) to route through EmitArtifactThenThinRun. That state no
longer exists: the keystone landed as #6572 (ConvergePlan +
EmitArtifactThenThinRun + converge_apply), #6585 (committed
.github/fleet-converge.sh golden shrunk 323 -> 21 lines), and #6598
(gunbc converge --host CLI receiver); FLAGs 2a(i)/2b/2c were
signed/discharged 2026-07-14. Receipts re-verified by execution
2026-07-20: fleet_converge_emit_{bootstrap,thin_run,policy}_holds,
fleet_converge_emit_holds, and fleet_converge_apply_holds all PASS,
including the drift gate vs the committed golden and its one-byte
perturb RED.

The stale "~275 lines" framing has now produced two worker dispatches
onto finished work (slice 0 on 2026-07-16, slice 2 on 2026-07-20 — this
session). Mirroring #6878 (the Phase-0/1 landing-record precedent), this
change updates the authority carriers so it cannot recur:

- roadmap_authority.dag 6-shell-slice2: reworded to MERGED /
  operator-sign-off-PENDING with the landing PRs and receipt date
  (done stays false — the sign is the operator's; mirrors
  6-shell-intent-phase1's shape).
- plans/shell_emission_model.dag: section-1 status and the slice-2 row
  updated to the merged/receipt state; dispatch note added.
- shell-to-dag-residual-census-and-arc-completion.md (hand-authored, no
  carrier): category-C fleet_converge_emit row marked dissolved with
  receipts; section-2 goal marked achieved (sign-off pending); sequence
  steps 1-2 marked landed, step 3 annotated still-open (the doc
  projection trigger remains a Scaffold binding
  fleet_converge_thin_invocation); P2 consumer slice marked landed
  (#6573); critical-path summary flipped from "P4 execution" to
  P5/P6 + the operator sign.
- ROADMAP.md / docs/plans/shell-emission-model.md /
  .github/live-deploy-srv1-apply.sh regenerated via
  generated_artifact_gate main_wet; drift gate green
  (run_generated_artifact_drift_gate ExitSuccess), and
  roadmap_authority_witnesses + roadmap_page_keystone_holds PASS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* WIP: Wave C4 (shell->dag): fleet_converge_emit (~275 lines Doc-literal bash:

* Merge main into session/swift-moth-345; regenerate live-deploy artifact from merged carriers

Same class as the prior merge: the only conflict was the generated
.github/live-deploy-srv1-apply.sh (embeds ROADMAP.md; both sides
regenerated it). Took main's copy, rebuilt gunbc from the merged seed
(main changed cli_run.rs), re-ran generated_artifact_gate main_wet, and
verified the drift gate green (ExitSuccess).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Fable 5 <noreply@anthropic.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