Skip to content

fix(workflows): stop reading schema from list output - #1731

Open
runsonmypc wants to merge 3 commits into
Fission-AI:mainfrom
runsonmypc:fix/schema-label-from-status
Open

fix(workflows): stop reading schema from list output#1731
runsonmypc wants to merge 3 commits into
Fission-AI:mainfrom
runsonmypc:fix/schema-label-from-status

Conversation

@runsonmypc

@runsonmypc runsonmypc commented Aug 28, 2026

Copy link
Copy Markdown

Status

LGTM. Ready for final review; not merged.

What was wrong

Change pickers asked agents to display schema names from openspec list --json, which returns names, task counts, modification times, and task status, but no schema. Update and continue consequently mislabeled custom-schema changes as spec-driven. Bulk archive and explore also claimed schemas were available from this output.

How it was fixed

  • Update and continue display change name, task status, and modification time.
  • Bulk archive displays change name and task status; explore describes those same available fields.
  • Schema handling still uses schemaName from openspec status --change "<name>" --json after selection. No extra status calls decorate the picker.
  • Both skill and command variants are covered; generated skills, parity hashes, and the patch changeset are included.

Replication / proof

  • All 3 template regressions fail against the original main templates and pass with this fix.
  • CLI tests use a custom schema with work.md tracking and check empty, partial, and completed task states. List output has the expected task data and no invented schema field; status returns the actual custom schema name.
  • Final focused local run: 59 tests passed across CLI basics, workflow contracts, and template parity.
  • Build, lint, type checking, release tracking, and generated-artifact regeneration checks pass. Regeneration leaves the working tree unchanged.
  • Full Linux, macOS, and Windows suites, required CI checks, and security checks pass on hardening commit e552aea80: CI run.
  • Linux/macOS: 4,235 tests passed each. Windows: 4,168 passed, 67 skipped.

Notes / nits

Guidance and regression coverage only; no CLI behavior or dependency changes. Independent reviews found no blockers.

The local full-suite run ended with exit code 137 before completion. Before that, two existing tests failed because they detect globally installed MiniMax skills: Cursor command generation and profile update. Both failures were reproduced on unchanged main (a0ddb60d0) in a separate baseline worktree. They are not changed here; the clean hosted matrix is the full-suite verification.

Summary by CodeRabbit

  • Bug Fixes

    • Change-selection prompts no longer show inaccurate or fabricated schema labels.
    • Update and continue workflows now display only available change details: name, status, and modification time.
    • Bulk archive and explore workflows accurately reflect information provided by change listings.
    • Custom-schema task statuses and completion states are now reported correctly.
  • Documentation

    • Updated workflow guidance to match the corrected change-listing details.

The update and continue templates tell the agent to read a `schema` field
from `openspec list --json` and fall back to "spec-driven" when it is
absent. `list --json` returns only `name`, `completedTasks`,
`totalTasks`, `lastModified`, and `status` (docs/agent-contract.md 4.1),
so the field is never present and the fallback fires every time: a change on
a custom schema is shown to the user as `spec-driven`.

Make the schema line optional and, when shown, resolve it from
`openspec status --change "<name>" --json` (`schemaName`).
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 820b1122-7964-433d-bd0b-bdf416dfd8c6

📥 Commits

Reviewing files that changed from the base of the PR and between fc06240 and e552aea.

📒 Files selected for processing (2)
  • test/cli-e2e/basic.test.ts
  • test/core/templates/list-json-contract.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Workflow prompts and exploration instructions no longer display unsupported schema labels from openspec list --json. They now use change names and task status. Tests cover template wording, generated skill parity, and JSON field behavior.

Changes

Workflow list contract

Layer / File(s) Summary
Update workflow template instructions
src/core/templates/workflows/bulk-archive-change.ts, src/core/templates/workflows/explore.ts
Bulk archive and explore instructions now describe task status from openspec list --json instead of schema fields.
Generated workflow and contract validation
skills/openspec-bulk-archive-change/SKILL.md, skills/openspec-explore/SKILL.md, test/core/templates/list-json-contract.test.ts, test/core/templates/skill-templates-parity.test.ts, .changeset/schema-label-from-status.md
Generated skills and template tests enforce the supported list fields. Parity hashes and the patch changeset reflect the updated workflow content.
CLI JSON field validation
test/cli-e2e/basic.test.ts
Parameterized tests verify task counts and status for custom schemas, reject invented schema fields in list entries, and confirm status --json reports the configured schema name.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to e552a

This change corrects workflow labels to use fields actually returned by the list command and adds focused regression coverage. No actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: tabishb

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: workflow templates no longer read a schema field from openspec list --json output.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@runsonmypc runsonmypc changed the title fix(workflows): resolve the change picker's schema label from status fix(workflows): stop reading schema from list output Aug 28, 2026
@runsonmypc
runsonmypc marked this pull request as ready for review August 28, 2026 02:53
@runsonmypc
runsonmypc requested a review from a team as a code owner August 28, 2026 02:53
@runsonmypc
runsonmypc requested review from TabishB and removed request for a team August 28, 2026 02:53
@openspec-cloud

Copy link
Copy Markdown

Fork pull request not scanned

Fork pull requests are not scanned. Open the branch in this repository, then create a new pull request.
View the OpenSpec Cloud check · A same-repository pull request is required.

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.

2 participants