fix: add NAM003 explain entry and guard catalog driftFix/nam003 explain coverage guard#42
Open
GodOnlyKn0w wants to merge 2 commits into
Open
Conversation
…shot Automated cross-reference check: every code in diag_code() must either have an explain_infos[] entry or be in the KNOWN_MISSING allowlist. Prevents future drift where zero check emits a code that zero explain does not recognize. The 52-code historical gap is captured in the KNOWN_MISSING set, which shrinks as entries are added to explain_infos[].
|
Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #40.
This PR includes the NAM003 explain catalog fix and adds a command-contract
guard to prevent the same class of drift from growing.
Why
zero checkcan emit diagnostic codes thatzero explain <code>does notrecognize. NAM003 was one example of that drift.
This PR fixes NAM003 directly and adds a coverage guard so future diagnostic
codes added to
diag_code()must either:explain_infos[]entry, orThe existing missing explain entries are allowlisted so this does not require
filling the entire historical catalog gap in one PR.
Changes
NAM003toexplain_infos[].NAM003to repair iddeclare-missing-symbolin explain JSON.explain --json NAM003command-contract assertions.diagnosticExplainCoverageto the command-contract summary.Validation
Focused local validation:
.zero/bin/zero.exe explain --json NAM003code: "NAM003"repair.id: "declare-missing-symbol".zero/bin/zero.exe check --json conformance/check/fail/unknown-name.0NAM003.zero/bin/zero.exe fix --plan --json conformance/check/fail/unknown-name.0declare-missing-symbolgit diff --check upstream/main..HEADpassedLocal caveat:
node scripts/snapshot-command-contracts.mjsis blocked in this Windowsenvironment because Node
execFileSync("bin/zero")cannot spawn the bashwrapper directly (
ENOENT). Upstream CI/Linux should be authoritative forthe full snapshot.