Skip to content

feat(examples): add recommended Babysitter flow - #548

Closed
miyaontherelay wants to merge 1 commit into
mainfrom
feat/babysitter-recommended-flow
Closed

miyaontherelay wants to merge 1 commit into
mainfrom
feat/babysitter-recommended-flow

Conversation

@miyaontherelay

@miyaontherelay miyaontherelay commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Problem

Babysitter is only installable as a flow-extension plugin or as a hosted artifact pinned to one pull request. That is not the desired product path: Cloud needs a second Recommended Flow alongside Software Garden that can cover selected or all approved repositories, while a GitHub babysit label opts an individual pull request into routing.

The Cloud activation label is a display name, not a GitHub trigger, and plugin-install proof alone cannot establish this contract.

Change

  • add a standalone, versioned Recommended Babysitter entry point that consumes Cloud's normalized { approver, pullRequest, event } envelope
  • bind each wake to the Cloud-routed repository and pull request, then perform Babysitter's authoritative live-state reread
  • generate and commit the one-file immutable artifact required by the recommended catalog
  • pin all eleven supported event identities and reject malformed or undeclared deliveries before the first provider read
  • document the separate catalog trigger { "events": "pull_request", "labels": "babysit" }
  • keep automatic merge off, validation hard-failed, and the existing write/publication capability gates closed

This PR creates the Flows artifact only. A human Flows release is required before agentrelay.com or Cloud may pin it. It does not enable or claim automatic fixes, review publication, or merge.

Depends on the Surface vocabulary fix in #543.

Verification

$ npm run build:recommended && npm run check:recommended && npm run typecheck
Built examples/babysitter/dist/babysitter-recommended.flow.ts
Checked dist/babysitter-recommended.flow.ts
$ npm test
ℹ tests 64
ℹ pass 57
ℹ fail 0
ℹ todo 7

The seven TODOs are the pre-existing, deliberately red capability gates described in the README.

$ npm run build --prefix packages/sdk
> tsc && node scripts/make-cli-executable.mjs

$ node packages/sdk/dist/cli.js check examples/babysitter/dist/babysitter-recommended.flow.ts
CHECK PASSED examples/babysitter/dist/babysitter-recommended.flow.ts

Note

Low Risk
Changes are confined to the examples/babysitter package and a committed demo artifact; runtime behavior intentionally stays fail-closed with no merge or publication enabled.

Overview
Adds a second Babysitter install path for Cloud’s Recommended Flow catalog: a versioned standalone entry (recommended.ts) that reads Cloud’s { approver, pullRequest, event } envelope, maps coordinates from the trusted pull request object, validates all eleven subscription IDs before any GitHub read, and delegates to the existing babysitConfigured body with authored fail-closed policy (no merge, testCommand: false, held capability gates).

Build and commit plumbing: build-recommended.mjs esbuild-bundles authored modules into the immutable one-file artifact dist/babysitter-recommended.flow.ts (Surface stays external); build:recommended / check:recommended scripts and gitignore exceptions keep only that blob tracked. README documents the catalog trigger (pull_request + babysit label) versus the activation display label.

Tests cover dynamic repo binding per subscription, rejection of untrusted delivery fields, pre-read validation failures, and artifact self-containment.

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

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

coderabbitai Bot commented Sep 22, 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: 43936d24-3543-4116-8661-d9067fd2098e


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.

@miyaontherelay

Copy link
Copy Markdown
Contributor Author

Closing as superseded by the corrected product contract. Babysitter remains a schema-2 flow-extension plugin composed onto Software Garden; it is not a standalone Recommended Flow. The replacement work will add optional plugin composition to Garden activation and require an authorized coding-session binding before any babysit-label wake can enter the loop. Garden-originated PRs will bind through lineage; arbitrary PRs will require explicit binding and fail closed otherwise. No release or rollout was performed from this PR.

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