Skip to content

feat(flows): pin Software Garden v3 in the catalog (catalogVersion 6) and automate future pin moves - #193

Merged
khaliqgant merged 3 commits into
mainfrom
feat/software-garden-catalog-v3
Oct 10, 2026
Merged

khaliqgant merged 3 commits into
mainfrom
feat/software-garden-catalog-v3

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Summary

1. The catalog pins Software Garden v3 (catalogVersion 6). #192 published v3, but web/data/recommended-flow-catalog.v1.json still served v1 at catalogVersion 5. Cloud refuses to upgrade an activation onto a different source at the same catalogVersion, so both the catalog and the entry advance:

Field Value
catalogVersion / entry version 6 / 6
path web/public/flows/software-garden/v3.flow.ts
release software-garden-v3
ref b6125bfdba33e15b4ad68c9d431fe5630c0894d7 (the commit where v3.flow.ts first landed on main, #192's merge commit; git log --diff-filter=A --format=%H origin/main -- web/public/flows/software-garden/v3.flow.ts)
sha256 a54a282e0ac607bf4481aee5c3353c7a5c63178da44080ba72ff872b24fcba73 (git show <ref>:<path>, the local file, the manifest, and the bytes the rawUrl serves all match)
url / rawUrl https://github.com/AgentWorkforce/agentrelay.com/blob/b6125bfd…/web/public/flows/software-garden/v3.flow.ts / https://raw.githubusercontent.com/AgentWorkforce/agentrelay.com/b6125bfd…/web/public/flows/software-garden/v3.flow.ts
  • SOURCE_BY_CATALOG_VERSION in web/lib/test/software-garden-artifact.test.ts gains row 6.
  • verify-catalog-gates.mjs and verify-recommended-flow-catalog.mjs no longer hardcode 5. Both scripts call a shared assertRecommendedCatalogEnvelope (recommended-flow-contract.mjs). It requires schemaVersion 1, a positive safe-integer catalogVersion and a flows array, which is what Cloud's recommendedFlowCatalogEnvelopeSchema parses. The artifact test separately holds catalogVersion equal to the newest recorded row. The gates also enforce Babysitter's authority floor of 4: Cloud's PUBLISHED_RECOMMENDED_FLOW_CATALOG_VERSION strips Babysitter from catalogs older than that.
  • recommended-flow-catalog.test.ts no longer hardcodes catalogVersion 5 or the v1 pin. It derives them from the catalog and checks their shape, so the exact pin is recorded once, in the rows above.
  • Docs (recommended.mdx): catalogVersion 6, and the v3 path/release example.
  • Babysitter is unaffected. The data diff touches only the software-factory entry. Babysitter's entry, its extension contract on Garden, and its blocked activation are byte-identical. verify-catalog-gates passes, and catalogVersion 6 is ≥ 4, so Cloud still publishes Babysitter metadata.

2. Automation: .github/workflows/software-garden-catalog-bump.yml + web/scripts/propose-software-garden-catalog-bump.mjs.

  • The workflow runs on a push to main that touches web/public/flows/software-garden/manifest.json, and on workflow_dispatch.
  • If the manifest's latest version is newer than the pinned one, the script does four things:
    • pins the commit where that version's file first landed on main, with the file's sha256 at that commit (it must equal the manifest's digest);
    • edits only the pin's values in the hand-formatted catalog JSON (it proves the result parses to exactly the intended object);
    • appends the SOURCE_BY_CATALOG_VERSION row;
    • moves the catalogVersion, release and path that recommended.mdx names.
  • Two jobs keep the write token away from third-party code:
    • check (read-only token) runs npm ci and --check, which makes the edit and runs npm run verify:recommended-flows, npm test and the web typecheck;
    • propose (contents: write, pull-requests: write) checks out the same SHA, installs nothing (the script uses only Node built-ins), and runs --open-pr.
  • propose pushes automation/software-garden-catalog-bump and opens the PR, or updates the one already open (title and body). The push is skipped when the branch already carries the same tree.
  • If the pin is current, it does nothing. It never merges and never enables auto-merge.
  • Only propose gets contents: write and pull-requests: write. No new secrets.
  • git gets the token from a credential helper that reads GH_TOKEN from the environment, never from argv, a URL or git config. Checkout keeps persist-credentials: false, and any error output is redacted.
  • The automation is documented in recommended.mdx under "Moving the Software Garden pin".

Known limitation

The bump PR is opened with GITHUB_TOKEN, and GitHub does not start other workflows for events that token causes, so CI does not run on the bump PR automatically. This repo has no existing convention for that (the IndexNow snapshot commit uses [skip ci]), so I did not add a PAT or App secret. Instead:

  • the workflow runs the same checks before it opens the PR;
  • the PR body tells the maintainer to run the CI workflow on the branch (gh workflow run test.yml --ref automation/software-garden-catalog-bump) or to close and reopen the PR.

The repo setting that lets Actions create PRs is already enabled (can_approve_pull_request_reviews: true).

Review rounds

  • Round 1 (9d5f423) addressed four threads:
    • Devin: the fixture was tied to catalogVersion 6;
    • Devin: the token was available to npm ci;
    • Devin: the token appeared in git argv;
    • Codex: the docs would go stale on automated bumps.
  • All four are fixed, replied to and resolved.
  • Round 2 (9d443f0) addressed two cubic threads:
    • the API test could not catch a forgotten entry-version bump, so the artifact test now independently requires version == catalogVersion;
    • --open-pr with --git ≠ --root would commit the wrong tree, so it is now refused up front.
  • Both are fixed, replied to and resolved.
  • After round 2: no unresolved threads, and cubic reports all issues addressed.

Verification

  • npm test: web 49 files / 614 tests passed; router 9 files / 97 tests passed.
  • npx tsc --noEmit passed in web and in router.
  • The CI workflow on this PR ("Tests and typecheck") passed.
  • npm run verify:recommended-flows passed. It ran verify:catalog-gates and fetched the v3 rawUrl: software-factory: verified software-garden-v3 (b6125bfd…) sha256:a54a282e…, and Babysitter verified unchanged.
  • npm run verify:setup-skills passed.
  • Script tests (web/lib/test/software-garden-catalog-bump.test.ts, 15 tests) rewind the checked-in files to fixed history points (v1 @ 5, v3 @ 6), so they stay valid after future bumps. They cover:
    • state@6 reports current;
    • state@5 reproduces this PR's catalog, artifact test and docs byte-for-byte;
    • a v3 to v4 bump produces catalogVersion 7;
    • the docs keep naming what the catalog serves;
    • refusals: an unlanded version, a digest mismatch, a manifest missing its own version, an ambiguous value, a non-pin change, a conflicting or non-consecutive row;
    • PR create vs. update vs. force-update, never merging, the token never appearing in any argument, and redaction.
  • Simulated a future catalogVersion 7 tree locally: the affected test files (39 tests) pass.
  • Checked the credential helper with git credential fill.
  • Red first: before the data change, the row 6 assertion, the envelope tests and the script tests failed against the parent.
  • Dry run on this tree: node web/scripts/propose-software-garden-catalog-bump.mjs prints Software Garden pin is current: v3 at catalogVersion 6.
  • Dry run on a scratch copy of origin/main (git archive, pinned to v1 at catalogVersion 5): --root <scratch> --write produced a catalog and an artifact test identical to this PR (diff empty), and changed exactly the three versioned values in that tree's docs. A re-run then reported current.
  • Negative gate check: catalogVersion 3, 0 and "6" fail verify-catalog-gates; 7 passes.

🤖 Generated with Claude Code


Agent Relay sessions

  • claude session 7f40e353 · opened via gh pr create · last active 2026-10-10
  • claude session 5d87b716 · contributor · ran gh pr commands · last active 2026-10-10

…e pin moves

Move the recommended catalog's software-factory source to the published v3
(web/public/flows/software-garden/v3.flow.ts at b6125bf, the commit where it
first landed on main; sha256 a54a282e) at catalogVersion 6, and record the
source in SOURCE_BY_CATALOG_VERSION.

The verify scripts no longer hardcode catalogVersion 5: they share an envelope
check (schemaVersion 1, positive-integer catalogVersion, flows array, as Cloud
parses it), and the gates keep Babysitter's authority floor of 4. The catalog
API test derives the pin from the catalog, so the exact pin is recorded once.

Add web/scripts/propose-software-garden-catalog-bump.mjs and the
software-garden-catalog-bump workflow: on a push to main that changes the
Software Garden manifest, it moves the pin to the latest published version,
runs the verify scripts, tests and typecheck, and opens or updates one pull
request. It never merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Session-Id: 248a5697-9493-45b7-a6fb-c23df13da25d
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T02:19:19.639831Z bd15c64 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cfbe8acc-8c5e-4c4d-b9a5-88a18635de8c





📥 Commits

Reviewing files that changed from the base of the PR and between fe95a12 and bd15c64.






📒 Files selected for processing (13)
  • .github/workflows/software-garden-catalog-bump.yml
  • web/content/docs/relayflows/recommended.mdx
  • web/data/recommended-flow-catalog.v1.json
  • web/lib/test/recommended-flow-catalog.test.ts
  • web/lib/test/recommended-flow-contract.test.ts
  • web/lib/test/software-garden-artifact.test.ts
  • web/lib/test/software-garden-catalog-bump.test.ts
  • web/scripts/propose-software-garden-catalog-bump.d.mts
  • web/scripts/propose-software-garden-catalog-bump.mjs
  • web/scripts/recommended-flow-contract.d.mts
  • web/scripts/recommended-flow-contract.mjs
  • web/scripts/verify-catalog-gates.mjs
  • web/scripts/verify-recommended-flow-catalog.mjs





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







📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The recommended-flow catalog advances to version 6 and pins Software Garden v3. A new planner validates manifest and source data, prepares catalog updates, and can synchronize a pull request. Catalog validation accepts positive safe-integer versions, and a GitHub Actions workflow runs the planner.

Changes

Software Garden catalog bump

Layer / File(s) Summary
Catalog v6 and version validation
web/data/recommended-flow-catalog.v1.json, web/scripts/recommended-flow-contract.*, web/scripts/verify-*.mjs, web/lib/test/recommended-flow-*.test.ts, web/lib/test/software-garden-artifact.test.ts, web/content/docs/relayflows/recommended.mdx
The catalog pins Software Garden v3 at version 6. Shared envelope validation checks the schema version, catalog version, and flows array. Catalog gates use the shared validation and their configured version floor. Tests derive pin expectations from the catalog and cover envelope validation.
Bump planning and catalog edits
web/scripts/propose-software-garden-catalog-bump.*, web/lib/test/software-garden-catalog-bump.test.ts
The planner validates manifest history, commit and digest data, then prepares catalog and source-row edits. Tests cover current and bump plans, invalid pin data, formatting-preserving edits, and source-row conflicts.
Pull-request synchronization and workflow
web/scripts/propose-software-garden-catalog-bump.*, web/lib/test/software-garden-catalog-bump.test.ts, .github/workflows/software-garden-catalog-bump.yml, web/content/docs/relayflows/recommended.mdx
The CLI runs checks and creates or updates a pull request for a planned bump. The workflow runs the planner for qualifying pushes or manual dispatch. Tests cover push and pull-request synchronization, and the documentation describes workflow permissions and local commands.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Actions as GitHub Actions
  participant CLI as Catalog bump CLI
  participant Git as Git history and remote
  participant Checks as Verification checks
  participant GH as GitHub CLI
  Actions->>CLI: Run planner in report-only mode
  CLI->>Git: Find first-added commit and read artifact bytes
  CLI-->>Actions: Return bump status
  Actions->>CLI: Run --open-pr with GITHUB_TOKEN
  CLI->>Checks: Run checks without token variables
  CLI->>Git: Compare branch trees and push if different
  CLI->>GH: Create or update the open pull request
Loading















Merge Risk: ⚪ Minimal · up to bd15c

No actionable merge-blocking issue remains; the catalog update and PR automation are ready for normal merge checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 47.06% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 10 files. (3 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly summarizes the main changes: pinning Software Garden v3 at catalogVersion 6 and automating future pin updates.
Description check Passed The description directly explains the catalog update, validation changes, automation workflow, security controls, known limitation, and verification results.

Full details: Docstring Coverage

Explanation

Docstring coverage is 47.06% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 10 files. (3 skipped: 3 unsupported.)



  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR






🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR










  • 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

I’m a rabbit with a catalog pin,
Software Garden v3 hops in.
The planner checks each path and byte,
Then drafts a pull request just right.
If the pin is current, I rest,
And nibble greens beside the test.

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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 3 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment thread web/lib/test/software-garden-catalog-bump.test.ts Outdated
Comment thread .github/workflows/software-garden-catalog-bump.yml
Comment thread web/scripts/propose-software-garden-catalog-bump.mjs Outdated
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://5a632e42-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd15c64aa2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web/scripts/propose-software-garden-catalog-bump.mjs

@cubic-dev-ai cubic-dev-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.

All reported issues were addressed across 13 files

You’re at about 92% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread web/scripts/propose-software-garden-catalog-bump.mjs Outdated
Comment thread web/lib/test/recommended-flow-catalog.test.ts
Comment thread web/scripts/propose-software-garden-catalog-bump.mjs Outdated
… from the write token

- Tests rewind the checked-in files to fixed points in the catalog's history
  (v1 at catalogVersion 5, v3 at 6), so they hold after the next bump; add a
  v3 to v4 (catalogVersion 7) case.
- The script also moves the docs' catalogVersion, release and path, and a
  test keeps the docs naming what the catalog serves.
- Split the workflow: a read-only job installs dependencies and runs the
  checks; a separate job with no dependencies holds the write token.
- git receives the token through a credential helper reading GH_TOKEN, never
  in argv or a URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Session-Id: 248a5697-9493-45b7-a6fb-c23df13da25d
…pen-pr on the edited tree

- software-garden-artifact.test.ts asserts the software-factory entry version
  equals catalogVersion, an independent check that a pin move advanced it
  (the API test derives the version from the same catalog).
- --open-pr refuses a --git directory other than --root, since it commits
  the working tree it edited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Session-Id: 248a5697-9493-45b7-a6fb-c23df13da25d
@khaliqgant
khaliqgant merged commit d319998 into main Oct 10, 2026
5 checks passed
@khaliqgant
khaliqgant deleted the feat/software-garden-catalog-v3 branch October 10, 2026 03:11
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