Prove aligned workflow and routine paths end to end (CL-7366) - #563
Merged
Conversation
TheGreatAxios
force-pushed
the
cl-7366-e2e-proof
branch
from
September 2, 2026 07:44
495f6f9 to
10befd1
Compare
TheGreatAxios
changed the base branch from
cl-7364-cleanup
to
cl-7373-fold-workflows
September 2, 2026 07:46
TheGreatAxios
force-pushed
the
cl-7366-e2e-proof
branch
from
September 2, 2026 09:11
10befd1 to
af2f9d8
Compare
TheGreatAxios
force-pushed
the
cl-7366-e2e-proof
branch
from
September 2, 2026 09:16
af2f9d8 to
2c566db
Compare
TheGreatAxios
force-pushed
the
cl-7366-e2e-proof
branch
from
September 2, 2026 09:40
2c566db to
045cf20
Compare
TheGreatAxios
force-pushed
the
cl-7366-e2e-proof
branch
4 times, most recently
from
September 2, 2026 10:15
f450a58 to
264174d
Compare
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.
TheGreatAxios
force-pushed
the
cl-7366-e2e-proof
branch
from
September 2, 2026 11:05
264174d to
4678157
Compare
TheGreatAxios
marked this pull request as ready for review
September 2, 2026 11:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: https://linear.app/abklabs/issue/CL-7366
What this proves
One new API-level e2e file,
scripts/e2e/routine-alignment.test.ts, driving only public HTTP routes against a real hub+sidecar+Postgres (no seeded internal rows), plus one extension toscripts/e2e/browser/walkthrough.ts.Covered
GET .../workflows/targets, run-now fire appears in/routines/:id/runs.PATCH /routines/:idswapsdefinitionAssetIdonly, other fields unchanged./api/workflow-workflow-authoringsurface:POST /author(201,commitSha),POST /:assetId/deploy(201, asset now a routine target), redeploy with a wrongexpectedWireHash(409wire_hash_mismatch).approval:*grant, checked viaGET /api/tenants/:t/grants.GET /workflows/definitions/:assetId/detailreportsdeployedfor the live asset, 404 for a bogus id.Adjusted from the original scenario list
POST /:assetId/deploy/preview(step 2 in scenario 4) is asserted against what the codebase actually does today: CL-7362 ("native probe with empty ApprovalSet, no freeze") is listed as not-yet-wired indocs/workflow-source-authoring.md's "Seams that do not exist yet" — the route answers a documentedunavailableenvelope. The test asserts that exact fail-closed shape rather than faking a wireHash/grants preview, then proceeds to deploy directly (no preview-derivedexpectedWireHash).Walkthrough
Step 11 (
11-routine-target-picker-blocks-until-picked): opens/routines, opens "New routine", asserts the target picker offers >= 1 option, confirms a blur with no target picked does not autosave, picks a target, confirms it then autosaves ("Saved"), and confirms the routine appears back on/routines.Verification
bunx tsc --noEmit -p tsconfig.jsonandbunx eslintclean on both changed files.docker compose -f docker-compose.test.yml up -d+DATABASE_URL=postgres://postgres:postgres@localhost:5432/workbench HUB_DATA_DIR=$(mktemp -d) bun test scripts/e2e/routine-alignment.test.ts— 1 pass.e2ejob is authoritative for it per AGENTS.md.Test plan
routine-alignment.test.tspasses locally against Postgres (see above)e2ejob (including the walkthrough) greenResolves CL-7366