Repository navigation
ci(release): gate the Surface ./signals subpath (follow-up to #677) - #680
miyaontherelay wants to merge 2 commits into
Conversation
Follow-up to #677 (kept separate per AGENTS.md: never edit a gate that judges your own work). pack-release.mjs requires dist/signals.js and dist/signals.d.ts in the Surface tarball, and surface-package-gate.sh checks the subpath resolves from the packed tarball and imports only Node built-ins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
miyaontherelay has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 905ac31. Configure here.
The release test now asserts packing fails without dist/signals.js and succeeds once the hosted signal helper files are present. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Capy couldn't review this pull request because Agent Relay is out of credits, add credits or enable auto-reload to resume automatic reviews. |
[High impact] Release packaging now requires signal helper files. The PR appears safe to merge, with two non-blocking improvements to the new gate.
|
| const entry = require.resolve('@relayflows/surface/signals'); | ||
| // Statement-level only: the module's doc comment shows an example import. | ||
| const specifiers = [...readFileSync(entry, 'utf8') | ||
| .matchAll(/^\s*(?:import|export)\b[^;]*?\bfrom\s+["']([^"']+)["']|\bimport\s*\(\s*["']([^"']+)["']/gm)] |
There was a problem hiding this comment.
The regex skips imports such as import "ai-hist"; because it requires either from or import(...). The existing node:timers/promises import keeps specifiers nonempty, so adding that dependency would still pass. The packed consumer installs dependencies, so loading the module would not catch it either.
Include side-effect imports in the check and add a test that rejects one.
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/surface-package-gate.sh
Line: 122
Comment:
**Bare imports escape the gate**
The regex skips imports such as `import "ai-hist";` because it requires either `from` or `import(...)`. The existing `node:timers/promises` import keeps `specifiers` nonempty, so adding that dependency would still pass. The packed consumer installs dependencies, so loading the module would not catch it either.
Include side-effect imports in the check and add a test that rejects one.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| RELAYFLOW_V2_CLOUD_RUN_ID=packed-run RELAYFLOW_V2_SIGNAL_READ_TOKEN=packed-read RELAYFLOW_RUN_ID=engine-run \ | ||
| node --input-type=module - <<'NODE' |
There was a problem hiding this comment.
If the shell has FLOWS_CLOUD_URL set to another endpoint, waitForSignal uses it, but this smoke test always expects the production URL. That makes a correct package fail the gate.
Unset FLOWS_CLOUD_URL for this Node process so the test actually checks the fallback.
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/surface-package-gate.sh
Line: 112-113
Comment:
**Local settings fail the gate**
If the shell has `FLOWS_CLOUD_URL` set to another endpoint, `waitForSignal` uses it, but this smoke test always expects the production URL. That makes a correct package fail the gate.
Unset `FLOWS_CLOUD_URL` for this Node process so the test actually checks the fallback.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Follow-up to #677, kept separate because flows AGENTS.md says never edit a gate that judges your own work (Capy's finding on #677).
scripts/pack-release.mjsrequiresdist/signals.jsanddist/signals.d.tsin the Surface tarball.scripts/surface-package-gate.shchecks that@relayflows/surface/signalsresolves from the packed tarball and imports only Node built-ins.These are the exact gate edits that were removed from #677 at da059aa; the implementation they check is already on main.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Note
Low Risk
Changes only affect release/pack validation scripts and tests; no runtime product behavior is modified.
Overview
Release CI now enforces that the
@relayflows/surfacetarball ships and self-containedly exposes the hosted signal helper added in #677.pack-release.mjstreatsdist/signals.jsanddist/signals.d.tsas required Surface artifacts alongside the existing runtime outputs.publish.test.mjsasserts packing fails until those files exist.surface-package-gate.shgains a packed-tarball check that@relayflows/surface/signalsresolves, imports onlynode:built-ins, uses hosted env defaults forwaitForSignal, and rejects invalid signal names. The TypeScript consumer fixture also imports the signals API so types resolve from the packed package.Reviewed by Cursor Bugbot for commit d76ac93. Bugbot is set up for automated code reviews on this repo. Configure here.
Agent Relay sessions
claudesession28cd20e0· opened viagh pr create· last active 2026-10-19