Title: bug: verify.schema-drift parses files_modified as an inline array only — block-sequence plans give it an empty file set · Issue #4562 · open-gsd/gsd-core · GitHub
Open Graph Title: bug: verify.schema-drift parses files_modified as an inline array only — block-sequence plans give it an empty file set · Issue #4562 · open-gsd/gsd-core
X Title: bug: verify.schema-drift parses files_modified as an inline array only — block-sequence plans give it an empty file set · Issue #4562 · open-gsd/gsd-core
Description: Summary verify.schema-drift extracts its file list from plan frontmatter with a regex that only matches an inline array. Plans written with a YAML block sequence — which is what gsd-planner itself emits — never match, so the gate inspect...
Open Graph Description: Summary verify.schema-drift extracts its file list from plan frontmatter with a regex that only matches an inline array. Plans written with a YAML block sequence — which is what gsd-planner itself ...
X Description: Summary verify.schema-drift extracts its file list from plan frontmatter with a regex that only matches an inline array. Plans written with a YAML block sequence — which is what gsd-planner itself ...
Opengraph URL: https://github.com/open-gsd/gsd-core/issues/4562
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: verify.schema-drift parses files_modified as an inline array only — block-sequence plans give it an empty file set","articleBody":"## Summary\n\n`verify.schema-drift` extracts its file list from plan frontmatter with a regex that only matches an **inline** array. Plans written with a YAML **block sequence** — which is what `gsd-planner` itself emits — never match, so the gate inspects zero files and returns `block: false` without checking anything.\n\nThe gate is declared `blocking: true` at `execute:wave:post`, so this is a silent pass on a gate that is meant to stop a wave.\n\n## The code\n\n`bin/lib/verify.cjs`, in `cmdVerifySchemaDrift` (~line 1959):\n\n```js\nconst fmMatch = content.match(/files_modified:\\s*\\[([^\\]]{0,8000})\\]/);\n```\n\nThe `\\[` requires an inline array:\n\n```yaml\nfiles_modified: [a.py, b.py] # matches\n```\n\nBut a block sequence has no `[`:\n\n```yaml\nfiles_modified: # does NOT match\n - backend/app/models/job.py\n - backend/app/services/queue.py\n```\n\n`fmMatch` is `null`, nothing is pushed to `allFiles`, and `checkSchemaDrift([], executionLog)` early-returns at `schema-detect.cjs:86` on `detectSchemaFiles([]).detected === false` — **before** the loop that reads `executionLog`. So neither of the function's two inputs is consulted.\n\n## Reproduction\n\nOn a phase whose plans use block-sequence `files_modified`:\n\n```\n$ gsd-tools query check verify.schema-drift 01 --raw\n{\n \"block\": false,\n \"drift_detected\": false,\n \"blocking\": false,\n \"schema_files\": [],\n \"orms\": [],\n \"unpushed_orms\": [],\n \"message\": \"\",\n \"skipped\": false\n}\n```\n\nMatching the regex against every plan in the phase directly:\n\n```\nplans whose files_modified the regex MATCHED: 0\nplans whose files_modified it MISSED: 12\n```\n\nThe empty `schema_files` / `orms` are the only tell that the gate did no work — the verdict alone is indistinguishable from a real pass.\n\n## Why this is likely to be widespread\n\n`gsd-planner` emits block-sequence `files_modified`. Every plan in the affected project was produced by GSD's own planner, so any project on that default format has a permanently green blocking gate. `phase-plan-index` parses the same field correctly, so the two disagree about what a plan declares.\n\n## Suggested fix\n\nAccept both forms where `files_modified` is read, ideally via one shared parser rather than a second regex. A block-sequence branch:\n\n```js\nconst block = content.match(/^files_modified:[ \\t]*\\n((?:[ \\t]+-[ \\t]*.+\\n)+)/m);\n```\n\n## Separate note — not part of this bug\n\nAfter fixing the parse locally and feeding the gate 135 correctly-parsed entries, it still returns `schemaFiles: []`. `SCHEMA_PATTERNS` (`schema-detect.cjs:17-28`) covers five JS/TS ORMs — payload, prisma, drizzle, supabase, typeorm — and no Python ORM at all, so SQLAlchemy/Alembic projects get no coverage either way. That is a feature gap rather than a defect and is not what this issue asks you to fix; flagging it only so the parse fix is not mistaken for full coverage on a Python backend.\n\nFound on `@opengsd/gsd-core` 1.13.0.","author":{"url":"https://github.com/Vince-Cercury","@type":"Person","name":"Vince-Cercury"},"datePublished":"2026-09-09T07:14:45Z","url":"https://github.com/open-gsd/gsd-core/issues/4562"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f42070ba-4920-d99d-afa9-e6aa6c38c28f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F72:2973C7:1E422B4:27E41F7:6AEDA2AC |
| html-safe-nonce | e02eec00999ace6675cc5e49f8551b7bd529eb36dc5fd8136761e40aa0961c95 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjcyOjI5NzNDNzoxRTQyMkI0OjI3RTQxRjc6NkFFREEyQUMiLCJ2aXNpdG9yX2lkIjoiMjAzNDM5OTU1MzE4NzA2MjQ0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 804b509240e6fd852cd2925b15e0eaa9d22ec587a865003167e5e14f82e0f18f |
| hovercard-subject-tag | issue:5396274814 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/open-gsd/gsd-core/4562/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4f6028a6e3b2ba9d63669eef41297b363024f08eece7abf58ad492151b5ab54e/open-gsd/gsd-core/issues/4562 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4f6028a6e3b2ba9d63669eef41297b363024f08eece7abf58ad492151b5ab54e/open-gsd/gsd-core/issues/4562 |
| og:image:alt | Summary verify.schema-drift extracts its file list from plan frontmatter with a regex that only matches an inline array. Plans written with a YAML block sequence — which is what gsd-planner itself ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Vince-Cercury |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9f51e3b6c7a190e426e641ae15acbc58dd1ac2003e96b58879bbc298e213dbf3 |
| turbo-cache-control | no-preview |
| go-import | github.com/open-gsd/gsd-core git https://github.com/open-gsd/gsd-core.git |
| octolytics-dimension-user_id | 286935422 |
| octolytics-dimension-user_login | open-gsd |
| octolytics-dimension-repository_id | 1246625636 |
| octolytics-dimension-repository_nwo | open-gsd/gsd-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1246625636 |
| octolytics-dimension-repository_network_root_nwo | open-gsd/gsd-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7060660810b587033ea861b8aa67beb72c8e6542 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width