Skip to content

fix(workflows): build agent preps kernel + fixtures inside its own sandbox (v2 — replaces #64, #65) - #68

Closed
kjgbot wants to merge 2 commits into
mainfrom
fix/build-preps-kernel-v2
Closed

fix(workflows): build agent preps kernel + fixtures inside its own sandbox (v2 — replaces #64, #65)#68
kjgbot wants to merge 2 commits into
mainfrom
fix/build-preps-kernel-v2

Conversation

@kjgbot

@kjgbot kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Third attempt at the same fix. PRs #64 and #65 both got swarm-rejected for legitimate reasons; this PR addresses all of them.

What the diff does

Prepends a preamble to the build agent's task in workflows/drive.yaml so it runs inside the same sandbox as npm test:

chmod +x ops/cargo.sh
( cd kernel && sh ../ops/cargo.sh build )
find testdata/preflight -type f -name '*-cli' -exec chmod +x {} +

Why this replaces #64 and #65

#64 (separate pre-build step) — cloud workflow steps have per-step sandboxes (ops/BACKLOG.md:688-707), so a kernel binary built in pre-build was invisible to build-1. Codex history lens correctly rejected it.

#65 (in-prompt fix, first attempt) — two real bugs the swarm caught:

  1. Prompt claimed SDK live-kernel tests exec kernel/target/debug/relayflowd — but ops/cargo.sh:42-52 explicitly redirects builds via CARGO_TARGET_DIR and exposes the correct path as RELAYFLOWD_BIN. PR fix: build outside the propagated tree — this is the silent file loss #38 fixed exactly this pattern. Comment removed; prompt now references RELAYFLOWD_BIN.
  2. cd kernel && sh ../ops/cargo.sh build followed by cd .. && find testdata/preflight — the cd didn't persist between the agent's separate tool calls, so find searched the wrong directory and || true hid the failure. Now uses ( cd kernel && ... ) subshell and drops the || true failure-hiders (per the swarm's own concern that silent skips reproduce the exact stall we're fixing).

Test plan

  • python3 -c "import yaml; yaml.safe_load(open('workflows/drive.yaml')); yaml.safe_load(open('workflows/drive-cloud.yaml'))" — both files parse
  • python3 ops/gen-drive-cloud.py regenerated the cloud file cleanly (7 steps)
  • Swarm review (this PR)
  • First drive run after merge produces a PR that actually builds the GHA workflow (unblocked)

…x (replaces #64, #65)

PR #64 tried a separate pre-build STEP — cloud steps have per-step sandboxes
(ops/BACKLOG.md:688-707), so the binary never reached build-1.

PR #65 put the prep in build's prompt but got two real swarm findings:
1. Comment hardcoded kernel/target/debug/relayflowd — PR #38 fixed that
   pattern; ops/cargo.sh:42-52 redirects builds via CARGO_TARGET_DIR and
   exposes RELAYFLOWD_BIN. Prompt now references RELAYFLOWD_BIN.
2. `cd kernel && ...` followed by `cd .. && find` broke when the agent
   ran commands as separate tool calls — cd doesn't persist. Now uses
   `( cd kernel && sh ../ops/cargo.sh build )` subshell and
   `find testdata/preflight ...` (no cd needed).

Also drops the `|| true` failure-hiders — a silent skip here reproduces
the exact stall we're trying to fix.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 25 minutes.

View limit details

Limit 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.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 9ae285c9-dc3a-41e3-a1a5-ea9daf014fbb

📥 Commits

Reviewing files that changed from the base of the PR and between 7369f55 and f5b1f5f.

📒 Files selected for processing (2)
  • workflows/drive-cloud.yaml
  • workflows/drive.yaml

Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands.

@kjgbot

kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

maintainability lens — PASS

Maintainability review — PR #68

Blockers: none.

Concerns

  1. Sandbox prep is now stated in three surfaces with no single source of truth.
    The kernel-build-before-test rule already lives in
    workflows/drive.yaml:271-286 verify step (see the reference verify-1
    comment "Build BEFORE test: the SDK's live-kernel cases exec…" at
    drive-cloud.yaml:213-220) and in ops/cargo.sh:42-52. This PR adds a
    fourth statement as prose in the builder task prompt (drive.yaml:277-296,
    drive-cloud.yaml:182-193). Nothing links these together. If a future
    fixture rule changes — say, preflight adds a *.sh peer to *-cli — a
    maintainer will patch one surface and leave the others stale, and only
    verify will catch it, which is exactly the failure mode this diff was
    written to prevent. The natural refactor is scripts/prep-sandbox.sh
    invoked by both the task prompt and verify.

  2. No gate would fail if the preamble were deleted or corrupted.
    The instructions are prose to an LLM in a YAML string. Delete the block,
    the workflow still parses and the build step still starts. The only signal
    is a downstream verify failure — the same signal we already had. There is
    no test asserting the task prompt contains the sandbox-prep block, so the
    prompt itself is invisible to review over time.

  3. Implicit fixture contract: -name '*-cli'.
    (drive.yaml:284, drive-cloud.yaml:187) This encodes "preflight fixtures
    ending in -cli need +x" as a shell glob buried in a prompt. A fixture
    named foo.sh that also needs +x silently skips. If the naming convention
    is real, it belongs somewhere it can be searched — a script, or a
    comment in testdata/preflight/.

Notes

  • chmod +x ops/cargo.sh on drive.yaml:283 / drive-cloud.yaml:186 is
    redundant with the next line's sh ../ops/cargo.sh build. The `sh <script>` idiom is used precisely because the exec bit is unreliable (drive.yaml:210-213). Delete the chmod or explain why it's needed anyway.
  • The unenforceable instruction "Do NOT swallow errors with || true"
    (drive.yaml:286, drive-cloud.yaml:189) is a comment that asserts what the
    code cannot check. Fine as guidance, but the reader should not read it as
    a guarantee.
  • Run-number references "runs 60-63, 65-67" (drive.yaml:287) will age worse
    than the git-resolvable short-SHAs used elsewhere in the same file (e.g.
    run f18ec684, PR #38). Consider swapping in a SHA or dropping the
    numbers.
  • drive-cloud.yaml is generated (ops/gen-drive-cloud.py); header says
    "Do not hand-edit." The two edits are consistent this round, so no drift
    today, but the fact that the diff modifies both suggests hand-editing —
    running python3 ops/gen-drive-cloud.py after any change to
    drive.yaml's build task is the durable path.

REVIEW_PASSED

@kjgbot

kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

history lens — FAIL

Blocker

Concern

  • workflows/drive.yaml:289-296 and the cloud equivalent at :188-192 tell the builder to “fix the actual failure” while also ordering it to implement exactly ops/NEXT.md. The current NEXT explicitly excludes kernel changes. A kernel compilation failure could therefore authorize out-of-scope repair, repeating the scope-drift history. Prefer: capture the failure and stop without BUILD_DONE, unless the repair is strictly limited to the declared sandbox preparation.

Notes

REVIEW_FAILED

@kjgbot

kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

structure lens — PASS

→ Read AGENTS.md
→ Read docs/RFC-0001-everything-is-a-relayflow.md

$ grep -n "RELAYFLOWD_BIN|cargo.sh|preflight|BUILD_DONE" workflows/drive-cloud.yaml workflows/drive.yaml
workflows/drive-cloud.yaml:162: \ honestly report BUILD_DONE against it.\n# A package must be verifiable, but do not dictate its
workflows/drive-cloud.yaml:184: yourself and iterate until they pass. Keep files small and\nsingle-purpose. End with BUILD_DONE
workflows/drive-cloud.yaml:188: value: BUILD_DONE
workflows/drive-cloud.yaml:218: \ build" sh ../ops/cargo.sh build 2>&1); rc=$?\n if [ $rc -ne 0 ]; then\n echo "$out" | tail
workflows/drive-cloud.yaml:220: \ does not exist"\n exit 1\n fi\n out=$(cd kernel && run_bounded "kernel suite" sh ../ops/cargo.sh
workflows/drive-cloud.yaml:232: \ installs onto does not carry the executable bit. That is\n # the same fault that left ops/cargo.sh
workflows/drive.yaml:247: # builder cannot honestly report BUILD_DONE against it.
workflows/drive.yaml:281: single-purpose. End with BUILD_DONE only when the definition of done
workflows/drive.yaml:285: value: BUILD_DONE
workflows/drive.yaml:335: out=$(cd kernel && run_bounded "kernel build" sh ../ops/cargo.sh build 2>&1); rc=$?
workflows/drive.yaml:341: out=$(cd kernel && run_bounded "kernel suite" sh ../ops/cargo.sh test --workspace 2>&1); rc=$?
workflows/drive.yaml:365: # the same fault that left ops/cargo.sh non-executable. Which

$ wc -l workflows/drive-cloud.yaml workflows/drive.yaml; ls ops/cargo.sh testdata/preflight 2>/dev/null
331 workflows/drive-cloud.yaml
598 workflows/drive.yaml
929 total
ops/cargo.sh

testdata/preflight:
authenticated-cli
cli-declared.flow.yaml
cli-missing.flow.yaml
cli-signal.flow.yaml
cli-unauthenticated.flow.yaml
cli-unresolved.flow.yaml
counting-cli
empty-path.flow.yaml
flows.json
no-executor.flow.yaml
project-default
shared-cli.flow.yaml
signal-probe-cli
trigger-declared.flow.yaml
unauthenticated-cli
warning.flow.yaml

→ Read workflows/drive-cloud.yaml [offset=205, limit=40]

$ ls -la sdk/tests/live-kernel.test.ts 2>/dev/null; echo "---"; grep -rn "RELAYFLOWD_BIN" ops/cargo.sh 2>/dev/null | head
-rw-r--r--@ 1 khaliqgant staff 26851 Aug 30 16:25 sdk/tests/live-kernel.test.ts

ops/cargo.sh:42:# Anything that hardcodes kernel/target/debug must read RELAYFLOWD_BIN instead;
ops/cargo.sh:52:export RELAYFLOWD_BIN="${RELAYFLOWD_BIN:-$CARGO_TARGET_DIR/debug/relayflowd}"

Structure review — PR #68

Scope. This diff edits only two YAML workflow task: prompt strings (workflows/drive-cloud.yaml:182-196, workflows/drive.yaml:277-298). No kernel code, no journal/scheduler/lease/timer primitives, no provider SDKs, no product logic entering kernel/. The change is surface-only, so the RFC-0001 core boundaries (closed kernel vocabulary, fail-closed, completionReason) are untouched. Good.

Concern 1 — the same sandbox-prep knowledge now has two homes (duplication). The repo already carries an authoritative, fail-closed kernel-build path in the verification script: workflows/drive-cloud.yaml:210-220 and workflows/drive.yaml:335-341 build via run_bounded "kernel build" sh ../ops/cargo.sh build and exit 1 on failure, and already repair stripped exec bits at drive-cloud.yaml:210-236. The diff instructs the agent to re-run essentially the same three commands inline — chmod +x ops/cargo.sh, sh ../ops/cargo.sh build, find testdata/preflight … -chmod +x — as raw prose, without the run_bounded timeout wrapper or the fail-closed exit 1 on build failure. Two sources of truth for "make the kernel buildable" will drift: the prompt's cruder inline sequence shadows, rather than delegates to, the disciplined script.

Concern 2 — the block is copy-pasted verbatim between two files. The 16-line prep paragraph is duplicated with near-identical text in drive-cloud.yaml and drive.yaml. These mirror-workflows already parallel-edit; this amplifies it. A shared snippet/step (or a single sandbox-prep task) would be the single-purpose home.

Concern 3 — symptom-repair embedded in narrative. The prompt prescribes chmod +x on preflight *-cli fixtures, and its own comments confess the root layer that strips exec bits is "NOT established" (cf. drive-cloud.yaml:210-213, 232-234). Deterministic setup is being pinned in prose that an LLM must replay, patching a symptom whose mechanism is unaddressed.

Note. workflows/drive.yaml sits at 598 lines — over AGENTS.md's 500-line "design smell" threshold — though pre-existing, not worsened materially here.

Note (out-of-lane, flag for correctness lens). Prompt cites "19 SDK failures"; verification script records "7 cases" / "143 passed/7 skipped." Recounted evidence is inconsistent.

No blockers: boundaries hold, no primitive-vs-helper violation, no fail-closed regression (the prompt explicitly forbids || true). Concerns are duplication and prompt-embedded deterministic setup.

REVIEW_PASSED

…nel failure

Codex history lens found:
- The "runs 60-63, 65-67 stalled on the 19 failures" claim was too broad.
  Only #63 explicitly reported the 19 failures; #60-#62 had different
  blockers, #66 was auth, #67 landed changes. Narrowed to #63.
- The "fix the actual failure" wording could authorize out-of-scope kernel
  repair when ops/NEXT.md excludes it. Changed to STOP without BUILD_DONE
  on build failure — kernel repair is explicitly out of scope.
@kjgbot

kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

maintainability lens — PASS

Maintainability Review — PR #68

Context checked: AGENTS.md, docs/RFC-0001-*, workflows/drive.yaml, workflows/drive-cloud.yaml, ops/cargo.sh, ops/NEXT.md, ops/gen-drive-cloud.py.

Concerns (non-blocking, real maintainability drag)

  1. Preflight belongs in a deterministic step, not an LLM prompt. drive.yaml:277-295 places mandatory setup ("Each must succeed. Do NOT swallow errors with || true") inside the builder's task string. drive.yaml already alternates type: agent and type: deterministic steps for exactly this reason — a preflight deterministic step between assess-gate and build would (a) be non-negotiable rather than relying on model compliance, (b) fail once rather than burning up to maxIterations: 3 × 90min builder attempts, and (c) be testable outside a live tick. Telling an LLM "do not use || true" is a weak contract compared to a shell gate that cannot be paraphrased or skipped.

  2. Split ownership of the kernel build. drive.yaml:335 already builds the kernel in verify and fails the tick on error. After this PR, the builder ALSO builds it. Two owners for the same precondition means a future edit to one side may quietly assume the other still handles it. Either move the kernel build into a shared preflight step and drop it from verify's implicit path, or leave verify as the sole builder and let the builder discover the failure by running DoD commands.

  3. find … -name '*-cli' -exec chmod +x at drive.yaml:283 returns 0 even when the directory is missing or matches nothing. The "each must succeed" contract doesn't detect a renamed/deleted fixture set — the failure will surface far from the cause (some downstream SDK test that uses the fixture). Consider [ -d testdata/preflight ] guard + a fixture-count assertion.

  4. Historical rationale embedded in a runtime prompt. drive.yaml:287-288 cites PR drive: cloud run 569d5183 #63 and its ephemeral ops/NEEDS_HUMAN.md inside the agent's task string. PR numbers rot; per-run NEEDS_HUMAN files are not permanent. Rationale belongs in a code comment adjacent to the step, not in the prompt the model sees each tick.

  5. "Paste the last 5 lines" is unenforced. verification.type: output_contains, value: BUILD_DONE doesn't gate the requested paste. A future builder that omits it still passes — the instruction is decorative under the current gate.

Notes

  • Duplication of the block across drive.yaml and drive-cloud.yaml is covered by ops/gen-drive-cloud.py; both files match, so no drift now. This preexisting pattern amplifies the cost of prose in prompts: 15 lines pasted in each file is a bigger surface for a hand-edit to diverge on.
  • The kernel-repair-out-of-scope note is welcome; it prevents the tension between preflight failure and ops/NEXT.md scope from confusing a future reader.
  • No test exercises workflow YAML content, so behavioral regressions here can only be caught in-run.

Intent is defensible — surface sandbox exec-bit strip loudly before DoD commands confuse the builder — but the implementation puts a load-bearing gate inside a soft contract. Recommend a follow-up that promotes preflight to a type: deterministic step.

REVIEW_PASSED

@kjgbot

kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

history lens — FAIL

Blocker — fix occurs after the recorded failure. PR #63’s ops/NEEDS_HUMAN.md was written by the assessor, and assess-gate parks the run before the builder starts. This PR adds preparation only to the downstream build task (workflows/drive.yaml:271-299; workflows/drive-cloud.yaml:176-194). The assessor is still instructed to inspect SDK test status, so it can reproduce the same 19 failures, emit NEEDS_HUMAN, and prevent these new commands from ever running. To address the cited stall, equivalent preparation or explicit known-environment handling must occur in the assessor’s own sandbox.

Concern — repeats a recorded trust-in-prose mistake. The three load-bearing commands are agent instructions, while verification remains only output_contains: BUILD_DONE (workflows/drive.yaml:300-302; workflows/drive-cloud.yaml:195-197). ops/DRIVE-LOG.md records both “BUILD_DONE is not evidence that anything was built” and builders omitting required DoD work. This is the same structural pattern: the workflow asks for preparation and captured output but does not check either.

Concern — evidence wording is broader than established. The prompt says the sandbox “strips” fixture modes (workflows/drive.yaml:277-285), whereas existing workflow commentary deliberately says only that modes are lost somewhere during materialization and the responsible stage is unestablished.

Notes. The diff correctly avoids the mistakes in superseded PRs #64/#65: it uses RELAYFLOWD_BIN, preserves the caller directory with a subshell, removes || true, and stops rather than authorizing out-of-scope kernel repair. I found no contradiction with RFC-0001’s settled decisions. Both commit messages accurately describe their respective diffs, although the PR-level claim that this addresses all prior findings is not supported because the assessor-stage failure remains.

REVIEW_FAILED

@kjgbot

kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

structure lens — PASS

→ Read docs/RFC-0001-everything-is-a-relayflow.md
→ Read AGENTS.md

$ ls -la /Users/khaliqgant/AgentWorkforce/flows-ops/workflows/ && echo "---NEXT---" && ls -la /Users/khaliqgant/AgentWorkforce/flows-ops/ops/ 2>/dev/null && echo "---CARGO---" && ls -la /Users/khaliqgant/AgentWorkforce/flows-ops/ops/cargo.sh 2>/dev/null
total 160
drwxr-xr-x@ 8 khaliqgant staff 256 Aug 30 05:11 .
drwxr-xr-x@ 17 khaliqgant staff 544 Aug 30 05:11 ..
-rw-r--r--@ 1 khaliqgant staff 7071 Aug 30 05:11 bootstrap-gate1.yaml
-rw-r--r--@ 1 khaliqgant staff 25565 Aug 30 05:11 drive-cloud.yaml
-rw-r--r--@ 1 khaliqgant staff 32297 Aug 30 05:11 drive.yaml
drwxr-xr-x@ 4 khaliqgant staff 128 Aug 30 05:11 probes
-rw-r--r--@ 1 khaliqgant staff 6681 Aug 30 05:11 review-swarm.yaml
-rw-r--r--@ 1 khaliqgant staff 1071 Aug 30 05:11 watchdog.yaml
---NEXT---
total 640
drwxr-xr-x@ 21 khaliqgant staff 672 Aug 30 20:14 .
drwxr-xr-x@ 17 khaliqgant staff 544 Aug 30 05:11 ..
-rw-r--r--@ 1 khaliqgant staff 5367 Aug 30 20:14 AUTODRIVE_BRIEF.md
-rw-r--r--@ 1 khaliqgant staff 1944 Aug 30 05:11 AUTONOMY.md
-rw-r--r--@ 1 khaliqgant staff 44135 Aug 30 05:11 BACKLOG.md
-rw-r--r--@ 1 khaliqgant staff 224 Aug 30 05:11 DIRECTIVES.md
-rw-r--r--@ 1 khaliqgant staff 170324 Aug 30 05:11 DRIVE-LOG.md
-rw-r--r--@ 1 khaliqgant staff 1061 Aug 30 05:11 FORBIDDEN_PATHS
-rw-r--r--@ 1 khaliqgant staff 5415 Aug 30 05:11 HANDOFF-2026-08-28.md
-rw-r--r--@ 1 khaliqgant staff 1296 Aug 30 05:11 IMMUTABLE_PATHS
-rw-r--r--@ 1 khaliqgant staff 3703 Aug 30 16:25 NEXT.md
-rw-r--r--@ 1 khaliqgant staff 4652 Aug 30 05:11 RUN-CONTRACT.md
-rw-r--r--@ 1 khaliqgant staff 2501 Aug 30 05:11 SCOREBOARD.md
-rw-r--r--@ 1 khaliqgant staff 11057 Aug 30 05:11 STATE.md
-rw-r--r--@ 1 khaliqgant staff 6000 Aug 30 05:11 autodrive.sh
-rwxr-xr-x@ 1 khaliqgant staff 6604 Aug 30 05:11 cargo.sh
-rwxr-xr-x@ 1 khaliqgant staff 10649 Aug 30 05:11 deliver-run.sh
-rw-r--r--@ 1 khaliqgant staff 6541 Aug 30 05:11 gen-drive-cloud.py
-rwxr-xr-x@ 1 khaliqgant staff 3446 Aug 30 05:11 launch-gate.sh
-rw-r--r--@ 1 khaliqgant staff 4885 Aug 30 05:11 open-pr.mjs
drwxr-xr-x@ 80 khaliqgant staff 2560 Aug 30 05:11 reviews
---CARGO---
-rwxr-xr-x@ 1 khaliqgant staff 6604 Aug 30 05:11 /Users/khaliqgant/AgentWorkforce/flows-ops/ops/cargo.sh

→ Read workflows/drive-cloud.yaml [offset=160, limit=60]
→ Read workflows/drive.yaml [offset=260, limit=60]

Structure lens review — PR #68

Scope. The diff touches only the task prompt strings of the builder steps in two workflow files: workflows/drive.yaml (build, ~line 271–296) and workflows/drive-cloud.yaml (build-1, ~line 182–198). No kernel code, no new primitive, no journal/schema change. The change prepends a "prepare this sandbox" preamble (build the kernel binary via ops/cargo.sh, restore +x on preflight fixtures) ahead of the existing "implement the work package" instruction.

Blockers. None.

Concerns.

  1. Duplicated instruction block (coupling / DRY). The identical ~10-line sandbox-prep preamble is copy-pasted verbatim into both drive.yaml and drive-cloud.yaml. The two files are already parallel siblings (drive-cloud.yaml is emitted by ops/gen-drive-cloud.py, which is why one uses a block scalar and the other an escaped string). When this prep checklist needs to change again — as it already has, from the bare "Read ops/NEXT.md…" to the new preamble — it must be edited in two places that can drift. A single canonical source (e.g. a shared ops/SANDBOX-PREP.md the task references, or a deterministic prep step) would remove the copy.

  2. Deterministic prep folded into an agent step (single-purpose / step-type boundary). chmod +x, cargo build, and find … -exec chmod are deterministic shell operations with no model judgment required. RFC-0001 §1 and AGENTS.md rule 7 draw a hard line between deterministic and agent steps; bundling prep into the builder agent's task string blurs that boundary and makes the journal's step legibility coarser — the prep is not a separate journaled effect. A distinct deterministic prep step (or dependsOn) would keep the ladder's rungs explicit.

  3. Redundant kernel build (coupling / wasted work). The existing verify / verify-1 deterministic step already runs cd kernel && sh ../ops/cargo.sh build before the SDK suite (visible at drive.yaml:317–318 and drive-cloud.yaml:217–218). This PR tells the build agent to also build the kernel first, so the kernel is now compiled twice per tick in drive.yaml's delivering environment. The goal — the SDK's live-kernel tests need kernel/target/debug/relayflowd to exist before the agent runs definition-of-done commands — is legitimate, but it should be met by one stage owning the build, not two.

Notes. The fail-closed discipline is sound and welcome: "Do NOT swallow errors with || true" and "STOP without BUILD_DONE, paste the captured failure" directly honor AGENTS.md rule 4. The completionReason/BUILD_DONE contract is preserved.

REVIEW_PASSED

@kjgbot

kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

🎯 review-swarm: FAILED (M:pass H:fail S:pass)

Lens transcripts posted as sibling comments above.

@kjgbot

kjgbot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

Pivoting: swarm found 3rd real issue (assess step parks on red tests before build ever runs, so the in-build preamble was too late). Trying a smaller sdk/package.json pretest hook that fixes assess + build + verify simultaneously.

@kjgbot kjgbot closed this Aug 30, 2026
@kjgbot
kjgbot deleted the fix/build-preps-kernel-v2 branch August 30, 2026 22:00
kjgbot added a commit that referenced this pull request Aug 30, 2026
… drive loop, replaces #64/#65/#68) (#69)

* fix(sdk): build kernel + restore fixture +x before npm test (unblocks 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.

* fix(sdk): fail-closed on fixture chmod (address swarm blocker on #69)

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.

---------

Co-authored-by: kjgbot <kjgbot@agentrelay.dev>
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