Skip to content

ci(release): gate the Surface ./signals subpath (follow-up to #677) - #680

Open
miyaontherelay wants to merge 2 commits into
mainfrom
ms-lead/surface-signals-gates
Open

miyaontherelay wants to merge 2 commits into
mainfrom
ms-lead/surface-signals-gates

Conversation

@miyaontherelay

@miyaontherelay miyaontherelay commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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.mjs requires dist/signals.js and dist/signals.d.ts in the Surface tarball.
  • scripts/surface-package-gate.sh checks that @relayflows/surface/signals resolves 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


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with 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/surface tarball ships and self-containedly exposes the hosted signal helper added in #677.

pack-release.mjs treats dist/signals.js and dist/signals.d.ts as required Surface artifacts alongside the existing runtime outputs. publish.test.mjs asserts packing fails until those files exist.

surface-package-gate.sh gains a packed-tarball check that @relayflows/surface/signals resolves, imports only node: built-ins, uses hosted env defaults for waitForSignal, 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

  • claude session 28cd20e0 · opened via gh pr create · last active 2026-10-19

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>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miyaontherelay has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f3e25b78-f061-4b37-bc74-1613c8c937b8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

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

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found 1 potential issue (1 medium).

Open in Capy

Comment thread scripts/pack-release.mjs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread scripts/pack-release.mjs
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-ai

capy-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Capy couldn't review this pull request because Agent Relay is out of credits, add credits or enable auto-reload to resume automatic reviews.

Open in Capy

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[High impact] Release packaging now requires signal helper files.

The PR appears safe to merge, with two non-blocking improvements to the new gate.

Fix All in CodexFindings

  1. P2 Bare imports escape the gate ▶
  2. P2 Local settings fail the gate ▶
Fix with agent prompt
### Issue 1
scripts/surface-package-gate.sh:122
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.

### Issue 2
scripts/surface-package-gate.sh:112-113
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.

Summary

Adds release checks for the existing @relayflows/surface/signals subpath.

  • Surface release checks now require and exercise the signals subpath.

Reviews (1) · Last reviewed commit: "Mirror the signals tarball requirement i..." · Reviewed by Greptile

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)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

Fix in Codex Fix in Claude Code

Comment on lines +112 to +113
RELAYFLOW_V2_CLOUD_RUN_ID=packed-run RELAYFLOW_V2_SIGNAL_READ_TOKEN=packed-read RELAYFLOW_RUN_ID=engine-run \
node --input-type=module - <<'NODE'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

Fix in Codex Fix in Claude Code

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