Round-trip test: workflow-source renderer against the real validatePush - #524
Merged
Merged
Conversation
…alidatePush renderWorkflowSourceTree and workflowKindHandler.validatePush are a parser/printer pair split across this repo and vendor/intx/hub-sessions, with no test checking they stay in sync -- drift would otherwise surface only as a push rejection in production. Exercise the rendered single-package tree (the only shape any authoring path emits) against the vendored validator directly, plus the adversarial shapes it rejects.
Note in the module header that validate-push.test.ts guards the renderer/validator pair against silent drift.
TheGreatAxios
force-pushed
the
cl-7272-workflow-source-roundtrip
branch
from
August 31, 2026 03:12
9416845 to
127c5d3
Compare
TheGreatAxios
marked this pull request as ready for review
August 31, 2026 03:12
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.
Summary
@corbits/workflow-source'srenderWorkflowSourceTreeis our hand-rolled writer for the one shapeworkflowKindHandler.validatePush(vendor/intx/hub-sessions/src/workflow-kind.ts) accepts for aworkflow-kind asset. Upstream publishes the validator half only; nothing checked the pair stayed in sync except a push at deploy time.This adds
packages/workflow-source/src/validate-push.test.ts, which renders a tree with our renderer and runs it through the realworkflowKindHandlerimported from@intx/hub-sessions, plus checks on the adversarial shapes the validator rejects (envelope-onlycapability-declarations.json, committednode_modules, an ambiguousworkflow.jsonbesidepackage.json, a missingpackage.json).No authoring path in this repo emits the
workspacesmonorepo shape today (every caller ofrenderWorkflowSourceTreepasses a singlepackageName), so the test covers the single-package shape only, matching what we actually produce.No writer or test helper for this tree exists anywhere in
vendor/today —workflowKindHandler.validatePushis the only related code upstream, and the closest thing to a fixture builder (workflow-deploy/src/testing/index.ts) synthesizes aWorkflowDefinition, not the codebase tree.Test plan
HUB_DATA_DIR=$(mktemp -d) bun test packages/workflow-source— 11 pass, 0 failbun run typecheck(workflow-source package) — clean