fix(sdk): build kernel + restore fixture +x before npm test (unblocks drive loop, replaces #64/#65/#68) - #69
Conversation
… drive loop) Root cause the drive loop has been stalling on since PR #63 (2026-08-30): sdk/tests/live-kernel.test.ts requires a built relayflowd binary (ops/cargo.sh's toolchain-external target), and the cloud sandbox does not build it before running npm test. Result: the assessor observes red tests, writes ops/NEEDS_HUMAN.md, assess-gate parks the run, and no build/verify step ever fires. Fix moves the prep INSIDE npm test itself so it's correct for every caller — the drive assessor, drive builder, verify step, and humans on a laptop. Superseded PRs (all closed): - #64: separate pre-build step — steps have per-step sandboxes, prep invisible to build (BACKLOG.md:688-707) - #65, #68: prep in build's task prompt — assess parks first, so build never runs This lands the prep at a lower layer that all three stages hit.
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe SDK test workflow now runs a preparation script. The preparation builds the kernel and updates preflight CLI fixture permissions before the SDK build and Vitest execution. ChangesSDK test workflow
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change runs kernel and fixture preparation before SDK tests; no actionable merge-blocking risk remains beyond normal checks and review. Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/settings/billing. Comment |
maintainability lens — FAILMaintainability Review — PR #69 (sdk/package.json)BlockersNone strictly, but this is close. The Concerns
Notes
REVIEW_FAILED |
history lens — FAILBlocker
Concerns
Notes
REVIEW_FAILED |
structure lens — PASS→ Read docs/RFC-0001-everything-is-a-relayflow.md $ ls -la /Users/khaliqgant/AgentWorkforce/flows-ops 2>/dev/null; echo "---kernel---"; ls /Users/khaliqgant/AgentWorkforce/flows-ops/kernel 2>/dev/null || echo "no kernel dir"; echo "---ops---"; ls /Users/khaliqgant/AgentWorkforce/flows-ops/ops 2>/dev/null || echo "no ops dir"; echo "---cargo.sh---"; ls /Users/khaliqgant/AgentWorkforce/flows-ops/ops/cargo.sh 2>/dev/null || echo "no cargo.sh" $ ls /Users/khaliqgant/AgentWorkforce/flows-ops/testdata/preflight 2>/dev/null || echo "no testdata/preflight"; echo "---sdk test files---"; ls /Users/khaliqgant/AgentWorkforce/flows-ops/sdk/testdata 2>/dev/null || ls /Users/khaliqgant/AgentWorkforce/flows-ops/sdk 2>/dev/null $ ls -la /Users/khaliqgant/AgentWorkforce/flows-ops/testdata/preflight/ | grep -i cli; echo "---charter---"; ls /Users/khaliqgant/AgentWorkforce/flows-ops/charter; echo "---cargo.sh head---"; head -40 /Users/khaliqgant/AgentWorkforce/flows-ops/ops/cargo.sh Cargo with a private toolchain home, so a run neither depends on nor pollutesa machine-global cargo store — while keeping that home OUT of the repo.It also has to FIND cargo. A cloud sandbox puts rustup's shims on PATH forinteractive/agent shells but not for the deterministic step shell, where
|
Both lenses on #69 correctly flagged `2>/dev/null || true` as failure-hiding: fixtures are tracked, chmod errors should surface. Replaced with `[ ! -d ../testdata/preflight ] || find ...` — tolerant of an absent dir, but any real error (missing find, permission denied, typo in flag) fails test:prep loudly. Maintainability lens's exact recommendation.
maintainability lens — PASSMaintainability review — PR #69 (
|
history lens — PASSBlockersNone. ConcernsNone. The final NotesThis change fits the recorded history:
REVIEW_PASSED |
structure lens — PASS→ Read docs/RFC-0001-everything-is-a-relayflow.md $ ls -la ops/cargo.sh 2>&1; echo "---"; ls -la ../flows/ops 2>&1 | head; echo "--- find testdata/preflight ---"; find ../flows/testdata/preflight -maxdepth 2 2>&1 | head -40
|
|
🎯 review-swarm: PASSED (M:pass H:pass S:pass) Lens transcripts posted as sibling comments above. |
Root cause
Since PR #63 the drive loop has been stalling on "19 SDK test failures". Root cause: `sdk/tests/live-kernel.test.ts` requires a built `relayflowd` binary (built via `ops/cargo.sh` into a toolchain-external target dir, per PR #38). The cloud sandbox does NOT build the kernel before running `npm test`.
Every drive step that inspects test status observes the failures:
Why this replaces #64, #65, #68
This one-line `sdk/package.json` change lands the prep AT the layer every stage hits: `npm test` itself. Whoever runs npm test — the assessor, the builder, verify, or a human on a laptop — gets a built kernel first.
Diff
```diff
```
Test plan