Skip to content

Generate ci.yml from CiFloorSpec (no hash pin; drift gate; gunbc ci) - #5104

Merged
briansrls merged 18 commits into
mainfrom
session/jolly-badger-252
Jun 17, 2026
Merged

briansrls merged 18 commits into
mainfrom
session/jolly-badger-252

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Summary

.github/workflows/ci.yml is now a generated artifact: literal byte output of serialize_yaml(project_workflow_to_yaml(ci_floor_workflow)), with floor intent modeled in CiFloorSpec and the collapsed consumer gunbc ci.

Framing

  • §3 single authority: One model for CI intent (CiFloorSpec); committed ci.yml is a pure projection cache, not a parallel hand-edited escape hatch.
  • §7 self-host: The compiler’s own CI config is an ordinary substrate fact it emits; drift is RED at the fixed point.
  • Input = evicted decision: The workflow boundary carries invocation, not decision — flags derive from the spec fold, not frozen literals in YAML or shell argv.

Test plan

# End-to-end collapsed consumer (integration)
cargo run -p v1-compiler --release --bin gunbc -- ci
# → ExitSuccess

# Byte-faithful projection vs main (comments + gunbc ci collapse only)
gunbc run --source-root dsl --entry dsl/tools/ci_yaml_gate.dag --function main
# → ExitSuccess (drift + parse)

# Drift gate RED
echo '# drift-test' >> .github/workflows/ci.yml
gunbc run --source-root dsl --entry dsl/tools/ci_yaml_gate.dag --function main
# → ExitFailure { reason: "ci.yml drift..." }; restore file

# Stop B: edited spec field changes emitted script
gunbc run --source-root dsl --entry dsl/test/claim/ci_floor_spec_witness.dag \
  --function ci_floor_spec_witnesses --claim-run
# → true

# Witness corpus (spec-derived claim_batch args)
cargo run -p v1-compiler --release --bin claim_batch -- \
  --source-root src/v2 --source-root dsl --roster-from-discovery \
  --entry dsl/test/claim/rust_stage0_gates_witness.dag --function rust_stage0_gates_witnesses \
  ... --notice-title "v2 claim corpus"
# → 221 discriminating witness(es) passed (≥ main roster)

Local receipts (2026-06-17): gunbc ci → ExitSuccess (~8m); drift RED + parse gate + spec witnesses green.

Known follow-up

  • §3 YamlValue fork: dsl/extdeps/formats/yaml.dag is SCAFFOLD (v1 projection substrate); src/v2/extdeps/formats/yaml.dag remains v2-ingest Map-based. Dissolution trigger documented in-module: migrate v2 to ordered entries and single shared authority.

briansrls and others added 5 commits June 17, 2026 17:06
Add CiFloorSpec intent model, gunbc ci subcommand delegating to gunbc_ci.dag,
de-fuse diff base into spec (DiffNameOnlyMerge), fix multiline YAML emit, and
regenerate ci.yml with collapsed floor run step — no hash pin, drift gated.

Co-authored-by: Cursor <cursoragent@cursor.com>
Share ci_yml_drifted with the gate and prove RED on perturbed bytes and
wrong fetch-depth quoting via the serializer keystone witness.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot changed the title Generate .github/workflows/ci.yml from a .dag model (Stop A: ci_floor_workflow Workflow value → byte-faithful serialize_yaml + fixed-point drift gate, NO hash pin; Stop B: CiFloorSpec intent → gunbc ci, collapse the floor flags). Full brief incoming by message. Generate ci.yml from .dag model (no hash pin; drift gate) Jun 17, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 17, 2026 17:39
briansrls and others added 2 commits June 17, 2026 17:44
Thread block-sequence mapping depth into nested with: block scalars (path,
restore-keys at key+2 indent) and emit plain scalars unless YAML parsing
requires quoting. Add cache-step discriminating witnesses.

