Repository navigation
[Schema Consistency] Schema Consistency Check — 2026-04-29 #29043
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #29250. |
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
Critical Issues
These are potential bugs or schema/code divergences that could affect workflow behavior.
1.
botsimport merging silently droppedFile:
pkg/workflow/compiler_orchestrator_workflow.go:268The
botsfield extracted from imported shared workflows is never applied to the compiled output.MergedBotsis populated by the import extractor but never consumed by the compiler:Meanwhile
import_field_extractor.go:262extracts top-levelbotsfrom every imported file intoacc.bots→MergedBots. That data is collected but never read by the compiler.Impact: A shared workflow that defines
bots: [dependabot[bot]]at the top level will not have those bots merged when it is imported. The bots list in an importing workflow will be incomplete, which may cause bot-triggered workflows to be incorrectly rejected.Fix: Apply the same merge pattern used for
SkipBots:2.
botsfield location inconsistency between import extractor and runtime checkerFiles:
pkg/parser/import_field_extractor.go:262vspkg/workflow/role_checks.go:167botsfrom the top-level of each imported workflow:extractFieldJSONFromMap(fm, "bots", "[]")botsfromon.bots(nested under theonobject):onMap["bots"]botsas a top-level field (not inside theonobject schema)This means a top-level
bots:in an imported workflow is extracted by the import machinery but is also the wrong key for the runtime check. The documentation atdocs/src/content/docs/reference/frontmatter.md:295correctly tells users to migrate top-levelbots:toon.bots:, but the schema still defines it at the top level, and the import extractor reads the top-level form (noton.bots). All three are slightly out of sync.3.
sandbox— deprecatedsrt/sandbox-runtimevalues rejected by schema, accepted by codeFiles:
pkg/parser/schemas/main_workflow_schema.json(sandbox property),pkg/workflow/sandbox.go:114The schema defines the sandbox string enum as
["default", "awf"]. The schema description mentions: "Note: Legacy 'srt' and 'sandbox-runtime' values are automatically migrated to 'awf'" — but those values are not in the enum, so schema validation (IDEs, JSON schema validators) will report an error for any workflow usingsandbox: srt.Impact: Users with legacy
sandbox: srtconfigurations see IDE/editor schema validation errors, but the workflow still compiles successfully. This can be confusing. The schema should either include these deprecated values in the enum (with adeprecatedannotation) or document that the code silently migrates them.Documentation Gaps
These fields are defined in the schema and implemented in code but are not covered in the main reference (
docs/src/content/docs/reference/frontmatter.md).View Documentation Gaps (5 items)
4.
tracker-id— in schema and code, missing from frontmatter.mdThe
tracker-idfield has full validation logic inpkg/workflow/frontmatter_extraction_metadata.go:87:GH_AW_TRACKER_IDenv var in both activation and safe-outputs jobsIt appears in
frontmatter-full.md:50andfrontmatter-hash-specification.mdbut has no dedicated section infrontmatter.md.5.
run-install-scripts— in schema and code, missing from frontmatter.mdrun-install-scriptscontrols whether npm pre/post install scripts are allowed (supply chain risk feature). It emits a warning in non-strict mode and an error in strict mode.run-install-scripts: booleanpkg/workflow/run_install_scripts_validation.go,pkg/workflow/compiler_orchestrator_tools.go:162frontmatter.md6.
secret-masking— in schema and code, missing from frontmatter.mdThe
secret-maskingfield allows injecting custom secret redaction steps after the built-in masking steps.{ steps: [githubActionsStep] }pkg/workflow/compiler_orchestrator_tools.go:57frontmatter.md7.
observability.otlp.headers— string form deprecated in schema but not in docsThe schema marks the string form of
headersas deprecated:The frontmatter.md documentation at line 853 describes it as "map or string" with no deprecation note, and shows the string form in an example at line 876 without warning.
8.
infer(deprecated) anddisable-model-invocation— in schema, not in frontmatter.mdThese are custom-agent fields (Copilot custom agent format) present in the main schema:
infer: boolean— deprecated aliasdisable-model-invocation: boolean— current replacementThey appear in
frontmatter-full.mdbut are absent fromfrontmatter.md. If they are intentionally scoped to custom agent files only, a note should explain that in the schema description.Schema Improvements Needed
View Schema Improvement Suggestions
9. Top-level
botsfield should be marked deprecated in schemaThe schema defines
botsas a top-level field alongside theontrigger configuration, but the current implementation reads it fromon.bots. The documentation atfrontmatter.md:295prompts users to migrate withgh aw fix. The schema should mark top-levelbotsas deprecated and referenceon.bots(or remove it and only define it within theonobject schema).10.
engine.concurrencyfield has no worked examples in documentationThe
engine.concurrencyfield (schema:engine_config.concurrency, code:engine.go:210–235) supports both string and object forms for agent-level GitHub Actions concurrency control. Theconcurrency.mddoc mentions it at a high level (engine.concurrency) but does not show a worked example of the object form withgroup+cancel-in-progress.Recommendations
Fix
botsimport merging (Critical) — AddMergedBotsmerge incompiler_orchestrator_workflow.go:268, mirroring theSkipBotspattern. This is a behavioral bug where bots defined in imported shared workflows are silently ignored.Unify
botsfield location — Decide whetherbotslives at top-level or insideon, update schema accordingly (deprecate top-level or update import extractor to useon.bots), and ensure import extractor and role checker read from the same location.Fix sandbox schema to accept deprecated values for validation — Either add
srtandsandbox-runtimeto the enum with adeprecatedannotation, or add a custom validation keyword so IDE validators don't flag workflows using these legacy values that the runtime successfully migrates.Add missing frontmatter.md sections — Add documentation entries for
tracker-id,run-install-scripts,secret-masking, and clarifyobservability.otlp.headersstring deprecation.Clarify
infer/disable-model-invocationscope — Add a note to the schema and docs clarifying these are custom-agent-format-only fields, not general workflow frontmatter.Strategy Performance
/tmp/gh-aw/cache-memory/strategies.jsonNext Steps
MergedBotsnot applied incompiler_orchestrator_workflow.go:268srt/sandbox-runtimeas deprecated enum values in sandbox schematracker-id,run-install-scripts,secret-maskingsections tofrontmatter.mdobservability.otlp.headersdocs to note string form is deprecatedReferences:
§25091329709All reactions