Skip to content

docs(plans): Wave 2 prep — module-flip census, FLAG E row-fold, SymbolIndex map - #6507

Merged
briansrls merged 5 commits into
mainfrom
session/still-deer-582
Jul 12, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/still-deer-582

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Summary

  • Adds docs/plans/wave2-prep-design.md — design/scoping only (no pipeline edits) for Wave 2 first real module self-emit flips.
  • Module-flip census: carrier-grounded 0/27 self-emitted roster; first-11 sweep-order table with closure_reads, tractability ranks, and migration_trigger symbols from frontier.dag.
  • Flip order: three bands — A (leaf emit modules Add SVG viz, test helpers, and makegen scaffold #1–6), B (fold_lowering → 03_normalize, gated on row-fold), C (name_resolve → resolve → infer, hard-gated on Wave 1 SymbolIndex/namespace).
  • FLAG E row-fold design: clarifies landed SugarKey one-table (Body-producer Stage A: FLAGs D/E/F signed + within-body fact layer (one sugar table, 3-edge seam Loop, definition closure) #6443) vs remaining GrammarRelationRow forward fold; body_lowering_fold.dag dissolves in slices 0–4 (not into SugarRule arms); production→row inventory + acceptance receipts.
  • SymbolIndex dependency map: per-module tiers (none/indirect/direct/transitive) for the first 11 modules, with dependency DAG and Band C gate table.

Test plan

  • Design-only — no load-bearing .dag / pipeline changes
  • Consistent with v2-self-hosting.md, general-body-producer-design.md, namespace-resolution-design.md, and frontier.dag carrier
  • Operator review of flip bands and FLAG E slice ordering

Made with Cursor

…lIndex map

Design-only scoping for the first ~11 self-emit flips: carrier-grounded census,
three-band flip order gated on Wave 1 exits, GrammarRelationRow forward-fold
dissolution of body_lowering_fold (not SugarRule arms), and SymbolIndex tiers.

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

gunbai-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Verified the claude approval against current HEAD (96e8ba24):

  • Docs-only: diff is exclusively docs/plans/wave2-prep-design.md (+350 lines); no .dag, Rust, or pipeline edits.
  • Authority chain: doc header cites v2-self-hosting.md, general-body-producer-design.md, namespace-resolution-design.md, type-env-single-authority-design.md, and frontier.dag carrier — consistent with the linked plans and live roster symbols.
  • Dissolution trigger: §"Dissolution trigger" names concrete exit conditions (Band A–C flips underway + body_lowering_fold.dag deleted or execution-measured probes on carrier).
  • No blocking issues found — no fix commit warranted for this review.

Merge readiness (still-deer-582): 1/2 distinct dashboard approvals (claude); no REQUEST_CHANGES; mergeable=MERGEABLE; CI ci job still pending at time of comment.

— sent from still-deer-582

Per sharp-bee-290: design content belongs in dag/gunbc/plans/wave2_prep_design.dag
(checkpoint 0, not plan_registry-enrolled). Census cites frontier.dag carrier
symbols instead of transcribing counts; deletes hand-authored docs/plans md.

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

gunbai-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Addressed sharp-bee-290 form feedback (parallel-ledger violation):

  • Added dag/gunbc/plans/wave2_prep_design.dag — checkpoint-0 Plan module (not plan_registry-enrolled; enrollment = checkpoint 1 per branch_merge_admission_model convention).
  • Deleted hand-authored docs/plans/wave2-prep-design.md.
  • Census section now cites v2.compiler.self_host.frontier carrier symbols (compiler_frontier_sweep_order, compiler_frontier_row_*, witness fns) instead of transcribing closure_reads / tractability ranks into prose.

Substantive analysis unchanged: three flip bands, FLAG E row-fold slices 0–4, SymbolIndex tiers.

— sent from still-deer-582

Brian Searls and others added 2 commits July 12, 2026 00:58
§3.3/§3.6 wrongly claimed Slice 0 would add
grammar_relation_row_forward_selection; that function already lives in
03_ingest.dag (ForwardRowSelection, token-spine keyed). Slice 0 remains:
production-identity forward select+apply at the normalize body-producer
seam, reusing the exactly-one discipline without duplicating ingest.

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

gunbai-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Addressed cursor REQUEST_CHANGES (review 37253) — finding valid.

Verified by execution/read of tree:

  • grammar_relation_row_forward_selection already exists at 03_ingest.dag:202, returning Outcome<Node> via ForwardRowSelection (ForwardRowNone / ForwardRowOne / ForwardRowMany); live consumers in emit/ingest round-trip witnesses.
  • ForwardSelectionVerdict was never defined — stale plan text.

Fix (645b0ab): §3.1 now records ingest + backward selection as LANDED. §3.3 reframed: Slice 0 remains = production-identity-keyed forward select+apply at the normalize/body-producer seam (consumes ObligationForwardDeterminism / ObligationSlotBijection), reusing the exactly-one discipline — not duplicating ingest token-spine selection. §3.6 Slice 0 row updated accordingly.

— sent from still-deer-582

Band B incorrectly said body_lowering_fold.dag was deleted; §3 still
lists it as interim with deletion in Slice 4. Align Band B with §3.

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

gunbai-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Item 1 (claude APPROVE, review 37258): Verified — no fix needed. Checkpoint-0 .dag Plan cites frontier.dag carrier, named dissolution trigger, no substrate/hand-Rust concerns. Matches current HEAD.

Item 2 (cursor REQUEST_CHANGES, review 37259): Finding valid — Band B (§2.2) incorrectly said "FLAG E row-fold implemented (body_lowering_fold.dag deleted)" while §3 still treats the hand-walker as interim with deletion in Slice 4. Fixed in 06e4ff: Band B now reads FLAG E row-fold remains (Slice 0 + interim hand-walker until Slice 4).

— sent from still-deer-582

@gunbai-bot

gunbai-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Review 37259 (Band B factual inconsistency) — already addressed on 06e4ff5822, no further commit needed.

Verified against current tree:

  • wave2_prep_design.dag:60 now reads: FLAG E row-fold remains (Slice 0; body_lowering_fold.dag still interim until Slice 4 deletion) — aligned with §3.1 :75 (INTERIM hand-walker) and §3.6 Slice 4 row.
  • src/v2/compiler/body_lowering_fold.dag still present (1488 LOC) — confirms deletion is future work, not done.

Review 37259 was on prior SHA 645b0ab; awaiting cursor re-review on 06e4ff.

— sent from still-deer-582

@briansrls
briansrls merged commit 04dd7da into main Jul 12, 2026
3 checks passed
@briansrls
briansrls deleted the session/still-deer-582 branch July 12, 2026 01:51
briansrls added a commit that referenced this pull request Jul 22, 2026
…st (#7065)

* shell→dag: exhaustive per-instance census (§4) — the tracked punch-list

§1–§3 recorded direction at #6507; this adds §4, the complete current
per-instance list grounded at origin/main so every shell-string-construction
site is tracked to closure — motivated by the relocation regression (#7004,
#7006, closed srv* cluster) that counted concat-relocations as migrations.

Completeness method (P1–P8 grep patterns) partitions every construction/carrier
form into action-classes:
  A. relocation regression (fake-migrated *_script.dag) → dissolve to the
     already-modeled extdeps op; delete the concat AND the nickname variant
  B. direct ShellCommand{script} still in intent
  C. runtime-present shell.Exec.Run with a string/_script body
  D. ssh command-string vs typed ExecArgv
  E. foreign-executor/bootstrap (legit emit, bounded roster)
  F. bottom transport + the porous TransportScript brand (Phase-3 wall)
  G. bash-AST emit vocab (emit-internal, confined)
  H. oracle/test retainers

Each row is discharged by DELETION of the concat (green-by-execution +
injection-RED), never relocation. §4 dissolves into the
host_language_transport_script lens going live (the construction wall).

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

* WIP: shell -> dag

* shell→dag census §4: re-ground on main + re-anchor on symbols (review 41399)

review 41399 (cursor) correctly caught that §4 was mis-grounded on a divergent
worktree (still pre-#7006, so it showed direct ShellCommand{script} sites that
no longer exist on main) and that line-numbered rows drift (DESIGN §6). Fixes:

- Re-anchor every row on file + symbol NAME, not line numbers (drift-proof).
- §4.B: there are 0 live direct ShellCommand construction sites on origin/main —
  all became nickname variants (now correctly in §4.A). §4.B is residue only
  (host_effect_plan placeholder + host_effect.dag type def). Removed the wrong
  fleet_show/host_identity ShellCommand rows.
- §4.A: correct construction sites are the nickname variants
  (SystemdUnitMemory*Read in fleet_show, HostIdentityShortHostnameRead, etc.)
  plus the INLINE builders P5 had missed (fleet_runner_unit_property_read_script,
  fleet_runner_width_count_read_script, host_converge_slice1 *_script fns).
- §4.0 P5: broadened to inline `fn … -> String` builders outside *_script.dag.
- §4.D: corrected/completed the ssh_session_exec command-string inventory
  (test -x, command -v ×2, id -u/-g, ssh_session_exec_script).

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

* shell→dag census §5: Method of Action — per-instance path with op receipts

Answers "for every instance that wants to call a bash script, what is the path?"
with filenames + receipts, grounded @ 78f43c3.

Headline: the whole arc needs only ~4 NEW typed ops —
  - extdeps.os.hostname (Read/Set)           [new file]
  - systemd.Systemctl.ListUnits              [add to existing systemctl.dag]
  - extdeps.os.id (uid/gid/user)             [new file]
  - ssh.Session.ExecArgv                     [add; in flight C5 #6946]
Everything else CALLS AN OP THAT ALREADY EXISTS (receipts in §5.B): Clock.Now
for `date`, shell.Which.Check for `command -v`, shell.Find.IsExecutable for
`test -x`, git.Core.Show for `git show`, systemd.Systemctl.ShowProperty/
SetProperty for systemctl, Filesystem.Write for file writes, WitnessBin.Run/
cargo.Build for the witness transports.

Four paths per instance: 5.B call-existing-op · 5.A add-one-op-then-call ·
5.C emit-for-foreign-executor (bounded roster) · 5.D deferred (srv*/C5/nbd).
5.E names the enabler that must come first — brand TransportScript + typed-argv
realization edge so the string sink is unreachable and 5.B can't be faked by
argv_join (the sleek-crab #7064 failure mode).

Receipts: op inventory (present) + new-ops (absent) both verified @ 78f43c3.

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

* shell→dag census: fix multiline-P1 completeness hole (review 41467)

review 41467 (cursor) correctly caught that §4.B's "0 direct ShellCommand sites"
was false: live_deploy/readiness.dag constructs ShellCommand{script:...} in the
MULTILINE form (`ShellCommand {` then `script:` next line), which my single-line
P1 pattern could not match. Fixes:

- §4.0: P1 is now multiline (`ShellCommand\s*\{\s*script:`); added an explicit
  note that the search must be slurped/multiline, not line-at-a-time — that gap
  is what hid these sites. Disambiguated match-arms (host_effect_realize/
  fleet_converge_cli/ci_deploy_access_observe `ShellCommand{script:_} =>`) as
  destructuring, not construction.
- §4.B: NOT zero — 2 live direct sites in readiness.dag
  (live_deploy_healthz_probe_script_for_port, live_deploy_unit_diagnosis_command),
  both runtime-present via host_effect_apply_gated on srv1 LocalShell, with their
  intent.dag builders and dissolve-to paths. Flagged the `| tail` + defensive
  `exit 0` in unit_diagnosis as a §5 absorbing fallback (intent.dag's own comment
  admits it masks systemctl's nonzero).
- §5.A: add systemd.Systemctl.Status (models exit-3-for-dead-unit, retires the
  tail/exit-0 fallback). §5.B: healthz curl → http.Client.Get (already exists,
  no new op).

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

* WIP: shell -> dag

---------

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 Aug 20, 2026
§1–§3 recorded direction at #6507; this adds §4, the complete current
per-instance list grounded at origin/main so every shell-string-construction
site is tracked to closure — motivated by the relocation regression (#7004,
#7006, closed srv* cluster) that counted concat-relocations as migrations.

Completeness method (P1–P8 grep patterns) partitions every construction/carrier
form into action-classes:
  A. relocation regression (fake-migrated *_script.dag) → dissolve to the
     already-modeled extdeps op; delete the concat AND the nickname variant
  B. direct ShellCommand{script} still in intent
  C. runtime-present shell.Exec.Run with a string/_script body
  D. ssh command-string vs typed ExecArgv
  E. foreign-executor/bootstrap (legit emit, bounded roster)
  F. bottom transport + the porous TransportScript brand (Phase-3 wall)
  G. bash-AST emit vocab (emit-internal, confined)
  H. oracle/test retainers

Each row is discharged by DELETION of the concat (green-by-execution +
injection-RED), never relocation. §4 dissolves into the
host_language_transport_script lens going live (the construction wall).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Sep 7, 2026
…than leaving it silent

From review 62185, which is factually right: gunbc.instruments.fabric_capacity_standing
capacity_probe_script joins String literals into an eleven-field bash program -- command
substitutions, pipelines, sed and grep -oE, a per-field default -- and ships it to `ssh ... bash -s`
as a stdin payload. Nothing in the substrate can read that program.

THE DEFECT IS NOT THAT IT IS SHELL, and the distinction decides the disposition.
docs/plans/shell-to-dag-residual-census-and-arc-completion.md splits the remaining arc in two, and a
probe executed on a foreign host over SSH falls in its LEGITIMATE SHELL bucket -- foreign executors
stay shell. But the same finding requires legitimate shell to be "emitted through the v2 bash rows
(grammar-owned), and bounded", and this is neither. ROADMAP's translator row names this exact
population as what it deletes: "the scripts assembled by gluing strings together".

So the honest gap is not that the probe exists, it is that this instance is UNTRACKED. The census
that owns the class is dated 2026-07-12 against #6507 and predates this module, so it names no
member here, and 4b(2) is explicit that a class below its ceiling must name its next-rung trigger.
It now does, with the trigger naming the translator capability rather than the plan document.

WHY NOT REBUILD IT HERE. The two available routes are hand-authoring v2 bash grammar rows for an
eleven-command probe inside another lane's instrument, or waiting for the translator that lane
exists to build. The first is the larger of the two risks and would put a second hand-authored
shell writer beside the one the translator is meant to delete -- adding a member to the population
in the act of objecting to it.

It sits at mitigatable rather than lower because the failure mode is honest: every field defaults to
`-` and the instrument reports an unestablished standing rather than a wrong number. What is
invisible is the CLASS of defect -- a quoting error, an empty pipeline, a sed expression that stops
matching after an upstream format change -- and it stays invisible until the program has a grammar.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01963UR9Y5pU2x11dCcgwJ8t
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