[Schema Consistency] Schema Consistency Check — 2026-06-12 #38798
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #39029. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This run confirmed that the prior standing items (deprecation flags,
IgnoredFrontmatterFields, role-matching semantics, enum/doc drift) all remain resolved. A fresh angle — enumerating every spelling the parser accepts and checking it against the schema's declared properties underadditionalProperties: false— surfaced one real inconsistency.Critical Issues
🔴
dispatch-repository(dash) alias is accepted by the parser & docs but rejected by the schemaThe
dispatch_repositorysafe-output parser intentionally accepts two spellings of the key:pkg/workflow/dispatch_repository.go:30— comment: "Accepts bothdispatch_repository(underscore, preferred) anddispatch-repository(dash, alias)."pkg/workflow/dispatch_repository.go:38-39— falls back tooutputMap["dispatch-repository"]when the underscore form is absent.pkg/workflow/dispatch_repository_test.go:93—TestParseDispatchRepositoryConfig_DashAliasexplicitly verifies the dash form works..github/aw/safe-outputs-automation.md:97— documents that both forms are accepted.However, the JSON schema only declares the underscore property:
pkg/parser/schemas/main_workflow_schema.json:9095—"dispatch_repository"is the only key defined.safe-outputs.additionalPropertiesisfalse(verified viajq).Impact: A user who follows the documented/tested dash alias (
dispatch-repository:) gets a workflow that compiles fine but fails JSON-schema validation and receives no editor autocomplete / red squiggles under the dash form. The contract is internally inconsistent across the three sources of truth: parser says "valid", docs say "valid", schema says "invalid".Verification evidence
Schema Improvements Needed
Pick one of two directions to restore consistency (recommend the first — it keeps the existing parser/test/doc contract intact):
"dispatch-repository"property tosafe-outputs.propertiesthat mirrors ($refor duplicates) thedispatch_repositorysub-schema. This makes the documented dash form schema-valid and editor-friendly.outputMap["dispatch-repository"]fallback (dispatch_repository.go:38-39), deleteTestParseDispatchRepositoryConfig_DashAlias, and remove the "accepts both" sentence from.github/aw/safe-outputs-automation.md:97. Then onlydispatch_repositoryis accepted everywhere.Documentation Gaps
None new.
dispatch_repositoryis well documented (reference/safe-outputs.md:1331-1338, including the experimental-warning note). The only doc/parser/schema mismatch is the dash-alias issue above — whichever fix is chosen,safe-outputs-automation.md:97should end up agreeing with the schema.Standing Finding (low priority, re-confirmed)
⚪
dispatch_repositoryis the only snake_case key among ~75 safe-output keysdispatch_repository(schema:9095) usessnake_case, while every sibling safe-output (e.g.dispatch-workflowatschema:9013,create-pull-request,add-comment, ...) useskebab-case. Its child props (event_type,target_repo,allowed_repositories) are also snake_case. This is internally consistent (handler yaml tags + docs all use snake) and confirmed distinct fromdispatch-workflow(two genuinely different features:repository_dispatchvsworkflow_dispatch), so it's intentional but cosmetically off-convention. Resolving Schema-Improvement option 1 above would conveniently provide a convention-conformingdispatch-repositoryspelling as well.Recommendations
dispatch-repository(kebab) as a schema property aliasingdispatch_repository— fixes the validation gap and offers a convention-conforming spelling in one change.additionalProperties: false).pkg/workflow/*.gofor dualoutputMap[...]lookups and "Accepts both"/"alias" comments.Strategy Performance
Next Steps
dispatch-repositoryalias property tomain_workflow_schema.json(or remove the dash alias from parser/tests/docs)References: §27399868814
Beta Was this translation helpful? Give feedback.
All reactions