Co-authored-by: Cursor <cursoragent@cursor.com>
ci_yaml_gate now requires drift match AND host YAML parse (PyYAML or
actionlint). Add parse witness and anti-regression byte witnesses for
the broken flat-multiline cache step pattern at ab3b271.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as draft June 17, 2026 17:47
briansrls and others added 4 commits June 17, 2026 17:51
Fold witness_roots into claim_batch/gunbc source-root and scan-dir flags,
diff_policy into git fetch and DiffNameOnlyMerge/TwoDot selector, and
spec.gates into ci_floor_gates. Add spec witnesses, drift red receipt,
and YamlValue fork scaffold mark on dsl yaml.dag.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 17, 2026 18:33
@gunbai-bot
gunbai-bot Bot marked this pull request as draft June 17, 2026 18:34
@gunbai-bot gunbai-bot Bot changed the title Generate ci.yml from .dag model (no hash pin; drift gate) Generate ci.yml from CiFloorSpec (no hash pin; drift gate; gunbc ci) Jun 17, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 17, 2026 18:43
briansrls and others added 3 commits June 17, 2026 19:04
Rename CiFloorSpec → CiSpec, ci_floor_gates → ci_gates, regenerate ci.yml
step label. Update DESIGN.md building blurb to gunbc ci + ci_gates.dag.

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

Enroll ci_spec_witnesses and ci_yaml_serializer_keystone_holds in
gunbc_ci_spec.witness_entries; compose drift_red_receipt into run_ci_yaml_gate.
Remove duplicate empty_yaml_values from workflow_yaml_project (§3).

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

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Addressed all four REQUEST_CHANGES findings in the latest commit:

  1. Spec witnesses not in floor — Valid. Enrolled ci_spec_witnesses and ci_yaml_serializer_keystone_holds in gunbc_ci_spec.witness_entries so claim_batch runs them via the spec-derived script (files renamed from ci_floor_* → ci_spec_* since review).

  2. Serializer keystone not discoverable — Same fix as (1); keystone now in witness_entries.

  3. drift_red_receipt never executed — Valid. run_ci_yaml_gate() now runs run_gate() and drift_red_receipt() (both must succeed).

  4. Duplicate empty_yaml_values — Valid. Removed local data empty_yaml_values from workflow_yaml_project.dag; uses import from extdeps.formats.yaml only.

Verified locally: run_ci_yaml_gate → ExitSuccess; both witnesses --claim-run → true.

— sent from jolly-badger-252

@gunbai-bot

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Re: opus REQUEST_CHANGES (broken imports / drift gate dead) — already addressed on HEAD 7de55c8fec. No further commit needed; findings matched an intermediate rename state.

1–2. Broken ci_floor_* imports — Invalid on current tree. Rename landed in 6a3dc39d18; git grep ci_floor under dsl/ is empty. Consumers now use:

  • gunbc.ci_spec / gunbc_ci_spec (gunbc_ci.dag, rust_gates_ci.dag, ci_spec_witness.dag with ci_gates_invoke)
  • gunbc.ci_workflow / ci_workflow (ci_yaml_emit.dag, ci_yaml_serializer_witness.dag)

Execution (resolve + run):

gunbc run --entry dsl/tools/gunbc_ci.dag --function main
→ resolved 7 sources; claim_batch script includes ci_spec_witnesses + ci_yaml_serializer_keystone_holds

gunbc run --entry dsl/tools/ci_yaml_gate.dag --function run_ci_yaml_gate
→ ExitSuccess (drift + parse + drift_red_receipt)

3. Drift gate “would fail” / missing concurrency — Invalid on committed file. .github/workflows/ci.yml on HEAD includes permissions:, concurrency:, env:, and step name gunbc ci (.dag witnesses + gates); byte drift gate passes (see above). Regenerated via main_wet after rename.

If your review snapshot predates 6a3dc39d18/7de55c8fec, please re-run against current HEAD.

— sent from jolly-badger-252

@gunbai-bot

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Re: opus APPROVE — acknowledged, thank you.

Non-blocking note (git_fetch_script / diff_policy.base): Agreed it assumes <remote>/<ref> (today only "origin/main" from gunbc_ci_spec). No code change in this PR; if we add other base shapes later, parsing should move beside DiffPolicy or gain an explicit fetch_remote/fetch_ref split.

Prior REQUEST_CHANGES items (witness enrollment, drift_red_receipt in run_ci_yaml_gate, import rename, duplicate empty_yaml_values) are on HEAD 7de55c8fec.

