Skip to content

Delete obsolete routine inference and hub-local freeze paths; correct docs (CL-7364, CL-7365) - #562

Open
TheGreatAxios wants to merge 7 commits into
cl-7371-workflow-detailfrom
cl-7364-cleanup
Open

Delete obsolete routine inference and hub-local freeze paths; correct docs (CL-7364, CL-7365)#562
TheGreatAxios wants to merge 7 commits into
cl-7371-workflow-detailfrom
cl-7364-cleanup

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Closes CL-7364, CL-7365.

Merge with cl-7363-agent-builder-native

This PR merged in cl-7363-agent-builder-native, which cut packages/agent-directory
over to native deploy (WorkflowDeployer) for agent definitions — the caller this PR
previously listed as "retained" for @corbits/workflow-freeze. That removed the last
real importer, so this PR now deletes the package outright instead of leaving it in
place.

Conflicts resolved:

  • apps/hub/src/index.ts — one workflowDeployer (WorkflowDeployer) instance,
    passed to both packages/agent-directory's routes (cl-7363) and the template-block
    deploy path (this branch); all @corbits/workflow-freeze imports dropped.
  • docs/AGENTS-PAGE.md — kept cl-7363's "Creating an agent" wording (source tree →
    native deploy via WorkflowDeployer → frozen definition).
  • bun.lock — took theirs, regenerated via bun install --lockfile-only + bun install.

CL-7364 — deletions / cutovers

  • Deleted: packages/workflow-freeze/ entirely (package, tests, LICENSE,
    tsconfigs) — grep -rn "workflow-freeze" after the merge showed no remaining
    source importer, only the package itself, an agent-directory regression test
    guarding the cutover (native-deploy-cutover.test.ts, kept — it now trivially
    passes since the package is gone), and historical doc mentions.
  • Removed: apps/hub/package.json's @corbits/workflow-freeze dependency,
    and its tsconfig.build.json project reference.
  • packages/workflow-host-actions: confirmed absent (no tracked files).
  • Fixed: packages/agent-directory/src/definition-asset.ts's
    statusForAgentDefinitionDeployError was missing the "wire_hash_mismatch"
    case (CL-7362) that @corbits/agent-workflow-authoring's own statusFor
    already handles — added, matching that mapping (409).
  • docs/workflow-model.md's "Not yet cut over" note (agent-directory still using
    DefinitionFreezer) is now stale and rewritten to describe the actual cutover.

No real importer remains — nothing to list as retained.

CL-7365 — docs

Checked PRODUCT.md, ARCHITECTURE.md, IMPLEMENTATION.md, docs/GLOSSARY.md,
packages/routines/README.md, workflows/README.md, and docs/AGENTS-PAGE.md
against docs/workflow-model.md's model (source asset → native deploy →
deployed definition → routine → run). All were already consistent — no
workflow.json, DefinitionFreezer, or hub-local-freeze claims remained
active outside historical/labeled notes (e.g. packages/evals/README.md's
CL-6439 pass narrative, left as historical).

Checks

bun run typecheck, check:routine-target-inference, check:licenses,
bun run scripts/generate-tsconfig-references.ts --check (routines-tools
drift pre-existing/unrelated, left as-is), and bun test packages/agent-directory apps/hub/src (298 pass, 37 DB-gated skip locally) —
all green.

Resolves CL-7364
Resolves CL-7365

@TheGreatAxios
TheGreatAxios changed the base branch from cl-7358-target-edit to cl-7371-workflow-detail September 2, 2026 07:45
@TheGreatAxios
TheGreatAxios force-pushed the cl-7364-cleanup branch 2 times, most recently from 770d681 to 8e67a7a Compare September 2, 2026 09:53
A create or PATCH-carried retarget now must clear the same two gates
before it is persisted: resolveLaunchableDefinition must resolve the
asset, and the acting principal must be authorized for
workflow-definition:<id>/read — the same verb listRoutineTargets
already checks per row. A denial is a typed 403 alongside the
existing 400/404/409 target envelopes, on both the tenant-session and
Myra's workflow-run-authenticated routine surfaces.

Also routes a pre-existing catch in postRoutineEnabledNotice through
reportError, since this change's diff now touches that line and
check:report-error requires it.
…CL-7364)

The template-block route was still self-freezing an inert workflow
definition through @corbits/workflow-freeze's freezeInertWorkflowDefinition
instead of going through the real install/probe/gate/freeze pipeline. It
now writes its source tree and calls the same workflowDeployer.deploy the
agent-authored deploy path already uses.

Adds check:routine-target-inference, guarding two CL-7364 deletions from
regrowing: agents[0]-derived routine targets in apps/web and
packages/chat-ui, and any non-vendor read/write of the retired
workflow.json path.

@corbits/workflow-freeze stays: packages/agent-directory still calls
DefinitionFreezer.freeze/refreeze for agent definitions, so the package
and its dependents are not removed. No routine target inference,
resolveCreateTarget, or ensureMyraWorkbench-as-target code was found on
this branch — CL-7358 already cut that over. packages/workflow-host-actions
and packages/agent-directory/src/resolve-myra-definition-id.ts (still used
by Myra drafting) do not exist to delete / are still needed, respectively.
…vely (CL-7365)

docs/workflow-model.md's "Behavior to delete, not retain" section now
reads "Deleted in CL-7364" and describes what actually landed: routine
target inference removal, the template-block route's cutover to
workflowDeployer, and the check that guards both. Notes that
packages/agent-directory's own DefinitionFreezer usage is a separate,
not-yet-cut-over caller, so @corbits/workflow-freeze isn't documented as
gone.

docs/AGENTS-PAGE.md no longer describes the agent-definitions create route
as writing a workflow.json file — it writes a @corbits/workflow-source
codebase and freezes it, matching the retired-envelope rule everywhere
else in the docs.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review September 2, 2026 11:09
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