You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while fixing #11529. Out of that card's scope (the text-mode warning printer), but it is what stopped the fix from pointing --json at one of the two advisory lists.
Measured
At origin/main commit 50fb191d, packages/cli/src/commands/compile.ts:
So a CI consumer reading warnings off os build --json sees a strictly smaller set than the same consumer reading it off os validate --json on the same tree — and the missing members are exactly the "your key was dropped" ones.
Why it matters
The --json payload's own comment at compile.ts:462 states the intent this violates:
The whole registry's advisory set, in the shape os validate --json reports.
It is not the whole set. This is the same class as #10953 and #11174 — both closed — where os validate --json was found to omit advisories its text face printed. Same defect, one command over.
It also has a concrete downstream cost: #11529 adds a truncation notice that points readers at --json for the complete list. That pointer is true for the authoring-rule advisories and would be false for the undeclared-key list, which is one reason #11529 left the second list alone rather than giving it a notice with a remedy that does not work.
Suggested shape
Carry the undeclared-key warnings in os build --json the way os validate --json does. Note the shape question the neighbouring comment at compile.ts:465 already flags: warnings is typed as authoring-rule records ({where,message,rule,path,hint}) and unknownKeyFindings is a different record shape, which is precisely why bodyExtractionWarnings was given its own key rather than folded in. Whether these become a sibling key or are adapted into the advisory shape is a contract decision, not a mechanical one — os validate --json already made a choice, so parity with that choice is the cheap answer if it holds up.
Found while fixing #11529. Out of that card's scope (the text-mode warning printer), but it is what stopped the fix from pointing
--jsonat one of the two advisory lists.Measured
At
origin/maincommit50fb191d,packages/cli/src/commands/compile.ts:unknownKeyFindings— the ADR-0087 / 排查「手抄 spec 清单 + "keep in sync" 注释」模式:一天内确认三例,全部曾静默漂移 #3786 keys thatObjectSchema/FieldSchemado not declare and that therefore drop silently on the way to storage;!flags.json, so in JSON mode they are computed and then discarded;warnings: ruleAdvisories— the authoring-rule advisories only.packages/cli/src/commands/validate.ts:259does carry them:So a CI consumer reading
warningsoffos build --jsonsees a strictly smaller set than the same consumer reading it offos validate --jsonon the same tree — and the missing members are exactly the "your key was dropped" ones.Why it matters
The
--jsonpayload's own comment atcompile.ts:462states the intent this violates:It is not the whole set. This is the same class as #10953 and #11174 — both closed — where
os validate --jsonwas found to omit advisories its text face printed. Same defect, one command over.It also has a concrete downstream cost: #11529 adds a truncation notice that points readers at
--jsonfor the complete list. That pointer is true for the authoring-rule advisories and would be false for the undeclared-key list, which is one reason #11529 left the second list alone rather than giving it a notice with a remedy that does not work.Suggested shape
Carry the undeclared-key warnings in
os build --jsonthe wayos validate --jsondoes. Note the shape question the neighbouring comment atcompile.ts:465already flags:warningsis typed as authoring-rule records ({where,message,rule,path,hint}) andunknownKeyFindingsis a different record shape, which is precisely whybodyExtractionWarningswas given its own key rather than folded in. Whether these become a sibling key or are adapted into the advisory shape is a contract decision, not a mechanical one —os validate --jsonalready made a choice, so parity with that choice is the cheap answer if it holds up.