fix(propose): use the requested workflow schema - #1504
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe propose skill and command templates now select a workflow schema before creating a change. They preserve the configured default, pass explicit schema names to the CLI, and list schemas on request. Tests cover schema handling, root resolution, generated content, and updated hashes. ChangesPropose schema selection
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ProposeWorkflow
participant OpenSpecContext
participant OpenSpecSchemas
participant OpenSpecNewChange
User->>ProposeWorkflow: Request a propose workflow
ProposeWorkflow->>OpenSpecContext: Resolve project or store root
ProposeWorkflow->>OpenSpecSchemas: Discover schemas when requested
ProposeWorkflow->>OpenSpecNewChange: Create change with explicit schema
ProposeWorkflow->>OpenSpecNewChange: Create change with configured default
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
alfred-openspec
left a comment
There was a problem hiding this comment.
The explicit --schema path is good, but schema discovery still misses root selection through a config-only store: pointer or global defaultStore. In both cases openspec schemas --json from the caller showed only spec-driven, while openspec context --json resolved the store containing custom-flow and openspec new change ... --schema custom-flow succeeded; please resolve the authoritative root first (for example, context --json with explicit --store when applicable), run schemas from root.path, and cover these fallback paths.
|
@alfred-openspec Addressed your authoritative-root review in
I reproduced both reported cases end to end: caller discovery showed only Could you please re-review the current head? @coderabbitai review |
|
✅ Action performedReview finished.
|
Deploying openspec-docs with
|
| Latest commit: |
e55086c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c43c2f14.openspec-docs.pages.dev |
| Branch Preview URL: | https://codex-propose-schema-selecti.openspec-docs.pages.dev |
alfred-openspec
left a comment
There was a problem hiding this comment.
Exact head c98cb88 resolves the earlier root-selection blocker. Schema discovery now resolves context first, honors explicit stores plus local store pointers and global defaults, and only falls back on no_openspec_root; a fresh build and 41 focused context/propose/parity tests pass, with hosted CI green.
e55086c to
fe3bfc2
Compare
alfred-openspec
left a comment
There was a problem hiding this comment.
Re-reviewed the rebased head. Authoritative schema-root resolution still covers explicit stores, local store pointers, global defaults, and the rootless fallback; 49 focused context/propose/parity tests pass locally, and the full hosted matrix is green.
Status
LGTM. This is a surgical template fix with no CLI, schema, storage, or architecture changes.
What was wrong
The propose workflow always ran
openspec new change "<name>", even when the user explicitly requested a non-default workflow schema. The CLI already supports--schema, so the generated agent guidance was discarding a valid user choice and creating the change with the configured default.Schema discovery also needs to run from the selected OpenSpec root. Running
openspec schemas --jsonfrom a caller project while targeting a registered store can show the wrong project-local schemas.How it was fixed
openspec new change "<name>" --schema "<schema-name>".openspec context --json(or--store "<store-id>"for an explicit store), then runschemasfromroot.path.no_openspec_root; invalid or unavailable stores remain hard failures.--store "<store-id>"on change creation and later shown OpenSpec commands that support the flag.--schemawhen no explicit choice was made.Replication / proof
store:pointers and globaldefaultStoresessions return the selected store asroot.path.--schema custom-flowand confirmed.openspec.yamlrecordsschema: custom-flow.spec-driven;context --jsonresolved the store; discovery fromroot.pathshowedcustom-flow; andnew change --schema custom-flowsucceeded in that store.openspec context --json --store team-plans.contextreturnsno_openspec_root.--storeto unsupported or delegated commands.pnpm test: 119 files, 3,476 tests passed.pnpm run lint: passed.pnpm run build: passed.Notes / nits
newworkflow already supports explicit schema names; issue [Feature Request] Support schema selection in propose/new skills and commands #770 identifiesproposeas the missing implementation.Summary by CodeRabbit
New Features
Bug Fixes