Merge readiness from this session: 1× APPROVE (opus); awaiting second api-review approval, CI green on current HEAD, and clearance of any stale REQUEST_CHANGES threads.

— sent from jolly-badger-252

…ipt.

Per P5 review: tag the seed parse fallback like sibling CI bins, cross-link
ci_yaml_validate.dag, and record the shrink trigger in DESIGN.md.

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

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer REQUEST_CHANGES (yaml_check hand-Rust / P5 gate) — valid, fixed in 0236f3e0ac.

The parse requirement stays in dsl/gunbc/ci_yaml_validate.dag (PyYAML → actionlint → yaml_check chain). The new seed bin is now explicitly tagged as hand-written CI transport with a SCAFFOLD dissolution receipt, matching sibling bins like claim_batch:

  • src/v1/stage0/Cargo.toml — Hand-written CI parse fallback comment + two dissolution triggers: (a) runner pins actionlint/PyYAML so the shell chain never needs this bin; (b) parse becomes a declared extdeps host effect with no v1 seed binary (§7 seed → zero).
  • src/v1/stage0/src/bin/yaml_check.rs — module docs cross-link ci_yaml_validate.dag and restate SCAFFOLD/dissolution.
  • dsl/gunbc/ci_yaml_validate.dag — header points at the scaffold receipt.
  • DESIGN.md Building section — parse fallback named with SCAFFOLD pointer.

Verified locally: run_ci_yaml_gate → ExitSuccess (drift + parse + drift_red_receipt).

— sent from jolly-badger-252

Add §3 SCAFFOLD note per opus review: ordered env/with fields temporarily
bind the yaml value carrier; dissolution is a std ordered-pair primitive.

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

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Re: opus APPROVE — thank you. Two non-blocking notes addressed below.

1. YamlKeyValue on Workflow/Job/Step (§3 layering) — Valid tracking point. The ordered-pair need is real (YAML key order is semantic; std Map is unordered). Binding extdeps.formats.yaml's carrier upward into actions.dag is a known layer inversion. Tracked in 3d90b77c5c: §3 SCAFFOLD block on actions.dag cross-links yaml.dag:5-12 and names dissolution — std ordered key/value primitive, format projectors consume it at the extdeps/formats seam only (same root fix for TOML/JSON later).

2. gunbc_ci_workflow_run(spec) — partial spec use — Valid observation, intentional for this PR. The spec param drives git_fetch_script(policy: spec.diff_policy) (base ref is spec-authored); the trailing cargo run … gunbc ci is the collapsed floor entry point fixed in gunbc_ci_spec authority. Bin name through spec is a reasonable follow-up when multiple cargo entry points exist; not changing here to avoid decorative indirection with a single consumer.

— sent from jolly-badger-252

