feat(0.22.0): wire RCS control loop on bootstrap + doctor §23 closure verdict#65
Conversation
… verdict Close the split-brain: onboard.sh wired the control loop via install-rcs-stability.sh; bootstrap.sh (the /bstack bootstrap command) never did, leaving freshly-bootstrapped workspaces with governance files but an OPEN loop (no L0/L1 audit hooks, no .control/audit/, no closure-arc definitions). doctor reported all of that as soft [info], so the open loop was invisible. Dep-Chain (P14): - upstream: scripts/install-rcs-stability.sh (reused, unchanged) → install-l3-stability.sh (writes to $WORKSPACE, verified no PWD bug); assets/templates/arcs.yaml.template; compute-budget-status.sh / compute-arc-status.sh. - downstream: scripts/onboard.sh (already wired — now converges with bootstrap); scripts/repair.sh (already offers install-rcs); tests/canary/01; every workspace that runs `bstack bootstrap` or `bstack doctor`. Changes: - bootstrap.sh Phase 3.5: call install-rcs-stability.sh (BSTACK_SKIP_RCS=1 escape; `|| true` preserves non-blocking contract under set -e). Phase 2: scaffold .control/arcs.yaml from template. - doctor.sh §23: control-loop closure verdict (substrate-absent / wired-but-idle / wired+running+closing) from W/R/C signals. Soft by default; BSTACK_LOOP_STRICT=1 promotes wired-but-idle to a hard --strict gap. §19 already hard-gates a wired loop that is genuinely diverging, so §23 does not double-count. - canary/01: assert PostToolUse hook + .control/audit/ + .control/arcs.yaml + L0/L1 markers (14/14). references/new-workspace-flow.md + CHANGELOG + VERSION 0.21.10→0.22.0. Verified: canary 01-05 green; arcs-validation/repair-merge-hooks/onboard suites green; §23 renders correctly across all three states + strict path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 20 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…clude check Pre-existing on main (from #64) — the "Lint shell + JSON templates" gate inherited red on this PR. $ex is a glob pattern from EXTRA_EXCLUDES; quoting the RHS would break the pattern match the exclude check depends on, so the correct fix is a disable directive, not a quote. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dogfooding 0.22.0 on the stimulus repo surfaced a false-negative: stimulus's tracked .claude/settings.json uses repo-relative vendored hooks, so the L0/L1 audit hooks (which carry an absolute bstack path) belong in the gitignored settings.local.json — which Claude Code merges at runtime. §23's W-check only grepped settings.json, so it reported "NOT wired" while the loop was actually running. Now checks both files. Verified: §23 on stimulus flips to "wired + running + closing" with hooks in settings.local.json; canary 14/14. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Problem
bstack doctorreported a workspace's L1 layer "unstable" — and the investigation found the deeper cause: when bstack is instantiated, the control loop is declared but not closed.onboard.sh(the wizard) wired the loop viainstall-rcs-stability.sh;bootstrap.sh(the/bstack bootstrapcommand — what the SKILL.md tells agents to run) never did. Freshly-bootstrapped workspaces had governance files but an open loop: no L0/L1 audit hooks, no.control/audit/, no closure-arc definitions.[info]. There was no single verdict answering "is the loop wired, connected, and running?"Change
Makes
/bstack bootstrapwire the loop, scaffold the loop definitions, and report loop liveness as a first-class verdict.bootstrap.shPhase 3.5 — callsinstall-rcs-stability.sh(L0 PostToolUse + L1 Stop audit hooks +.control/audit/+ L3 gates), reusing the same idempotent installer the wizard uses.BSTACK_SKIP_RCS=1escape for governance-only bootstrap.bootstrap.shPhase 2 — scaffolds.control/arcs.yamlfrom template (the workspace's own editable loop definitions).doctor.sh§23 — control-loop closure verdict: substrate-absent / wired-but-idle / wired+running+closing, from W (hooks+dir) / R (audit logs fresh <7d) / C (workspace arcs + composite-ω resolvable). Soft by default;BSTACK_LOOP_STRICT=1+--stricttogether fail CI on an idle loop. §19 already hard-gates a wired loop that is genuinely diverging, so §23 does not double-count..control/audit/+.control/arcs.yaml+ L0/L1 markers (14/14); docs + VERSION 0.21.10 → 0.22.0.Dependency-chain (P14)
install-rcs-stability.sh(reused, unchanged) →install-l3-stability.sh(writes to$WORKSPACE— verified no PWD bug);arcs.yaml.template;compute-budget-status.sh/compute-arc-status.sh.onboard.sh(already wired — now converges);repair.sh(already offers install-rcs);tests/canary/01; every workspace runningbstack bootstrap/bstack doctor.Verification (P11)
arcs-validation/repair-merge-hooks/onboardsuites green.BSTACK_LOOP_STRICT=1alone → exit 0; with--strict→ exit 1._bstack_primitivemarkers).Cross-Review (P20)
Strata B fresh-context adversarial review: 8.5/10, passes (≥7). No blocking findings. Four nits addressed in the same commit:
BSTACK_LOOP_STRICTtwo-flag clarity (docs + Usage block + inline hint), tightened the C ("closing") signal to require the workspace's ownarcs.yaml(not template fallback), corrected the|| truecomment (set -ewithoutpipefail), fixed stale "28 skills" header → 31.🤖 Generated with Claude Code