Skip to content

fix(surface): ship Babysitter GitHub actions - #543

Merged
kjgbot merged 2 commits into
mainfrom
fix/babysitter-plugin-unblock
Sep 22, 2026
Merged

kjgbot merged 2 commits into
mainfrom
fix/babysitter-plugin-unblock

Conversation

@miyaontherelay

@miyaontherelay miyaontherelay commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Problem

The published @relayfile/adapter-core@0.6.2 catalog includes the GitHub actions pull_request.ready_for_review, pull_request.labeled, and pull_request.unlabeled, but Surface 2.0.25 still pins adapter-core 0.5.26. As a result, the shipped Surface vocabulary cannot represent the full Babysitter plugin manifest.

Change

  • pin adapter-core 0.6.2 and regenerate the Surface trigger vocabulary
  • restore all 11 Babysitter handlers in the real plugin fixture and documentation
  • pin both generated source and built dist/ output with a deterministic regression test
  • keep negative preflight tests negative by using genuinely unknown actions

A new Surface release is still required after merge; this PR does not publish one.

Verification

$ node scripts/generate-triggers.mjs --check
Checked 47 provider trigger modules
$ cd packages/surface && npm run build

> @relayflows/surface@2.0.25 build
> tsc
$ cd packages/surface && ./node_modules/.bin/tsc -p tsconfig.test.json --pretty false
[no output; exit 0]
$ cd packages/surface && ./node_modules/.bin/vitest run
 Test Files  9 passed (9)
      Tests  51 passed (51)
   Duration  28.43s
$ cd packages/sdk && npx vitest run tests/preflight.test.ts tests/plugin-extension.test.ts tests/flow-extension-compose.test.ts
 Test Files  3 passed (3)
      Tests  171 passed (171)
   Duration  15.62s

Note

Medium Risk
Changes the published trigger/event contract and flow-extension validation; misalignment between SDK, Surface dist, and adapter catalog would break Babysitter installs or dispatch lowering.

Overview
Aligns Surface with @relayfile/adapter-core@0.6.2 so the generated GitHub trigger registry includes pull_request.ready_for_review, labeled, and unlabeled, matching Babysitter’s eleven-subscription manifest.

The SDK dependency and lockfile are bumped; providerEventTypes and new github.pull_request_* helpers are regenerated, with a test that pins both source and built dist/ output. Babysitter catalog/docs now describe a full install path instead of plugin_event_unroutable, and the extension-babysitter fixture composes 11 handlers (was 8). Negative plugin_event_unroutable cases use a synthetic future_action so they stay valid after the registry grows.

Reviewed by Cursor Bugbot for commit b1e9822. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Sep 21, 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: 3ed18274-7c3e-415d-93eb-dff7d8f424dc


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.

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

Stale Bugbot comment from a previous run.

Comment thread catalog/plugins.json
@miyaontherelay

Copy link
Copy Markdown
Contributor Author

Clean-project install/verify proof against current head eb699ed857faecd345e7907bdf2ad6ca69e8bf81:

$ node /Users/khaliqgant/Projects/AgentWorkforce/flows-babysitter-unblock/packages/sdk/dist/cli.js add 'github:AgentWorkforce/flows@eb699ed857faecd345e7907bdf2ad6ca69e8bf81#examples/babysitter'
Added babysitter@0.1.0 (flow-extension) from github:AgentWorkforce/flows@eb699ed857faecd345e7907bdf2ad6ca69e8bf81#examples/babysitter
  digest sha256:fbcd846267aa1144ec1d2686f05301233cd02798ecb05c28b0d89a9c78252af7
  materialized at /Users/khaliqgant/Projects/AgentWorkforce/flows-babysitter-clean-proof/.flows/plugins/babysitter@sha256:fbcd846267aa1144ec1d2686f05301233cd02798ecb05c28b0d89a9c78252af7
  integrations: github; harnesses: claude; mcp: none
  events: github pull_request[opened,synchronize,reopened,ready_for_review,closed,labeled,unlabeled]; github pull_request_review[submitted,dismissed]; github check_run[completed]; github issue_comment[created]
  hooks: merge-gate; handlers: yes
  writes (declared, unenforced): github:pull_request:comment
  budget: $8 / 45m
  recorded in flows.json and flows.lock.json
$ node /Users/khaliqgant/Projects/AgentWorkforce/flows-babysitter-unblock/packages/sdk/dist/cli.js plugin verify
OK babysitter@0.1.0  github:AgentWorkforce/flows@eb699ed857faecd345e7907bdf2ad6ca69e8bf81#examples/babysitter  local digest matches lockfile; remote verified

Both commands exited 0 from /Users/khaliqgant/Projects/AgentWorkforce/flows-babysitter-clean-proof, created from a single {} flows.json outside every repository checkout.

Review follow-up verification:

$ npx vitest run tests/catalog-plugins.test.ts tests/preflight.test.ts tests/plugin-extension.test.ts tests/flow-extension-compose.test.ts
 Test Files  4 passed (4)
      Tests  173 passed (173)
   Duration  12.78s

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

Stale Bugbot comment from a previous run.