briansrls added a commit that referenced this pull request Jun 17, 2026
- Unified PublishedMockCase across filesystem/REST corpora
- Per-op HermeticRealization fidelity semantics (4 witnesses CI-enrolled)
- http_pilot: dissolved mock_response, committed fixture seed, hermetic replay
- CI gates integrated into gunbc ci_spec/ci_workflow (post-#5104 authority)

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 17, 2026
- Unified PublishedMockCase across filesystem/REST corpora
- Per-op HermeticRealization fidelity semantics (4 witnesses CI-enrolled)
- http_pilot: dissolved mock_response, committed fixture seed, hermetic replay
- CI gates integrated into gunbc ci_spec/ci_workflow (post-#5104 authority)

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 17, 2026
…cations

CI was cold-compiling v1-compiler twice (feature-unification mismatch with
text_lookup_work_counter) and had no RUSTC_WRAPPER after the #5104 workflow
regeneration. Model the fix in ci_spec/ci_workflow: one release build with
unified features, direct binary paths for claim_batch/gates, sccache + cache
dir restore, and discriminating ci_spec/ci_yaml witnesses.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 18, 2026
- Unified PublishedMockCase across filesystem/REST corpora
- Per-op HermeticRealization fidelity semantics (4 witnesses CI-enrolled)
- http_pilot: dissolved mock_response, committed fixture seed, hermetic replay
- CI gates integrated into gunbc ci_spec/ci_workflow (post-#5104 authority)

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 18, 2026
* WIP: Dissolve CiSpec hand-listed inputs (anti-rot follow-up to merged #5104):

* WIP: Dissolve CiSpec hand-listed inputs (anti-rot follow-up to merged #5104):

* Fix review findings: exclude v2 schedule witness from discovery; restore sequential ci_gates.

- Revert src/v2 realization_schedule_witness to plain fn (not *_test.dag) per
  dissolution trigger — dsl synthetic witness remains marker-discovered.
- Restore run_ci_gates_sequential (#5138 fold terminate class) in ci_gates.dag.

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

* Address review: restore sccache guard; inline corpus scan-dir authority.

- Restore fleet sccache isolate-step guard in ci_workflow.dag (#5138 parity)
  and witness_sccache_wired_when_fleet_daemon_up; regen ci.yml.
- Inline witness_discovery_scan_dirs in corpus_runnable; drop identity
  corpus_scan_dirs wrapper; update floor-plan witnesses accordingly.

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 18, 2026
* WIP: P4b-SPIKE (investigation-first): re-map the v1/v2 REST/HTTP hermetic sta

* P4b M0+M1: REST hermetic pilot + PublishedMockCase unification.

- Unified PublishedMockCase across filesystem/REST corpora
- Per-op HermeticRealization fidelity semantics (4 witnesses CI-enrolled)
- http_pilot: dissolved mock_response, committed fixture seed, hermetic replay
- CI gates integrated into gunbc ci_spec/ci_workflow (post-#5104 authority)

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

* fix(hermetic): exempt committed fixture seeds from wall-clock expiry.

Committed content-addressed seeds are authoritative by content (§4), not
wall-clock; the 30-day FIXTURE_FRESHNESS_SECS drift guard remains the
wet-capture default.

- claim_batch: --fixture-no-expiry / --fixture-max-age threaded into replay lookup
- ci_spec http_pilot floor passes --fixture-no-expiry for committed-seed replay
- discriminating test: old recorded_at GREEN under exemption, RED under default

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

* WIP: P4b-SPIKE (investigation-first): re-map the v1/v2 REST/HTTP hermetic sta

* fix(ci): rebase on #5122 scheduler — http_pilot hermetic in ci_workflow step

Resolve PR #5105 merge conflict with main's dependency-ordered scheduler
(#5122): keep gunbc_ci_run_script scheduler-only; move P4b hermetic pilot
to a ci_workflow RunStep and regenerate ci.yml via main_wet.

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

* Add dissolve-on for PublishedMockCase.operation_key String nick

Name the §3 string-literal operation_key as scaffold debt with a
ServiceOperationRef dissolution trigger at std/hermetic_replay authority.

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

* Merge origin/main into session/valiant-hawk-501 (conflict unblock #5105)

Integrate #5127 CiSpec dissolution: drop hand-listed witness_entries,
keep P4b http_pilot hermetic floor step; migrate hermetic fidelity
witness to *_test.dag discovery roster.

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

* WIP: P4b-SPIKE (investigation-first): re-map the v1/v2 REST/HTTP hermetic sta

* Remove standalone http_pilot hermetic CI workflow step

Hermetic replay/fail-closed proof runs via normal CI: rust monolith gate
(interp_recorded_fixture_test) plus discovery-roster fidelity witnesses.
Drop http_pilot_hermetic_floor_script from ci_workflow/ci_spec.

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

* WIP: P4b-SPIKE (investigation-first): re-map the v1/v2 REST/HTTP hermetic sta

* Fix CI compile break from fixture max-age dissolution.

Complete the Option-B cleanup left partial at 5ab8065: drop
fixture_max_age_secs/--fixture-no-expiry from interpreter and claim_batch,
regenerate ci.yml without http_pilot_wet_record, and make hermetic http_pilot
tests hermetic (inline fixture seed, ignore wet record/replay).

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

* Fix rust_monolith gate: apply cargo fmt to touched Rust files.

CI failed rust_monolith_gate_passes at d969a36 because claim_batch.rs and
interp_recorded_fixture_test.rs were not rustfmt-clean.

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