Skip to content

fix(output): conform feature-flags _meta to the published schema#1845

Merged
BartWaardenburg merged 1 commit into
mainfrom
fix/feature-flags-meta-telemetry
Jul 13, 2026
Merged

fix(output): conform feature-flags _meta to the published schema#1845
BartWaardenburg merged 1 commit into
mainfrom
fix/feature-flags-meta-telemetry

Conversation

@BartWaardenburg

Copy link
Copy Markdown
Collaborator

fallow flags --format json without --explain injects a _meta.telemetry block for run correlation, but the schema modeled FeatureFlagsMeta as requiring the explain-only feature_flags field and did not model telemetry. The default-path document therefore failed validation against docs/output-schema.json (_meta was neither null nor a valid FeatureFlagsMeta). The MCP feature_flags tool and Code Mode emit the same shape, so agents validating against the published schema saw invalid output.

FeatureFlagsMeta now models both fields as optional, mirroring the Meta and CombinedMeta envelopes whose telemetry is likewise an optional never-required property injected by the same post-pass. The wire bytes are unchanged (schema-correctness fix, no schema_version bump). Regenerated the schema + TS contracts; added a regression test.

Verified: schema drift gate green, contract drift check green, real fallow flags --format json documents (synthetic + preact benchmark, both with and without --explain) validate against the regenerated schema, fallow-api (211) and fallow-mcp (531) tests pass.

Found by the plan-028 agent-surface instance-validation probe (F5).

`fallow flags --format json` without `--explain` injects a `_meta.telemetry`
block for run correlation (via the post-serialization attach_telemetry_meta
pass), but the schema modeled `FeatureFlagsMeta` as requiring the explain-only
`feature_flags` field and did not model `telemetry`. The emitted default-path
document therefore failed validation against docs/output-schema.json: `_meta`
was neither null nor a valid FeatureFlagsMeta. The MCP `feature_flags` tool and
Code Mode emit the same shape, so agents validating against the published
schema saw invalid output.

FeatureFlagsMeta now models both `feature_flags` and `telemetry` as optional,
mirroring the `Meta` and `CombinedMeta` envelopes whose telemetry is likewise
an optional, never-required property injected by the same post-pass. The wire
bytes are unchanged (this is a schema-correctness fix, not a wire change), so
there is no schema_version bump. Regenerated docs/output-schema.json and the TS
contracts; added a regression test pinning the telemetry-only default-path
_meta shape.

Found by the plan-028 agent-surface instance-validation probe.
@BartWaardenburg BartWaardenburg merged commit 9156536 into main Jul 13, 2026
17 of 18 checks passed
@BartWaardenburg BartWaardenburg deleted the fix/feature-flags-meta-telemetry branch July 13, 2026 18:35
BartWaardenburg added a commit that referenced this pull request Jul 13, 2026
…ce parity)

Held item F5. Adds instance-level conformance (jsonschema dev-dep) validating real api-serializer and real-binary JSON output per-kind against docs/output-schema.json, and a CAPABILITY_PARITY table drift-tested from all three agent surfaces (31 MCP tools, 7 napi exports, 17 api runners) with required omission-intent notes. The Step 0 probe found the feature-flags _meta schema bug fixed in #1845. Recorded follow-ups: un-enveloped trace serializers, unmodeled error envelope, possibly-orphaned SymbolChainTrace `trace` kind.
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.

1 participant