Comment thread packages/surface/package.json
@miyaontherelay

miyaontherelay commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

CI follow-up (final state at 8efc289): adapter-core 0.6.2 expands the GitLab writeback catalog, while the currently published Surface 2.0.25 and SDK bootstrap must retain relay-helpers 0.4.11. The earlier attempt to align relay-helpers to 0.4.12 was reverted because npm ci correctly rejected the unpublished Surface peer transition.

The narrow fix is test-side: both helper fanout suites now use a shared fixture that selects a writeback resource actually exposed by the pinned generated client instead of blindly taking the first resource in the independently expanded adapter catalog.

Literal verification after the same local-Surface override used by .github/workflows/cloud-runtime-artifact.yml:

$ npm ci --prefix packages/sdk --ignore-scripts
added 195 packages, and audited 196 packages in 5s

$ bun install --cwd packages/surface --frozen-lockfile --ignore-scripts
bun install v1.4.0 (34cbb9a40)
+ @relayfile/relay-helpers@0.4.11
4 packages installed [193.00ms]

$ npm install ./packages/surface --prefix packages/sdk --no-save --ignore-scripts
changed 1 package, and audited 197 packages in 972ms
$ cd packages/sdk && RELAYFLOWD_BIN=/Users/khaliqgant/Projects/AgentWorkforce/flows/kernel/target/release/relayflowd ./node_modules/.bin/vitest run tests/plugin-extension.test.ts tests/flow-extension-compose.test.ts tests/helpers-fanout.test.ts tests/authored-helpers.test.ts

 ✓ tests/helpers-fanout.test.ts (96 tests) 1044ms
 ✓ tests/plugin-extension.test.ts (90 tests) 1750ms
 ✓ tests/authored-helpers.test.ts (6 tests) 17477ms
 ✓ tests/flow-extension-compose.test.ts (22 tests) 19332ms

 Test Files  4 passed (4)
      Tests  214 passed (214)
   Duration  24.01s

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

Stale Bugbot comment from a previous run.

Comment thread packages/sdk/package.json Outdated
Session-Id: 01a0c4a6-dd65-7ce1-a90e-de1b0b4e86c3

Session-Id: 01a0c4a6-dd65-7ce1-a90e-de1b0b4e86c3
Session-Id: 01a0c4a6-dd65-7ce1-a90e-de1b0b4e86c3

Session-Id: 01a0c4a6-dd65-7ce1-a90e-de1b0b4e86c3
@miyaontherelay
miyaontherelay force-pushed the fix/babysitter-plugin-unblock branch from 8efc289 to b1e9822 Compare September 22, 2026 05:51
@miyaontherelay

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (6a1a3742, including #537) at b1e9822a and resolved the dependency graph rather than retaining the former release-bootstrap split. The final graph is now aligned:

$ rg -n 'adapter-core|relay-helpers' packages/sdk/package.json packages/surface/package.json
packages/sdk/package.json:50:    "@relayfile/adapter-core": "0.6.2",
packages/sdk/package.json:51:    "@relayfile/relay-helpers": "0.4.12",
packages/sdk/package.json:86:      "@relayfile/relay-helpers": "$@relayfile/relay-helpers"
packages/surface/package.json:59:    "@relayfile/relay-helpers": "0.4.12"

The direct adapter-core pin remains the trigger-generator authority; current main already supplies the matching published helper/client surface. The regenerated npm lock deduplicates adapter-core to 0.6.2.

Fresh lockfile/build evidence:

$ npm ci --prefix packages/sdk --ignore-scripts
added 193 packages, and audited 194 packages in 5s

$ mise x bun@1.4.0 -- bun install --cwd packages/surface --frozen-lockfile --ignore-scripts
+ @relayfile/relay-helpers@0.4.12
18 packages installed [2.89s]

$ node scripts/generate-triggers.mjs --check
Checked 47 provider trigger modules
$ cd packages/surface && mise x bun@1.4.0 -- bun run build && ./node_modules/.bin/tsc -p tsconfig.test.json --pretty false && ./node_modules/.bin/vitest run
 Test Files  9 passed (9)
      Tests  51 passed (51)
   Duration  31.39s
$ npm run build --prefix packages/sdk
> tsc && node scripts/make-cli-executable.mjs

$ npm run typecheck:tests --prefix packages/sdk
> tsc -p tsconfig.tests.json
$ cd packages/sdk && RELAYFLOWD_BIN=/Users/khaliqgant/Projects/AgentWorkforce/flows-babysitter-unblock/kernel/target/release/relayflowd ./node_modules/.bin/vitest run tests/plugin-extension.test.ts tests/flow-extension-compose.test.ts tests/helpers-fanout.test.ts tests/authored-helpers.test.ts --testTimeout=15000 --hookTimeout=60000
 Test Files  4 passed (4)
      Tests  214 passed (214)
   Duration  13.67s

@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 high 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 b1e9822. Configure here.

Comment thread packages/sdk/package.json
@kjgbot
kjgbot merged commit f63ab09 into main Sep 22, 2026
9 checks passed
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.

2 participants