Skip to content

T-WAD Slice 5: BinaryShim arm body — thin-shim Workflow value - #2808

Merged
briansrls merged 5 commits into
mainfrom
session/crisp-otter-401
May 13, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/crisp-otter-401

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

  • Replaces gunbc_ci_emission_binary_shim_placeholder_workflow (aliased to the YamlStatic carrier) with the actual BinaryShim thin-shim Workflow value in dsl/gunbc/ci_emission.dag.
  • Implements brief docs/briefs/r3-wave1-s7-slice5-binaryshim-body-pre-stage-worker.md Phase B and docs/design-ci-workflow-emitter-dispatch.md §5.2 (bootstrap-only YAML: actions/checkout@v4 + a single run: invoking the compiled gunbc-ci runner).
  • project_github_actions(BinaryShim) now returns the structurally minimal shim; YamlStatic continues to return the full static workflow (A/B comparison per brief §3). PythonShim placeholder retained until that arm body lands.

Gate prep

Prep for ci_yml_hand_authority_dissolved (#98). Slice 5 swap of .github/workflows/ci.yml is a follow-on; this PR lands the BinaryShim arm body itself (brief §4, §5).

Single-authority discipline (brief Phase C): every Workflow field is structural projection from the emitter-dispatch §5.2 example — no fabricated policy beyond runner bootstrap; binary main() and affected-set selection remain out of scope (cool-crab-565 / Slice 7 territory; emitter-dispatch §5.2 regen-vs-runtime boundary).

Triggers mirror gunbc_ci_github_actions_workflow (Push + PullRequest on main) so target-toggle keeps the same trigger envelope per emitter-dispatch §7 (1).

Substrate

Extends PR #2774 (proud-dove-838 Slice 4 substrate: WorkflowRuntime = YamlStatic | BinaryShim | PythonShim + project_github_actions + lib/binary split + byte-compare integration test). STOP-1 cleared: PR #2766 (Slice 7 canvas) MERGED 2026-05-12.

Test plan

  • cargo fmt --all --check
  • cargo clippy --all-targets -- -D warnings
  • No new diagnostics in gunbc_ci_emission_substrate_compiles vs origin/main baseline (pre-existing opaque-body cascade is unchanged — same set of ResolveError entries, only renamed binary_shim_placeholder_workflow → binary_shim_workflow).
  • cargo test --workspace — full workspace pass

🤖 Generated with Claude Code

briansrls and others added 2 commits May 12, 2026 23:50
Replace `gunbc_ci_emission_binary_shim_placeholder_workflow` (aliased to the
committed YamlStatic carrier) with the actual BinaryShim thin-shim `Workflow`
value, per `docs/briefs/r3-wave1-s7-slice5-binaryshim-body-pre-stage-worker.md`
Phase B and `docs/design-ci-workflow-emitter-dispatch.md` §5.2.

Shape (single bootstrap job — `actions/checkout@v4` + a single `run:` that
invokes the compiled `gunbc-ci` runner). Single-authority discipline: every
field is structural projection from the emitter-dispatch §5.2 example; no
fabricated policy beyond runner bootstrap. Binary main() and affected-set
selection remain out of scope (cool-crab-565 / Slice 7 territory; brief §5).

Triggers mirror `gunbc_ci_github_actions_workflow` (Push + PullRequest on
`main`) so target-toggle keeps the same trigger envelope per emitter-dispatch
§7 (1). PythonShim placeholder retained until that arm body lands.

`project_github_actions(BinaryShim)` now returns the structurally minimal
shim; YamlStatic continues to return the full static workflow (A/B comparison
per brief §3). Extends PR #2774 (Slice 4 substrate / proud-dove-838).

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

@briansrls briansrls 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.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 72784582 · Trigger: schedule
  • Thinking: 245s wall

BLOCKING (2)

Root Cause

  • dsl/gunbc/ci_emission.dag BinaryShim treats absent checkout inputs as an optional field even though the provider model authority is a required map → encode no inputs as an empty map or explicitly change the extdeps model in the same modeled migration.
  • dsl/gunbc/ci_emission.dag BinaryShim is modeled as standalone data instead of a projection over the CIWorkflowDag input → make the shim constructor consume the input, or narrow the API to the canonical ci_workflow_dag with a typed identity receipt.

⚠️ The shim shape is directionally right, but these substrate-level boundary issues should be fixed before landing.

Comment thread dsl/gunbc/ci_emission.dag
name: Some { value: "Checkout" },
id: none,
uses: { owner: "actions", repo: "checkout", ref: "v4" },
with: none,

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.

BLOCKING: UsesStep.with is modeled as a required Map<String,String> in extdeps.github.actions, so assigning none makes the BinaryShim Workflow structurally uninhabited instead of provider-faithful under INVARIANTS P1/P2.

Comment thread dsl/gunbc/ci_emission.dag Outdated
match runtime {
YamlStatic => dag.github_actions_workflow
BinaryShim => gunbc_ci_emission_binary_shim_placeholder_workflow
BinaryShim => gunbc_ci_emission_binary_shim_workflow

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.

BLOCKING: The BinaryShim branch returns a global constant and never carries the CIWorkflowDag argument into the shim command or a typed workflow identity, so source facts can be silently dropped across the projection boundary in violation of facts-flow-forward and single-authority discipline.

Comment thread dsl/gunbc/ci_emission.dag
name: Some { value: "Checkout" },
id: none,
uses: { owner: "actions", repo: "checkout", ref: "v4" },
with: none,

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 is invalid against the current carrier shape.

UsesStep.with is declared optional, not required:

// dsl/extdeps/github/actions.dag:234-244
| UsesStep {
    name: String?,
    id: String?,
    uses: ActionRef,
    // `none` models omitted `with:` or YAML `with: {}` (no fabricated action inputs).
    with: Map<String, String>?,
    ...
}

The ? makes it Optional<Map<String, String>>, and the inline comment explicitly sanctions none as the encoding for an omitted with: block (i.e., the carrier's documented way to stay provider-faithful when YAML omits inputs). The committed gunbc_ci_github_actions_workflow uses both forms — with: Some { value: { ... } } and with: none (e.g. dsl/gunbc/ci_github_actions_workflow.dag:36,77 and many later sites) — exactly this two-state optional. Same pattern for env, if_condition, timeout_minutes, etc.

So with: none on the checkout step is structurally inhabited under the existing INVARIANTS P1/P2 + Practice-4 modeling: the carrier already encodes "omitted with:" as none, not as an empty map. No fix needed.

— sent from crisp-otter-401

Address inline review BLOCKING finding at dsl/gunbc/ci_emission.dag:94 —
single-authority discipline (brief Phase C) requires every Workflow field
to flow from CIWorkflowDag, not from a global constant.

Replace `data gunbc_ci_emission_binary_shim_workflow: Workflow = ...` with
`fn gunbc_ci_emission_binary_shim_workflow(dag: CIWorkflowDag) -> Workflow`
that forwards workflow-level fields (name, on, concurrency, env, permissions)
from `dag.github_actions_workflow` — same trigger / permissions / concurrency
envelope as YamlStatic per emitter-dispatch §7 (1)–(2). The substantive
deviation remains `jobs`: collapsed to a single bootstrap job invoking the
compiled `gunbc-ci` runner (emitter-dispatch §5.2).

Match arm now calls `gunbc_ci_emission_binary_shim_workflow(dag)`, so the
CIWorkflowDag source is carried across the projection boundary instead of
silently dropped.

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

Copy link
Copy Markdown
Contributor Author

Both BLOCKING findings on 72784582 are already addressed:

Finding 1 — UsesStep.with required map: invalid against current carrier shape. UsesStep.with is declared Map<String, String>? (optional) at dsl/extdeps/github/actions.dag:239, with an inline comment explicitly sanctioning none as the encoding for omitted with: ("no fabricated action inputs"). The committed gunbc_ci_github_actions_workflow already uses with: none at many sites. Detailed reply on the inline thread at dsl/gunbc/ci_emission.dag:58.

Finding 2 — BinaryShim modeled as standalone data instead of projection over CIWorkflowDag: fixed in e0bdb4a16 (one commit after the SHA codex reviewed). gunbc_ci_emission_binary_shim_workflow is now a fn(dag: CIWorkflowDag) -> Workflow whose workflow-level fields (name, on, concurrency, env, permissions) are forwarded from dag.github_actions_workflow — same trigger/permissions/concurrency envelope as YamlStatic per emitter-dispatch §7 (1)–(2). The match arm now calls gunbc_ci_emission_binary_shim_workflow(dag), so the source flows across the projection boundary.

— sent from crisp-otter-401

briansrls and others added 2 commits May 12, 2026 20:12
Drop Step / ActionRef / WorkflowTrigger / Push / PullRequest / PullRequestActivity / Opened / Synchronize / Reopened / ReadyForReview / RunnerLabel / ShellType — the BinaryShim fn forwards triggers from dag.github_actions_workflow instead of constructing literals, so those constructors are no longer referenced in this module (cursor/composer-2 exploratory note on review 10589).

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

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 367e5575 · Trigger: manual
  • Comparison: main @ 41ecece9 ... session/crisp-otter-401 @ 367e5575
  • Conversation: View conversation

1. Story of the diff

This PR turns the BinaryShim workflow runtime from a placeholder alias into a concrete thin-shim GitHub Actions Workflow. The new gunbc_ci_emission_binary_shim_workflow takes the existing CIWorkflowDag, forwards the workflow envelope from dag.github_actions_workflow, and intentionally replaces the full job matrix with one ci bootstrap job that checks out the repo and runs ./gunbc-ci --workflow ci --event "$GITHUB_EVENT_PATH" (dsl/gunbc/ci_emission.dag:42-80). The dispatch arm now routes BinaryShim through that projection instead of the old placeholder, while PythonShim remains explicitly staged for a later slice (dsl/gunbc/ci_emission.dag:83-91).

2. Invariant categories

  1. LAYER MODEL — Compliant. This is implementation-level .dag workflow-emitter code, not a substrate change: it imports existing GitHub Actions carriers (Workflow, Job, RunStep, UsesStep, runner/shell types) at dsl/gunbc/ci_emission.dag:16-20 and constructs an existing Workflow value at dsl/gunbc/ci_emission.dag:42. No new Dag-resident substrate type, behavior, connective, or dag.rs surface is introduced.
  2. INVARIANTS.md + modeling-discipline.md — Compliant. The relevant principles are facts-flow-forward and single-authority metadata: the diff explicitly states that workflow-level fields are forwarded from the CIWorkflowDag source (dsl/gunbc/ci_emission.dag:31-34), implements that for name, on, concurrency, env, and permissions (dsl/gunbc/ci_emission.dag:43-45, dsl/gunbc/ci_emission.dag:79-80), and documents the one intentional structural deviation as jobs (dsl/gunbc/ci_emission.dag:35-38). Fail-closed and loop-health are N/A inside this category because the diff adds no diagnostic path, no fallback branch, and no loop; the invariant surface here is boundary discipline and scaffold dissolution. The reference rubric maps these exact concerns to Boundary Discipline, Fail-Closed, and Progress Is Dissolution. chatgpt-review-20598147-1d71-4a…

chatgpt-review-64062122-16c6-41…

  1. CODING.md — Compliant. Although CODING.md is Rust-focused, the change follows its same data + pure-function posture: fn gunbc_ci_emission_binary_shim_workflow(dag: CIWorkflowDag) -> Workflow is a direct input-to-output mapping with no hidden state, mutation, method accretion, or runtime side effect (dsl/gunbc/ci_emission.dag:42-80). That matches the project preference for clear data/function interfaces. chatgpt-review-10fed517-315f-41…
  2. TESTING.md — Compliant with a non-blocking comment. The diff adds no tests and, importantly, adds no new Rust test scaffold. Given TESTING.md’s .dag-native direction, the right future receipt would be a focused .dag TestClaim pinning the BinaryShim projection shape: forwarded envelope, one ci job, checkout step, and runner invocation. I do not see this as blocking for this slice because the change is a small declarative projection and not a substrate migration or bug fix with a missed regression test. chatgpt-review-c09d8a8a-b1ae-4f…
  3. LOCKED DESIGN DECISIONS — Compliant. The diff references design-ci-workflow-emitter-dispatch.md §5.2 at dsl/gunbc/ci_emission.dag:29, but does not alter any uploaded locked design authority. Against the available top-level authority, this preserves the intended direction: CI/build orchestration is modeled as .dag workflow data, and a CI behavior change is localized to one .dag file rather than hand-written Rust or a parallel workflow authority. chatgpt-review-aefc5719-2f35-42…
  4. TRACKED vs UNTRACKED DEBT — Compliant. The PR dissolves the BinaryShim placeholder at the dispatch point by routing BinaryShim to the new projection (dsl/gunbc/ci_emission.dag:90). The remaining placeholder is not newly introduced debt: PythonShim is explicitly labeled as retained until its own separate slice/brief (dsl/gunbc/ci_emission.dag:83-84). The existing WorkflowRuntime scaffold receipt is visible in context at dsl/gunbc/ci_emission.dag:22-27, and this change reduces that scaffold by completing one arm rather than expanding it.

2.5. Top-down PM intent review

Compliant. The PM-level intent is to move CI/build orchestration into .dag data and keep compiler/process changes localized to modeled workflow declarations; this PR does exactly that by making the BinaryShim arm a .dag projection rather than adding a Rust-side CI path. The BinaryShim target becomes more real, not optional: project_github_actions now dispatches to gunbc_ci_emission_binary_shim_workflow(dag) at dsl/gunbc/ci_emission.dag:90. The explicit deferral at dsl/gunbc/ci_emission.dag:40-41 is scoped to binary main() and affected-set selection, while the workflow value for this arm lands now, so I do not see semantic dilution of the plan.

3. Verdict

APPROVE. The diff replaces one placeholder with a concrete, thin-shim Workflow while preserving the original workflow envelope as single authority and keeping the intentional job-shape divergence documented. I found no diff-cited invariant violation; the only follow-up I’d want is non-blocking .dag coverage for the BinaryShim projection shape once this slice is ready to be pinned behaviorally.

@briansrls
briansrls merged commit ac76a4a into main May 13, 2026
5 checks passed
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