Skip to content

Catalog instantiate deploys any registered catalog workflow onto the bench (CL-7073) - #646

Merged
TheGreatAxios merged 11 commits into
mainfrom
cl-7073-catalog-instantiate
Sep 5, 2026
Merged

TheGreatAxios merged 11 commits into
mainfrom
cl-7073-catalog-instantiate

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Fixes CL-7073

Stacked on #645 (cl-7074-seed-only-myra) — target branch is that PR's
branch, not main.

What changed

POST /:assetName/deploy (apps/hub/src/templates/template-block-routes.ts)
generalizes from a hardcoded code-review-only builder to any
@corbits/seeding CATALOG_WORKFLOWS entry:

  • DefaultWorkflow.buildJson now takes the tenant's real, ordered
    inference preferences directly instead of a single ModelSource, so
    the same buildJson per catalog entry serves both seedTenant's
    HTTP self-call deploy path and the hub's native in-process deploy
    path (apps/hub/src/templates/block-workflows.ts).
  • code-review moves out of its own hand-rolled builder into
    CATALOG_WORKFLOWS alongside echo, workbench-digest, and
    last-30-days-research — no special case left in
    block-workflows.ts.
  • A new deployableCatalogWorkflow(assetName) export is the one
    lookup both the route and any future caller use to ask "is this
    asset name deployable on demand."
  • assistant (seeded already) and heartbeat
    (CATALOG_TEST_WORKFLOWS, test-only) stay unreachable through this
    route, same as before.
  • Idempotency is unchanged and already correct: the route's
    deployWorkflowSource port looks up an existing deployed
    workflow_definition by asset name first and returns it
    (created: false) rather than deploying again.

Tests

  • apps/hub/src/templates/template-block-routes.test.ts: new cases
    deploying last-30-days-research through the generalized builder,
    and asserting assistant/heartbeat still 404 rather than deploy.
  • packages/seeding/test/seed.test.ts,
    packages/seeding/test/routine-launchability.test.ts,
    packages/seeding/test/tool-registry-coverage.test.ts: updated for
    the new buildJson signature and the code-review entry in
    CATALOG_WORKFLOWS.

Docs

docs/seed-reconciliation.md gets a new "Deployable through the
catalog" section naming both callers and the idempotency contract.

Scope note

This PR generalizes the one existing deploy route and its backend
plumbing per the acceptance criteria (new bench's catalog lists
digest/research; deploying one creates the definition; a second call
no-ops; code-review still deploys with no special case left in
block-workflows.ts; heartbeat stays test-only). It does not wire
the Routines create flow or the invite flow to call this route, or
add an "Add" affordance to the scheduled-list UI — investigating
apps/web's routine-create stepper and the scheduled-list response
closely enough to wire that correctly (in particular:
listScheduledWorkflowDefinitions only returns definitions with a
ScheduleTrigger, so a naive "not yet deployed" diff against it would
mis-flag already-deployed non-schedule-trigger entries like
last-30-days-research) is real, separate work I'd rather flag than
rush. Recommend a follow-up ticket for the UI wiring.

Test plan

  • bun run --cwd packages/seeding typecheck
  • bun run --cwd apps/hub typecheck
  • bun test packages/seeding
  • bun test apps/hub/src/templates
  • bun run check:browser-safe-subpaths
  • bun run check:tool-package-pins
  • bun run check:licenses
  • bun run check:report-error
  • CI

@linear-code

linear-code Bot commented Sep 5, 2026

Copy link
Copy Markdown

CL-7073

@TheGreatAxios TheGreatAxios changed the title Catalog instantiate deploys any sourced catalog workflow onto the bench (CL-7073) Catalog instantiate deploys any registered catalog workflow onto the bench (CL-7073) Sep 5, 2026
…ch (CL-7073)

