Skip to content

drive: cloud run 663d9095 - #165

Closed
kjgbot wants to merge 1 commit into
mainfrom
cloud/run-663d9095
Closed

drive: cloud run 663d9095#165
kjgbot wants to merge 1 commit into
mainfrom
cloud/run-663d9095

Conversation

@kjgbot

@kjgbot kjgbot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Automated drive work from cloud run 663d9095-ab4a-432a-b1f7-99e19c022fde.

The sandbox cannot open PRs (no remote, no GitHub token), so this was delivered
from a host that can. Verification and adversarial review ran in-run — see
ops/reviews/ in the diff. A human merges.

Work produced by cloud run 663d9095-ab4a-432a-b1f7-99e19c022fde in a workflow sandbox and delivered from
this host, because a sandbox has no remote and no GitHub token.

Verification and adversarial review ran in-run; see ops/reviews/ in the diff.
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: e7b46a7a-548b-4f32-94c0-9c83d942145a

📥 Commits

Reviewing files that changed from the base of the PR and between 066ef24 and cd344f8.

📒 Files selected for processing (4)
  • .github/workflows/cloud-runtime-artifact.yml
  • sdk/package.json
  • sdk/scripts/prune-test-build.mjs
  • sdk/scripts/test.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The SDK test command now uses a shared shell pipeline with cleanup. The CI workflow uses ops/cargo.sh for kernel tests and npm test for SDK tests.

Changes

Test execution updates

Layer / File(s) Summary
SDK test pipeline and cleanup
sdk/package.json, sdk/scripts/test.sh, sdk/scripts/prune-test-build.mjs
The npm test script delegates to scripts/test.sh. The pipeline runs preparation, type checks, builds, test type checks, and Vitest. Exit cleanup removes generated .map and .d.ts files.
CI test command integration
.github/workflows/cloud-runtime-artifact.yml
Kernel tests use ops/cargo.sh test --workspace with the stable toolchain. SDK tests use npm test.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Poem

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.


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 Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@kjgbot

kjgbot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Not merging: this reverts #154 and would break CI for every PR

The workflow change here deletes the plain cargo test --workspace and restores:

run: PATH="$HOME/.cargo/bin:$PATH" RUSTUP_TOOLCHAIN=stable sh ../ops/cargo.sh test --workspace

That is the invocation #154 removed, along with the comment explaining why. ops/cargo.sh unconditionally redirects RUSTUP_HOME to $HOME/.relayflows-toolchain/rustup, which on a GitHub runner is empty. That produced, on every PR:

error: rustup could not choose a version of cargo to run, because one wasn't
specified explicitly, and no default is configured

Adding RUSTUP_TOOLCHAIN=stable does not fix it — it names a toolchain inside that same empty RUSTUP_HOME, so the shim still has nothing to resolve. That is precisely the trap I fell into originally: my local runs had the variable set and a toolchain already installed in that home, so it passed locally and failed on every runner.

The wrapper exists for a cloud sandbox, where the propagated tree drops files over a per-file size cap and each step must obtain its own toolchain. A runner has neither constraint, and dtolnay/rust-toolchain has already installed a default toolchain into the standard home.

The rest may well be good

sdk/scripts/prune-test-build.mjs, the test script indirection, and scripts/test.sh look like reasonable build hygiene and I have no objection to them in principle. But they are bundled with a change that would re-break the kernel step, so I cannot take the PR as a unit.

Suggested split: drop the cloud-runtime-artifact.yml hunk, keep the sdk/ tooling, and this becomes mergeable on its own merits.

Note on the drive loop

This is the second automated drive PR to touch that workflow. It is worth teaching the drive prompt that .github/workflows/cloud-runtime-artifact.yml currently encodes three hard-won fixes (#153 coverage, #154 toolchain, #159 analyzer skip), each with its reasoning in comments — reverting them silently is the failure mode to guard against, and the deleted comment block was there to prevent exactly this.

kjgbot pushed a commit that referenced this pull request Sep 5, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FtQSAcGDta5VH9xiZFT4sR

Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1
kjgbot pushed a commit that referenced this pull request Sep 5, 2026
Split out of #165, which bundled this with a wholesale revert of the CI
workflow. The workflow half restored `ops/cargo.sh` for the kernel test
step (that wrapper redirects RUSTUP_HOME to an empty dir on a runner, so
rustup cannot choose a toolchain) and dropped the analyzer-skip env, i.e.
it reverted #153, #154 and #159 together. Only the sdk tooling is carried
here; `.github/` is byte-identical to main.

scripts/test.sh runs the same chain the inline `test` script did, in the
same order, with `set -eu` for the fail-fast the `&&` chain gave. The new
behaviour is the EXIT trap, which prunes `.map` and `.d.ts` from
sdk/dist afterward.

CI is unaffected either way: the workflow runs the expanded chain minus
test:prep, not `npm test`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FtQSAcGDta5VH9xiZFT4sR

Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1

Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1
kjgbot added a commit that referenced this pull request Sep 5, 2026
The sdk half of #165, with that PR's CI revert dropped. `.github/` is
byte-identical to main (verified: `git diff origin/main --stat -- .github/`
returns 0 lines); #165's workflow hunk would have reverted #153, #154 and #159
together, restoring `ops/cargo.sh` for the kernel step, which redirects
RUSTUP_HOME to an empty dir on a runner.

`scripts/test.sh` runs the same chain the inline `test` script did, in the same
order, with `set -eu` supplying the fail-fast the `&&` chain gave.

Pruning is source maps only. Deleting `.d.ts` would have left
`"types": "./dist/index.d.ts"` pointing at a file `npm test` had just removed.
Every current in-repo consumer imports `.js` (`ops/probes/**`,
`workflows/drive.yaml`, `workflows/drive-cloud.yaml`,
`testdata/backlog-picker.flow.yaml`), so nothing breaks today — but the next
TypeScript consumer would meet a failure caused by running the tests.

Evidence at this head:
- independent signoff: local 3-lens preswarm review, maintainability / history /
  structure all REVIEW_PASSED. The history lens caught a false scope claim in an
  earlier message ("only ops/probes consume the sdk"), which was corrected.
- CI: linux-x64-artifact success, packed-consumer pass, CodeRabbit pass. The
  `review` check fails for a reason independent of this change and common to
  every flows PR: the gate invokes `agent-relay` and no step installs it
  (exit 127).

Supersedes the sdk half of #165.
@kjgbot

kjgbot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #170, which is now merged.

This PR bundled two unrelated changes. The sdk tooling half has landed via #170, with one change: pruning is source maps only, because deleting every .d.ts under dist left package.json's declared "types": "./dist/index.d.ts" pointing at a file npm test had just removed.

The remaining half is the reason this is closed rather than merged. Its .github/workflows/cloud-runtime-artifact.yml hunk reverted #153, #154 and #159 together:

  • it restored ops/cargo.sh for the kernel test step. That wrapper redirects RUSTUP_HOME to $HOME/.relayflows-toolchain/rustup, which on a GitHub runner is empty, so the rustup shim has nothing to choose and the step dies with rustup could not choose a version of cargo to run. The wrapper exists for a cloud sandbox, which a runner is not.
  • it dropped the analyzer-skip env, without which the SDK suite cannot pass on a runner at all.

Merging it would have re-broken CI in two places. Nothing here is lost: the half worth keeping is on main.

@kjgbot kjgbot closed this Sep 5, 2026
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