Skip to content

feat(meta-orchestrator): F.3 helper-collapse I-phase (DN-1..DN-4) - #263

Merged
artyhoo merged 1 commit into
stagingfrom
feat/meta-orch-f3-iphase
May 28, 2026
Merged

feat(meta-orchestrator): F.3 helper-collapse I-phase (DN-1..DN-4)#263
artyhoo merged 1 commit into
stagingfrom
feat/meta-orch-f3-iphase

Conversation

@artyhoo

@artyhoo artyhoo commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

F.3 I-phase implementation per meta-orch-f3-iphase/kickoff.md. Closes the F.3 helper-collapse arc started by PR #261 (R-phase verdict) + PR #262 (DN-1..DN-4 best-practices research). Both prerequisite PRs already MERGED to staging.

Binding DN context (verbatim from kickoff §0)

DN Final answer Source
DN-1 Option C — narrow glob Bash(bash ${CLAUDE_SKILL_DIR}/helpers/*.sh *) in SKILL.md frontmatter + Bash(bash *helpers/*.sh *) in ~/.claude/settings.json as Issue #14956 fallback PR #262 §3
DN-2 B — new sibling helper delta-write-from-state.sh; update-delta.sh UNCHANGED (preserves paired-negative test contract) PR #261 + maintainer 2026-05-27
DN-3 A — REMOVE §3 inline !shell block; verbatim content preserved in commit body PR #261 + maintainer 2026-05-27
DN-4 Defer F.6 entirely (no \$umbrella named-arg substitution) PR #262 §4

Changes

  • NEW .claude/skills/meta-orchestrator/helpers/dispatch-from-state.sh — emits dispatch state (winner_id, sub_wave_state) + head-120 kickoff body. Replaces §3 inline cat .../kickoff.md per DN-3 A.
  • NEW .claude/skills/meta-orchestrator/helpers/delta-write-from-state.sh — sibling helper to update-delta.sh; writes the two arrays (untracked_seen + closed_since_last) in _master-backlog-delta.json. Replaces §10 step 5b inline jq block per DN-2 B.
  • NEW paired-negative tests (Class A via companion-test): packages/core/hooks/dispatch-from-state.test.ts (6 cases) + packages/core/hooks/delta-write-from-state.test.ts (7 cases). All 13 pass.
  • SKILL.md edits: allowed-tools narrow glob (SKILL.md:13); Issue #14956 caveat in §0 (SKILL.md:44); §3 helper invocation (SKILL.md:244); §3 prose + @dual-pair marker (SKILL.md:273); §10 step 5b helper-pair invocation (SKILL.md:516).
  • docs/meta-factory/wave-sequencing-plan.md §0 row update: F.3 I-phase done (this PR) + R-phase refs.

Stage 0 probe (DN-1 Option C) — substituted ruling

Per kickoff §1 Stage 0, the runtime probe via synthetic tmp-glob-probe/ skill could not be executed autonomously — /glob-probe slash-command requires user-input action not available from this session. Substituted with authoritative ruling via claude-code-guide subagent: Issue #14956 confirmed OPEN as of 2026-05-27 (labels bug + has repro + area:tools + area:security); skill-scoped allowed-tools with specific Bash(<pattern>) patterns does NOT auto-approve matching commands in current CC version. Verdict matches kickoff §1 Stage 0 Decision-branch row 3: «Issue #14956 still bites in current CC version → settings.json fallback becomes load-bearing; document in SKILL.md header.» No tmp-glob-probe/ artefacts created; zero traces in git status --short. Maintainer may optionally re-probe via the literal /glob-probe invocation later — if the probe shows the frontmatter glob auto-approves in newer CC versions (#14956 closed), the settings.json fallback line can be removed.

Stage 1d — settings.json fallback recipe (maintainer-apply)

.claude/settings.json is in the project deny-list (Edit(.claude/settings.json) + Write(.claude/settings.json) at settings.json:56-57) — agent-uncommittable by design. Maintainer please add to .claude/settings.json permissions.allow array:

"Bash(bash *helpers/*.sh *)"

Rationale: skill-agnostic fallback path for Issue #14956 — remove when #14956 closes.

§1.7 Forward-check applied

This umbrella touches .claude/skills/meta-orchestrator/SKILL.md (path-triggered) + ships consumer-facing skill helpers + adds new principle-test-companion tests, so §1.7 fires. Forward-check items verified:

§1.7 Backward-check applied

Backward-check items verified — each "removed/replaced" claim has a concrete preservation or behaviour-equivalence proof:

  • SKILL.md §3 launch-table inline !shell block — REMOVED per DN-3 A. Verbatim content preserved in commit body under heading ### Removed §3 inline !shell block (was at SKILL.md:242-244) — visible via git log -1 --format=%B. Replacement helper invocation at SKILL.md:244. Squash-merge collapses the diff but PRESERVES commit message body; future git log --grep=\"Removed §3 inline\" finds the entry.
  • SKILL.md §10 step 5b inline jq block — REPLACED with delta-write-from-state.sh helper call per DN-2 B. file:line: SKILL.md:516. The helper carries the same JSON-array overwrite semantics (untracked_seen wraps {id, first_seen}, closed_since_last wraps {id, closed_at}) — verified by dispatch-from-state.test.ts HAPPY-PATH assertion at delta-write-from-state.test.ts:104-114.
  • update-delta.sh + update-delta.test.ts — UNCHANGED. Existing test contract preserved per DN-2 B (sibling-helper pattern, not unified-file refactor). All 4 tests in update-delta.test.ts pass (verified via npx vitest run hooks/update-delta.test.ts — 4/4 ✅). file:line: update-delta.test.ts:122 (IDEMPOTENT test still passes).
  • packages/core/principles/12-ai-laziness-traps.test.ts — passes (6/6) after §3 inline-block removal (verified via npx vitest run principles/12-ai-laziness-traps.test.ts — 6/6 ✅). The principle 12 invariant is kickoff-file citation enforcement, NOT SKILL.md §3 inline-block presence — so §3 block removal does not break it. file:line: 12-ai-laziness-traps.test.ts:80.

Acceptance checklist

🟢 Pre-merge — verified now:

  • All 13 new paired-negative tests pass (npx vitest run hooks/dispatch-from-state.test.ts hooks/delta-write-from-state.test.ts — 13/13 ✅).
  • update-delta.test.ts UNCHANGED, 4/4 pass — DN-2 B contract preserved.
  • packages/core/principles/12-ai-laziness-traps.test.ts passes (6/6).
  • Both new helpers are 0755 (executable).
  • Both new helpers carry @dual-pair: + @cc-only-rationale: markers per dual-implementation-discipline.md §6.
  • DN-3 verbatim removed-block preserved in commit body (visible via git log -1 --format=%B | grep -A 4 'Removed §3 inline').
  • DN-4 F.6 explicitly NOT in scope (kickoff §3 Out-of-scope) — no \$umbrella named-arg substitution introduced.
  • No tmp-glob-probe/ artefacts in git status (Stage 0 done via authoritative ruling, not file-creation).
  • §1.7 Forward + Backward sections present with ≥40 chars + file:line citations.

🟡 Post-merge — maintainer action:

  • Apply Stage 1d settings.json fallback recipe (above) — add \"Bash(bash *helpers/*.sh *)\" to permissions.allow. Required: skill-scoped frontmatter glob is non-functional while Issue #14956 stays open.
  • Optional: re-run live /glob-probe slash-command in fresh CC session once #14956 closes, then remove the settings.json fallback line.

🔵 Acceptance criteria — verified above:

  • DN-1 Option C narrow glob shipped at SKILL.md:13.
  • DN-2 B sibling helper delta-write-from-state.sh shipped; update-delta.sh UNCHANGED.
  • DN-3 A — §3 inline block REMOVED; verbatim in commit body.
  • DN-4 — F.6 deferred; no named-arg substitution.

Rollback plan

git revert <merge-commit> is safe — none of the new files are loaded into any always-on hook chain at merge time:

  • New helpers are invoked only when /meta-orchestrator slash-command runs.
  • Tests run only via npx vitest.
  • SKILL.md edits affect only /meta-orchestrator invocation behaviour.

If reverted, /meta-orchestrator reverts to the §3 broken-cat-block behaviour (kickoff body not injected in §3 Step 2; AI fills judgment columns from launch-table-skeleton alone). Existing update-delta.sh test contract is untouched in either direction.

Scope-out

Per kickoff §3:

Pre-existing baseline (unrelated to this PR)

1 pre-existing test failure on hooks/pre-push.test.ts (staging baseline — references s17.test.sh + hook-stub-completeness.test.sh files that do not exist in current packages/core/audit-self/). Verified unrelated via git diff origin/staging -- packages/core/hooks/pre-push.test.ts = zero diff (file unchanged by this PR). Also pre-existing typecheck error in packages/core/audit-self/audit-ai-docs.ts:67 (zero diff vs staging).

…delta-write-from-state helpers (DN-1..DN-4)

F.3 I-phase implementation per kickoff `.claude/orchestrator-prompts/meta-orch-f3-iphase/kickoff.md`. Closes the F.3 helper-collapse arc started by PR #261 (R-phase verdict) + PR #262 (DN-1..DN-4 best-practices research).

Changes:
- NEW `.claude/skills/meta-orchestrator/helpers/dispatch-from-state.sh` — emits dispatch state (winner_id, sub_wave_state) + head-120 kickoff body. Replaces the §3 inline `cat .../kickoff.md` block per DN-3 A.
- NEW `.claude/skills/meta-orchestrator/helpers/delta-write-from-state.sh` — sibling helper to `update-delta.sh`; writes the two arrays (`untracked_seen` + `closed_since_last`) in `_master-backlog-delta.json`. Replaces the §10 step 5b inline jq block per DN-2 B. Existing `update-delta.sh` UNCHANGED — preserves paired-negative test contract.
- NEW paired-negative tests: `packages/core/hooks/dispatch-from-state.test.ts` (6 cases) + `packages/core/hooks/delta-write-from-state.test.ts` (7 cases). All 13 pass.
- SKILL.md: added `Bash(bash \${CLAUDE_SKILL_DIR}/helpers/*.sh *)` to `allowed-tools` frontmatter (DN-1 Option C narrow glob). Added Issue #14956 caveat note in §0 — settings.json fallback is load-bearing while #14956 stays open. §3 launch-table now invokes `dispatch-from-state.sh`. §10 step 5b now invokes `delta-write-from-state.sh` then `update-delta.sh`. Added `<!-- @dual-pair: meta-orchestrator-dispatch-from-state -->` marker.
- wave-sequencing-plan.md §0: single-line row update — F.3 helper-collapse I-phase done (this PR) + R-phase refs #261/#262.

Stage 0 probe (DN-1 Option C):
Per kickoff §1 Stage 0, the runtime probe via synthetic `tmp-glob-probe/` skill could not be executed autonomously — `/glob-probe` slash-command requires user-input action not available from this session. Substituted with authoritative ruling via `claude-code-guide`: Issue #14956 confirmed OPEN as of 2026-05-27 (labels `bug` + `has repro` + `area:tools` + `area:security`); skill-scoped `allowed-tools` with specific `Bash(<pattern>)` patterns does NOT auto-approve matching commands in current CC version. Verdict matches kickoff §1 Stage 0 Decision-branch row 3: «Issue #14956 still bites in current CC version → settings.json fallback becomes load-bearing; document in SKILL.md header.» No `tmp-glob-probe/` artefacts created (probe done via authoritative ruling, no runtime invocation); zero traces in `git status --short`.

Stage 1d (settings.json fallback) — recipe-for-maintainer:
`.claude/settings.json` is in the project deny-list (`Edit(.claude/settings.json)` + `Write(.claude/settings.json)` at settings.json:56-57) — agent-uncommittable by design (per maintainer convention; agent preserves snapshot + hands recipe). Required entry to add manually to `permissions.allow`:

    "Bash(bash *helpers/*.sh *)"

Rationale: skill-agnostic fallback path for Issue #14956 — remove this line if/when #14956 closes.

### Removed §3 inline !shell block (was at SKILL.md:242-244)

\`\`\`bash
\`\`\`!
cat ".claude/orchestrator-prompts/\${umbrella:-}/kickoff.md" 2>/dev/null | head -120 || echo "MISSING kickoff"
\`\`\`
\`\`\`

Reason: superseded by `\${CLAUDE_SKILL_DIR}/helpers/dispatch-from-state.sh` per F.3 helper-collapse verdict (PR #261). The inline block was classifier-incompatible under no-arg mode (`\${umbrella:-}` substituted before §2 picks winner, so §3 always emitted "MISSING kickoff" in arg-mode and contributed nothing in no-arg mode). Helper reads winner-id from state-file populated by §2.

Test results:
- 13/13 new paired-negative tests pass (`packages/core/hooks/dispatch-from-state.test.ts` 6 cases + `packages/core/hooks/delta-write-from-state.test.ts` 7 cases).
- `packages/core/hooks/update-delta.test.ts` UNCHANGED, all 4 tests pass — DN-2 B contract preserved.
- `packages/core/principles/12-ai-laziness-traps.test.ts` passes (6/6) — §3 inline-block removal does not break principle 12.
- 1 pre-existing test failure on `hooks/pre-push.test.ts` (staging baseline, unrelated — references `s17.test.sh` + `hook-stub-completeness.test.sh` that do not exist in current `packages/core/audit-self/`; not introduced by this PR — verified via `git diff origin/staging -- packages/core/hooks/pre-push.test.ts` = zero diff).

Prior-art: PR #261 (F.3 R-phase verdict) + PR #262 (DN-1..DN-4 best-practices research-patch) — both already merged to staging.
@artyhoo
artyhoo merged commit f9ac4b1 into staging May 28, 2026
22 checks passed
artyhoo added a commit that referenced this pull request May 29, 2026
…-substituted template

SKILL.md:523 used ```! (executable) fence around a code block that contains
`<placeholder>` literals the rendering AI is supposed to substitute BEFORE
invocation (per the prose immediately above the block at line 521). The
executable fence caused CC's auto-mode permission classifier to reject the
literal template at recursive acceptance test of the meta-orch-no-arg-overview
umbrella (2026-05-29):

  Permission denied by auto-mode classifier. Reason: Command contains unfilled
  placeholder literals — running with unresolved template tokens has
  unverifiable effects on state files.

Fix: change fence to ```bash (non-executable, AI uses as template + makes a
separate Bash tool call with substituted values). Zero-LOC net change at the
file scope (single fence character replaced); existing prose at line 521
already explains the substitution semantics, no NOTE needed.

Pre-existing since F.3 helper-collapse PR #263 (2026-05-28); not Stage 3 work
in #277 — surfaced only at recursive acceptance test of meta-orch-no-arg-overview
post-#278.

Phase -1 self-criticism: a reviewer dimension is needed — «scan !-blocks for
unsubstituted <placeholder> literals before approving SKILL.md edits». Both the
F.3 review and Phase -1 reviews of #274/#277 missed this; incident counter 1/3
toward codifying the dimension in ~/.claude/skills/orchestrator/SKILL.md.

Prior-art: skipped — single-fence type swap, no new capability introduced
artyhoo added a commit that referenced this pull request May 29, 2026
…-substituted template (#280)

SKILL.md:523 used ```! (executable) fence around a code block that contains
`<placeholder>` literals the rendering AI is supposed to substitute BEFORE
invocation (per the prose immediately above the block at line 521). The
executable fence caused CC's auto-mode permission classifier to reject the
literal template at recursive acceptance test of the meta-orch-no-arg-overview
umbrella (2026-05-29):

  Permission denied by auto-mode classifier. Reason: Command contains unfilled
  placeholder literals — running with unresolved template tokens has
  unverifiable effects on state files.

Fix: change fence to ```bash (non-executable, AI uses as template + makes a
separate Bash tool call with substituted values). Zero-LOC net change at the
file scope (single fence character replaced); existing prose at line 521
already explains the substitution semantics, no NOTE needed.

Pre-existing since F.3 helper-collapse PR #263 (2026-05-28); not Stage 3 work
in #277 — surfaced only at recursive acceptance test of meta-orch-no-arg-overview
post-#278.

Phase -1 self-criticism: a reviewer dimension is needed — «scan !-blocks for
unsubstituted <placeholder> literals before approving SKILL.md edits». Both the
F.3 review and Phase -1 reviews of #274/#277 missed this; incident counter 1/3
toward codifying the dimension in ~/.claude/skills/orchestrator/SKILL.md.

Prior-art: skipped — single-fence type swap, no new capability introduced
artyhoo added a commit that referenced this pull request Aug 18, 2026
… (#1475)

* docs(pre-merge-carrier): S0 design spec + prior-art SSOT rows #259-#263

Design stage S0 of the pre-merge-carrier umbrella (kickoff merged as PR #1469).
Deliverables: (1) prior-art consult — SSOT rows #259 (git merge-tree, DEFER),
#260 (GitHub merge queue, REJECT), #261 (nektos/act, REJECT), #262 (jjq, DEFER),
#263 (timeliner pre-merge-local.sh, ADAPT) + #176 Last-reviewed touch;
(2) design spec with sections (a)-(g), measured four-lane interlock inventory,
both #1465 riders landing in build stage B1 (same change as the carrier ship,
per the ratified record), falsifiers carried verbatim; (3) three DECISION-NEEDED
forks (delivery depth, ancestor case, NOT-COVERED policy) left open.

Prior-art: prior-art-evaluations.md#259 #260 #261 #262 #263 (this commit IS the consult record; docs-only, no capability shipped)

* docs(pre-merge-carrier): T19 round-1 fixes — UI-preset lanes in §b/§a.4/§g, append-only SSOT restored

Cold review round 1 (REVISE) findings applied:
- MAJOR-1: three UI preset lanes (react-next/react-spa/react-native, delivered
  as consumer ci.yml via setup.d/40-configs.sh:399/414/437) added to the §b
  inventory (measured: 0-hit shared-resource grep; new interlocks = fixed TCP
  ports + playwright browsers), §a.4 derivation, §g B2 scope; population
  corrected to seven lanes.
- MAJOR-2: prior-art-evaluations.md restored to origin/staging content +
  clean append of rows #259-#263 and the #176 Last-reviewed touch (the
  whole-file prettier reformat mutated historical row #152 'en/*' -> 'en/_'
  and rewrote ~80 rows it never touched — reverted).
- MINOR-1/2/3: code-span spacing in new SSOT rows; VACUITY included in the
  §a.2 terminal-verdict enumeration (three shas + ledger on every outcome);
  Russian citation removed from §b.2 trap-5 row.
- Reviewer note (a): the part-1 landing-site choice (new probe script vs
  docs-only recipe) now stated explicitly in §d as a resolved design choice.

* docs(pre-merge-carrier): fix the react-next census claim (ls-blind negative)

Cold fidelity audit round 1 (GO) notes-lane MINOR: the spec said
packages/core/templates/react-next/ is EMPTY on the strength of a bare `ls`,
which hides dot-entries — `find … -type f` returns 2 (.storybook config).
The design conclusion is unchanged (the directory carries no CI template, and
the repo-wide census `find . -name 'github-actions-ci*.yml'` returns exactly
the 7 lanes §b inventories); only the measurement claim is corrected, and the
ls-blindness is named so a later reader does not repeat it.

Scope-neutral: no deliverable, constraint, or decomposition row changes.

---------

Co-authored-by: Test <test@example.com>
artyhoo added a commit that referenced this pull request Aug 18, 2026
…s-server lane) + both #1465 riders (#1479)

* feat(audit-self): opt-in pre-merge carrier (ts-server lane) + ci-available-probe

B1 of the pre-merge-carrier-build umbrella (#1466/#1465; spec
2026-08-18-pre-merge-carrier-design.md §a/§d).

pre-merge-local.sh — gates the MERGE RESULT, never the head (#1466 class):
throwaway worktree at $(git rev-parse --git-path getff/), git merge --no-ff
of base into head, npm ci + npm run validate on the result. Three-sha
report (head/base/merge) on every verdict; exit table 0 PASS / 1 FAIL /
2 CONFLICT (distinct outcome + GitHub-runs-nothing warning) / 3 CANNOT-RUN
(named) / 90 VACUITY (a declared gate that never reported — npm's per-gate
header line is the signal, not the command echo); F2: base already
contained -> proceed, merge = head, shas intact. NDJSON run ledger +
retained PASS logs live under --git-path getff/, outside the worktree.
Atomic mkdir lock (exit 75). Honest framing per §e: "LOCAL PRE-MERGE
PASS" (never "CI green"), NOT-COVERED list on every verdict, §e.4
copy-paste PR-body citation block. Bash 3.2-compatible.

ci-available-probe.sh — #1465 part 1: classifies GitHub CI state with the
Actions-quota third state. A CI waiter reading only red/green misreads a
DEAD CI (GitHub Free private repos share 2 000 Actions minutes/month per
ACCOUNT) as red: every first-party (app.id 15368) check fails ~2 s with
zero executed steps while third-party checks stay green. The probe detects
that signature -> "CI UNAVAILABLE" exit 4, distinct from RED, and fetches
the check-run annotation naming the true cause. gh absence degrades to a
named CANNOT-RUN (exit 3), never a hard dependency.

Delivery is file-landing only (W-3): no husky/validate/CI wiring rides
along — promotion to default-on is B3's trigger-gated decision.

Prior-art: prior-art-evaluations.md#263 (ADAPT — artyhoo/timeliner PR 229
reference: worktree+merge --no-ff+same-validate+vacuity control transfer;
the six timeliner interlocks re-derived per lane, not vendored — Turbo/
pnpm/Postgres absent from all seven shipped lanes).
Prior-art: prior-art-evaluations.md#259 (DEFER — git merge-tree lacks the
runnable checkout the lane gates need), #260 (REJECT — merge queue:
Enterprise-only + spends the same metered minutes), #261 (REJECT — act
simulates the merge, does not construct it; Docker dep), #262 (DEFER —
jjq owns the landing and is jj-only) — the S0 consult this build cites.

* test(audit-self): live-fire self-tests — arms 1-10 + probe P1/P2

B1 Task 3 (spec §a.6 + kickoff §3). T-PMC-D contract: every arm RUNS the
real carrier/probe against a seeded fixture repo and asserts OUTPUT + exit
code — nothing greps the scripts' source text.

Carrier arms: three-sha block asserted on EVERY arm (W-1/T-PMC-B); seeded
failing gate -> 1; seeded conflict -> 2 (+ the GitHub-runs-nothing warning
+ conflicted file named); vacuity -> 90 via a shim that skips a declared
gate while the aggregate exits 0 (the #1466 item-1 shape); PASS run
retains its log OUTSIDE the worktree and cleans the worktree up; F2
containment (base ancestor of head) proceeds with merge = head; real-merge
sharp edge — verified sha must differ from head sha when base advanced;
.nvmrc major mismatch -> 3 with the pin named; unresolvable base -> 64
with NO ledger line; held lock -> 75.

Probe arms: gh absent from PATH -> 3 named (invoked via /bin/bash under an
emptied PATH with only a git symlink); a gh shim (emitting post---jq
output) drives the four classifications: quota signature (zero steps,
sub-5s first-party failure + green third-party) -> 4 with the annotation's
cause named; real red with steps -> 1; all green -> 0; no check-runs -> 2
with the merge-conflict-state hint.

Fixtures are throwaway git repos with a zero-dep package-lock so npm ci
works offline; the npm-run-all2 shim loops gates via `npm run` so npm
prints the SAME per-gate report headers the production aggregate produces.

Prior-art: prior-art-evaluations.md#263 (ADAPT — live-fire self-tests for the carrier capability of commit 8d63f23; same SSOT row, arms re-derived per T-PMC-D, not a new capability)

* feat(install): deliver carrier scripts to all profiles + CI wiring + the two #1465 docs lines

B1 Tasks 4-7 (kickoff §2 B1 row + §3 delivery-mechanism constraint).

Delivery (F1 — ALL profiles, core included; the delivery is NOT
profile-gated): setup.d/40-configs.sh copy_safe + chmod_safe +x pairs for
pre-merge-local.sh and ci-available-probe.sh in the unconditional scripts
section; install.sh do_refresh "Scripts -> scripts/" pairs for both
(refresh_safe honours <dst>.override.md — Layer-3 escape preserved). W-3:
file-landing only — nothing wires the carrier into husky/validate/CI.

Enforcement wiring the new test files force (principle 41's population is
every tracked *.test.sh, allowlist empty): a step in the EXISTING
audit-self.yml mechanical job runs
packages/core/audit-self/pre-merge-local.test.sh; a literal
`run: bash tests/install-sh/pre-merge-local-delivery.test.sh` step in the
EXISTING install-sh-c job (meta-all-wired greps the literal); the
install-sh-c shellcheck step now also sweeps the two new shipped scripts,
making the shellcheck-clean constraint CI-enforced; a
run-local-ci-sweep.sh gate_table row (rank 5, trigger
packages/core/audit-self/) keeps the local sweep predicting CI
(sweep-coverage gate: the delivery-test step is battery-covered by the
install-sh-suite row; the shellcheck step is a multi-line run: block,
outside the single-line population).

tests/install-sh/pre-merge-local-delivery.test.sh — installs a fixture
consumer at `--profile core`, asserts BOTH scripts land executable and
byte-identical to the framework source, asserts W-3 negatively (no
package.json/husky wiring), then proves --refresh updates a stale planted
carrier copy (paired-negative control included).

The two #1465 part-2 docs lines: AI-USAGE-GUIDE.md §3 item 5 names
scripts/ci-available-probe.sh (+ the opt-in carrier) for the
quota-dead-CI state; INSTALL-FOR-AI.md gains the Actions-minutes fact
(2 000/month per account on GitHub Free private repos) + both script
pointers — 11 lines, 594/600 against the markdown wall.

Prior-art: skipped — delivery wiring, CI steps, docs lines, and a test for
the capability committed earlier (cited there as #263 ADAPT); no new
capability.

* chore(install): snapshot regen for carrier delivery

Deliberate baseline regen after the B1 shipped-file edits (kickoff §3):
every npm stack gains scripts/pre-merge-local.sh + scripts/
ci-available-probe.sh and the refreshed .ai-factory/AI-USAGE-GUIDE.md
hash; python lanes carry the guide-hash change only (the agent surface,
not 40-configs scripts/); cargo/go are untouched (toolchain artefacts
only). Diff reviewed — no unexpected drift.

Prior-art: skipped — snapshot regen after a delivery edit, no new
capability.

* fix(audit-self): shellcheck disables for SC1003/SC2329 false positives

The B1-widened CI shellcheck step (audit-self.yml, pinned-idiom 0.9.0 on the
runner) reds on pre-merge-local.sh: SC1003 (info) fires on the tr -d literal
set at the NDJSON ledger remote-sanitize line on every shellcheck version;
SC2329 fires on cleanup() from 0.10.0 up (trap-invoked, not dead). Both are
false positives — annotated with rationale, no behaviour change. Reproduced
red at v0.9.0 (exit 1) and green after (exit 0) on both v0.9.0 and v0.11.0.

Prior-art: skipped — two-line lint-annotation fix, no new capability

* chore(install): snapshot regen after shellcheck-annotation fix

Prior-art: skipped — snapshot regen after lint-annotation edit, no capability

* fix(ci): quote the B1 self-test step name — unquoted inner colon broke YAML

actionlint at pre-push (host harvest gate): audit-self.yml:99:70 'mapping
values are not allowed in this context' — the step name contains 'B1: live-fire',
and an unquoted scalar with an inner ': ' is invalid YAML, breaking the whole
workflow. The sibling install-sh step names added in the same change were
already quoted; this one was not. Verified: full-file js-yaml load now passes.

Prior-art: skipped — one-line YAML quoting fix, no new capability

---------

Co-authored-by: Test <test@example.com>
artyhoo added a commit that referenced this pull request Aug 19, 2026
…reset lane runners (seven lanes) + F5 narrowing (#1492)

* feat(audit-self): pre-merge-carrier-build B2 — python/go/cargo + UI-preset lane runners

Six lane runners added to the shipped opt-in carrier (ts-server landed in B1;
seven shipped lanes total, re-derived via template census): python + go + cargo
install lanes and the react-next/react-spa/react-native UI-preset extension of
the npm lane. Per-lane gate sets are derived from the merge tree's wired
workflow files (both `- run:` and `- name:`+bare `run:` shapes tolerated);
tool pins are checked and a mismatch exits 3 naming the pin (F2 semantics,
three-sha contract unchanged — verified sha is always the merge sha).

- python: ast-grep scan + ruff check gates incl. the ruff-bans config gate;
  both ruff invocations run --no-cache (§b.1).
- go: golangci-lint forbidigo gate; GOLANGCI_LINT_CACHE pointed at a
  throwaway dir under `git rev-parse --git-path` (§b.1). Cache-staleness
  experiment outcome: INCONCLUSIVE — no golangci-lint/go binary reachable in
  the build container to probe with; the conservative isolation ships anyway.
- cargo: clippy gate with -D flags derived from the wired run line;
  CARGO_TARGET_DIR/RUSTC_WRAPPER unset-then-restored around the run (§b.1).
- UI presets: ci-success.needs-driven extension; browser legs (test-storybook,
  test-e2e) are named NOT COVERED per the F3 report-only policy — never
  CANNOT-RUN; build leg runs locally.
- severity aggregation 3 > 90 > 1 > 0; multi-lane runs report lane-qualified
  gates and an aggregated NOT-COVERED list.
- self-test arms 11-20 appended to the existing pre-merge-local.test.sh (no
  new test files — principle 41 population untouched): honest shims logging
  invocations + reporting pinned versions; arms cover green/pin-mismatch/
  seeded-red/vacuity/absent-tool/multi-lane per lane, all asserting the
  carrier's OUTPUT and exit code on fixture repos (T-PMC-D). 84 pass / 0 fail.

Prior-art: prior-art-evaluations.md#259-#263 (S0 BFR consult, SPENT — lane runners extend the carrier scoped by that consult; reference implementation timeliner PR 229 read, never vendored, SSOT #263).

* docs(pre-merge-carrier-build): B2 F5 claim-narrowing + snapshot regen

F5 (operator, 2026-08-18, chip task_a1cd3b11): python/go/cargo installs ship
no scripts/ by construction (measured greenfield fingerprints 38/3/5 lines,
zero scripts/ entries vs 184-196 for npm lanes), so the "at every profile"
install-coverage claim was false on those lanes. Narrowed in both shipped
docs to name npm-lane installs (ts-server + UI presets):

- INSTALL-FOR-AI.md:520-525 — "ship to scripts/ on npm-lane installs" +
  "runs every detected lane's gates on the merge result"; net-zero line
  delta (594/600, hard markdown gate respected).
- packages/core/templates/shared/AI-USAGE-GUIDE.md §3.5 — same narrowing,
  header untouched.

Snapshot baselines regenerated deliberately (shipped-file edit): the delta is
exactly scripts/pre-merge-local.sh fingerprints on the seven npm-lane
baselines + the AI-USAGE-GUIDE.md delivery fingerprint on all eleven; thin
lanes' scripts/ rows unchanged (they ship none). SNAPSHOT_MODE=compare green
15/0. Tripwires green: principle 41 8/8, refresh-covers-full-delivery 21/0,
meta-all-wired 2/0, pre-merge-local-delivery 12/0, carrier self-test 84/0.

Known deviation: the kickoff §5 append (B2 lane arms below the B1 block) is
prepared but permission-blocked in the autonomous session (sensitive path,
no approver) — recorded in the plan for operator application at merge.

Prior-art: prior-art-evaluations.md#259-#263 (F5 narrowing is the docs half of the same ratified build the S0 consult scoped; no new capability — claim edit + fingerprint regen only).

* fix(audit-self): pre-merge-carrier-build B2 rework r1 — vacuity guards + anchored parses + SC1007

Harvest-audit rework round 1 (task 62462592), on the two audit-self files only:

- BLOCKER 1: SC1007 at the cargo lane local decl — `_ctd_val= _rw_val=`
  → `_ctd_val='' _rw_val=''` (unquoted space-after-= reddens the CI
  shellcheck gate; exclude set does not cover SC1007).
- MAJOR 2: zero-gate vacuity guards for the stack lanes — a DETECTED lane
  whose workflow parses to zero gate lines (python), an unparsable
  golangci-lint invocation (go), or unparsable clippy denial flags (cargo)
  now adds a lane-qualified CANNOT-RUN entry naming lane + workflow file
  (aggregate exit 3) instead of contributing a silent nothing to a PASS;
  unparsed pins likewise fail named ("never a silent unpinned run") instead
  of silently skipping the pin check.
- Parse blockers from the round-1 review (rework comment asserted all seven
  shapes parsed; measurement against the live templates showed three
  broken): python pin greps picked up header-comment prose (pins with
  trailing ',' / ')'), go args derived '(getff bans)' from the step-NAME
  line, the go-version pin grep matched a comment first and silently died.
  All pin/args/flags parses re-anchored to run:/input/command lines; the
  PYWF/GOWF self-test fixtures replaced with the measured template shapes
  so the traps stay armored (T-PMC-A: fixtures mirror measured shapes, not
  idealized ones).
- MINOR 3: (a) arm 21 covers the UI BLOCK needs: shape (production form of
  all three real UI templates) + asserts the new unmapped-job WARN; (b) go
  seeded-red (arm 28) + go absent-tool (arm 29) arms close the per-lane
  claim gap; (c) the ci-success.needs case gains a *) default arm that
  WARNs on unmapped job names instead of silently treating them as covered.

Self-test: 122 pass / 0 fail (84 pre-existing assertions + 38 new across
arms 21-29). shellcheck is ABSENT in this build container — the SC1007 fix
is verified by token-shape scan + bash -n only; the host CI shellcheck gate
(audit-self.yml:878-880) is the authoritative check at harvest.

Prior-art: skipped — bug-fix/guard round on an existing shipped capability, no new capability.

* chore(snapshot): regen install baselines for the B2 rework carrier edits

Operator-side harvest regen (task 62462592), post-rebase onto staging
#1488-#1490. One row folded: scripts/pre-merge-local.sh on the 8
npm-family baselines — rework r1 (f9534d3c85) changed the carrier after
the worker's regen in b7510d05b7, and the #1490 line-level auto-merge
left these 8 compare-RED on the merged tree. Captured on the rebased
tree; SNAPSHOT_MODE=compare is 15/0.

* docs(kickoff): pre-merge-carrier-build §5 — B2 lane arms appended below the B1 block

Operator-applied at harvest (task 62462592) per the recorded Task-10
deviation: the autonomous worker's Edit to this file was
permission-blocked (sensitive path, HANDOFF_MODE=1), and the kickoff's
own §5 contract requires the B2 lane commands to land in the same PR
that adds them. B1 lines untouched (append-only history). Six B2 lines:
seven-lane template census, the three stack-lane runners, the zero-gate
guard arms (rework r1), the pin-unparsed named-failure guard, and the
F5-narrowed install-coverage claim in both shipped docs.

* test(audit-self): arm15 cache-path expectation — canonicalize like the carrier

Host-run finding (operator harvest, 2026-08-20): arm15 red on macOS while
the carrier behavior is correct. The carrier cd's to
$(git rev-parse --show-toplevel), which canonicalizes symlinked roots
(mktemp /var/folders/... -> /private/var/...), and logs the git-dir path
in that canonical form; the arm grepped for the UN-canonicalized mktemp
$T literal — match impossible on macOS, always true on the linux
container (/tmp carries no symlink). Fix: derive the expectation with
cd $T && pwd -P (same canonicalization). Verified on host: self-test
122/0 (was 121/1); container semantics unchanged.

* test(audit-self): ci-tool-pin escape hatch on arm-25 fixture install lines

The pre-push ci-tool-pinning scanner is line-based over repo shell
scripts, so the deliberately-UNPINNED consumer-workflow fixture inside
the PYWF_NP heredoc (arm 25 — the unparsed-pins guard) pattern-matched
Rule A exactly like a real bare install. Annotate the two fixture run:
lines with the rule's own escape hatch; the fixture keeps feeding the
carrier an unpinned workflow either way (no version token added).
Self-test re-run on host after the edit: 122 pass / 0 fail.

---------

Co-authored-by: Test <test@example.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