[Schema Consistency] Schema Consistency Check - 2026-03-28 #23314
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #23416. |
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
main_workflow_schema.json(permissions object withadditionalProperties:false),pkg/workflow/permissions.go(convertStringToPermissionScope+GetAllGitHubAppOnlyScopes), anddocs/src/content/docs/reference/permissions.mdCritical Issues
🔴 [NEW] 29 GitHub App-Only Permission Scopes Block Schema Validation
Files:
pkg/parser/schemas/main_workflow_schema.json·pkg/workflow/permissions.go·docs/src/content/docs/reference/permissions.md·pkg/parser/schema_errors.go:217The schema's
permissionsobject usesadditionalProperties: falseand defines only 19 properties (16 standard GITHUB_TOKEN scopes +organization-projects,vulnerability-alerts,all). However,pkg/workflow/permissions.gohandles 29 additional GitHub App-only scopes that are also documented inpermissions.mdas fully supported.Consequence: Any workflow using these scopes fails JSON schema validation (via
validateWithSchemainpkg/parser/schema_compiler.go) before reaching the semanticvalidateGitHubAppOnlyPermissionscheck. The App-only permission validation logic is effectively unreachable for 29 of 31 declared App-only scopes in the full compilation pipeline.29 scopes in code + docs but missing from schema
Repository-level (9):
administration,environments,git-signing,workflows,repository-hooks,single-file,codespaces,repository-custom-properties, (plusvulnerability-alertswhich IS in schema)Organization-level (17):
members,organization-administration,team-discussions,organization-hooks,organization-members,organization-packages,organization-self-hosted-runners,organization-custom-org-roles,organization-custom-properties,organization-custom-repository-roles,organization-announcement-banners,organization-events,organization-plan,organization-user-blocking,organization-personal-access-token-requests,organization-personal-access-tokens,organization-copilot,organization-codespaces, (plusorganization-projectswhich IS in schema)User-level (3):
email-addresses,codespaces-lifecycle-admin,codespaces-metadataUser impact: A user who writes
permissions:\n administration: read(as documented in permissions.md) gets a confusing schema validation error listing only the 19 allowed GITHUB_TOKEN scopes. No guidance toward GitHub App-only scopes or the permissions.md docs page is provided.Evidence of test isolation gap:
pkg/workflow/github_app_permissions_validation_test.gotestsadministration: readby directly callingvalidateGitHubAppOnlyPermissions(workflowData)— bypassing schema validation entirely. The tests verify downstream behavior that is unreachable in practice for these 29 scopes.Suggested fix: Add all 29 scopes to
permissions.oneOf[1].propertiesin the schema (with appropriate descriptions indicating GitHub App requirement), or changeadditionalProperties: falsetoadditionalProperties: { type: "string", enum: ["read", "write", "none"] }with a schema comment explaining App-only scopes. Also updateknownFieldValidValuesandknownFieldScopesinschema_errors.go.Schema ↔ Documentation Mismatches
🟡
organization-projectsMissing "GitHub App-Only" Note in Schema DescriptionFile:
pkg/parser/schemas/main_workflow_schema.json(permissions.oneOf[1].properties.organization-projects)vulnerability-alertscorrectly reads: "GitHub App-only permission: required to access Dependabot alerts via the GitHub MCP server. The GITHUB_TOKEN does not have this permission — a GitHub App must be configured."organization-projectssimply reads: "Permission level for organization projects (read/write/none). Controls access to manage organization-level GitHub Projects boards." — no mention of GitHub App requirement.Both are in
GetAllGitHubAppOnlyScopes()and listed under "Organization-level" GitHub App-only permissions inpermissions.md. The schema description fororganization-projectsshould be updated to matchvulnerability-alerts's pattern.🟡 Schema Error Message Omits GitHub App Permission Guidance
File:
pkg/parser/schema_errors.go:217(knownFieldValidValues) and:226(knownFieldScopes) and:236(knownFieldDocs)When a user specifies an unknown permission scope (e.g.,
administration: read), the error hint says:The documentation URL links to GitHub's GITHUB_TOKEN reference, not to the repo's own
permissions.mdwhich lists all App-only scopes. Users hitting this error receive no guidance that GitHub App-only scopes exist or how to enable them.Persistent Issues (Unresolved from Prior Runs)
View persistent backlog
status-commentschema description says "Must be explicitly set to true" butcompiler_safe_outputs.go:192-195auto-enables forslash_command/label_commandtriggers. Two pending changesets (minor-decouple-status-comment,minor-enable-reaction-status-comment-by-default) will change this.update-discussionlabels is a DEAD FEATURE — schema + docs definelabels:/allowed-labels:fields butupdate_discussion.cjshas zero label handling code.mcp-gatewayfeature flag in constants.go / sandbox.md / schema description says "requires feature flag" but is never checked viaisFeatureEnabled()— gateway auto-enables viaHasMCPServers(). Schema has internal contradiction on this.proxy-argstop-level MCP server field handled in code (mcp_config_custom.go:661) but MISSING from$defs/stdio_mcp_tool.propertiesin schema (additionalProperties:false).runtimesConfigToMap()silently dropsdotnet,elixir,haskell,java,rubyruntimes whenRuntimesTypedis used. All five are in schema, struct, andruntime_definitions.go.set-issue-typeandmark-pull-request-as-ready-for-reviewsafe output types: fully implemented in schema + code but ABSENT fromsafe-outputs.md.observability.job-summaryfield: implemented in schema + code + tests but absent fromfrontmatter.mdandfrontmatter-full.md.importsobject form (withaw:andapm-packages:subfields): in schema + code butimports.mdonly documents array form.disable-xpia-promptfeature flag: actively used inunified_prompt_step.go:106but completely absent from all docs/schema.close-older-keyfield: implemented in schema + code + CJS runtime but absent from all docs.sandbox-agent-false-removallisted inmcp_tools_management.go:171andgh-aw-as-mcp-server.md:284but doesn't exist infix_codemods.go. Actual ID issandbox-false-to-agent-false.Recommendations
permissions.oneOf[1].propertieswith descriptions noting they require a GitHub App. UpdateknownFieldValidValues+knownFieldScopes+knownFieldDocsinschema_errors.goto reflect this.validateGitHubAppOnlyPermissionsin isolation) with an App-only scope likeadministration: readto catch future schema/code drift.organization-projectsschema description — Mirror the GitHub App-only language fromvulnerability-alerts.dotnet/elixir/haskell/java/rubyare silently dropped.Strategy Performance
switchstatement × docs comparisonReferences:
Beta Was this translation helpful? Give feedback.
All reactions