Generalizes POST /:assetName/deploy to any @corbits/seeding
CATALOG_WORKFLOWS entry instead of hardcoding code-review:
DefaultWorkflow.buildJson now takes the tenant's real inference
preferences directly, so the hub's native deploy path and
seedTenant's HTTP self-call path share one buildJson per entry.
code-review moves from a one-off builder in block-workflows.ts into
CATALOG_WORKFLOWS alongside echo, workbench-digest, and
last-30-days-research. assistant (seeded) and heartbeat (test-only)
stay unreachable through this route.
…CL-7073)

Adds an invariant test asserting every workflows/ source directory is
registered in exactly one of DEFAULT_WORKFLOWS/CATALOG_WORKFLOWS/
CATALOG_TEST_WORKFLOWS/EXCLUDED_WORKFLOW_SOURCES, plus route tests for
grant denial (403 envelope with refId) and the GTM template's first
block (granola-call) now deploying through the instantiate route.
…y (CL-7073)

CATALOG_WORKFLOWS had 4 entries against roughly 15 workflows/ source
packages, so most of a template's blocks (the GTM template's, in
particular) 404ed through the catalog instantiate route. Registers
granola-call, morning-brief, exa-topic-watch, process-granola-call,
attio-task-agent, pain-point-collateral, reddit-opportunity-scanner,
collateral-generation, and diligence-brief alongside the existing
entries, each with its own buildJson. Also drops the dead
@corbits/code-review-workflow dependency from apps/hub/package.json,
which nothing there imports directly anymore.
…connection (CL-7073)

CATALOG_WORKFLOWS now covers every workflows/ source package (CL-7073),
including several whose definition wires a real credentialBindings
entry (granola-call, morning-brief, process-granola-call,
pain-point-collateral, collateral-generation, diligence-brief). Each
requires its plugin actually connected to resolve at deploy, which
this walking-skeleton tenant never does, and hits
deployWorkflowFromSource's existing credentialCipher-required guard
the same way a real unconnected tenant would. local-rip.test.ts's
"deploy and go live" hop now excludes those from its assertion; every
catalog entry (credential-bound included) still gets route coverage
in template-block-routes.test.ts against fakes.
The six catalog workflows whose definitions carry credentialBindings
(granola-call, morning-brief, process-granola-call,
pain-point-collateral, collateral-generation, diligence-brief) cannot
deploy through POST /template-blocks/:assetName/deploy on this
Interchange pin: deployCodeSourcedWorkflow throws without a
credentialCipher this front does not supply. These tests pin the
derivation of that six-name set from each entry's own buildJson output,
assert the route refuses them with a 409 not_deployable_yet envelope
instead of hitting the deployer's 500 path, and swap local-rip's
hand-typed exclusion list for the same derivation helper.
catalogWorkflowDeployableOnThisPin (@corbits/seeding) derives, from
each CATALOG_WORKFLOWS entry's own rendered definition, whether it
carries credentialBindings the current Interchange pin's deploy front
has no credentialCipher seam to resolve. The template-blocks deploy
route now calls it before invoking deployWorkflowSource and answers a
409 not_deployable_yet envelope with consumer-safe copy for the six
credential-bound entries, instead of letting the vendored deployer
throw into the route's generic 500 branch.

Per the CL-7073 critique ruling: this does not route through the
adopting deploy front or add a credential-cipher seam to the vendored
deployer — that seam lands with the Interchange re-pin (CL-7107 / PR
#632, pin 692c3106). Until then this is the honest gap to state, not
paper over.
…7073)

Records why the six credential-bound CATALOG_WORKFLOWS entries 409
instead of deploying on this pin, and that they become addable at the
Interchange re-pin (CL-7107 / PR #632, pin 692c3106).
@TheGreatAxios
TheGreatAxios force-pushed the cl-7073-catalog-instantiate branch from 7c72dbe to 4377eff Compare September 5, 2026 03:09
@TheGreatAxios
TheGreatAxios changed the base branch from cl-7074-seed-only-myra to main September 5, 2026 03:09
@TheGreatAxios TheGreatAxios reopened this Sep 5, 2026
@TheGreatAxios
TheGreatAxios merged commit a1d62b4 into main Sep 5, 2026
7 checks passed
TheGreatAxios added a commit that referenced this pull request Sep 5, 2026
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