Repository navigation
fix: enforce consolestderr on wasm and guard native/wasm CI parity - #67634
Conversation
Mirror the dedicated consolestderr check for WebAssembly and compare native and wasm analyzer sets independently of registry membership. Track the existing contextcancelnotdeferred exception and cover target drift regressions. Fixes #67609 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
There was a problem hiding this comment.
One opportunity to make this smaller.
net: -95 lines possible.
Generated by ✂️ Ponytail Reviewer for #67634 · codex · gpt56 · 6.71 AIC · ⌖ 5.22 AIC · ⊞ 13.5K
Comment /ponytail to run again
There was a problem hiding this comment.
🟡 Changes recommended
Block-scalar shell comments can still be misclassified as active linter enforcement.
1 open finding
What changed in this PR
Adds WebAssembly enforcement for consolestderr and guards native/WASM linter parity.
Changes:
- Adds the dedicated WASM lint step.
- Parses CI YAML to compare analyzer sets.
- Adds parity regression tests and documentation.
| File | Description |
|---|---|
.github/workflows/cgo.yml |
Adds WASM consolestderr enforcement. |
pkg/linters/doc_sync_test.go |
Implements target-parity validation. |
pkg/linters/ci_sync_test.go |
Adds regression scenarios. |
pkg/linters/README.md |
Documents parity policy and exception. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (>100 new lines in 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. 🔍 Decision inferred from the diff
📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
There was a problem hiding this comment.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 36.2 AIC · ⌖ 5.57 AIC · ⊞ 21.2K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd to this CI-parity fix. The change is well-scoped and well-tested — no actionable issues found.
📋 Verification performed
- Ran
go test ./pkg/linters -run 'TestCIEnforcedLinter' -v -count=1: all three tests pass (TestCIEnforcedLinterTargetDrift,TestCIEnforcedLintersMatchTargets,TestCIEnforcedLintersMatchRegistry). - Ran
go test ./pkg/linters -count=1: full package passes. gofmt -landgo vet ./pkg/linters/...are clean on the new/modified test files.actionlinton.github/workflows/cgo.ymlreports no errors.- Verified the new
consolestderr (wasm)step uses the sameLINTER_PACKAGESscope as the existing wasm bulk step, so parity is scoped correctly.
Why this is a solid fix (per /diagnosing-bugs)
- Root cause addressed, not just symptom: rather than only adding the missing wasm step (the proximate bug from #67609), the PR adds a generic
TestCIEnforcedLintersMatchTargetsregression test that structurally parsescgo.yml'slint-go-customjob and diffs native vs. wasm analyzer sets — this prevents the class of bug (native/wasm drift), not just this one instance. - The
notYetEnforced/nativeOnlyexception maps require non-empty reasons and are asserted to go stale once parity is restored ("restored parity makes native exception stale"test case), which avoids exceptions silently living forever.
Strong test coverage (per /tdd)
ci_sync_test.go's table-drivenTestCIEnforcedLinterTargetDriftcovers meaningful edge cases: missing dedicated step on each target, bulk-flag drift on each target, restored parity, GOOS/GOARCH expressed via stepenv:instead of inline, single- vs double-quotedLINTER_FLAGS, and commented-out steps not counting as enforcement. These are exactly the cases that would have silently reintroduced the original drift.- The regex widening (
LINTER_FLAGS=["']([^"']+)["']) and the YAML-based step/env parser inparseCIEnforcedLinterSetsare more robust than the previous brittle string-count assertion it replaces.
No blocking concerns. Nit (non-blocking): ci_sync_test.go and doc_sync_test.go both locally reimplement similar YAML-based CI workflow parsing — if more CI-sync tests are added later, consider consolidating parseCIEnforcedLinterSets and its workflow struct into a small shared test helper file to keep the two files from drifting apart in how they interpret cgo.yml.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 69.6 AIC · ⌖ 14.5 AIC · ⊞ 10.3K
Comment /matt to run again
Filter full-line shell comments before both target and analyzer scans. Replace workflow-format-dependent mutation tests with a focused standalone block-scalar regression while retaining the production parity guard. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Summary
Fixes #67609.
consolestderr -test=falseCI step on WebAssembly, using the existing wasm package scope.contextcancelnotdeferredexception from contextcancelnotdeferred still enforced on native CI only - wasm LINTER_FLAGS omission unfixed (issue 55932 auto-expired, 2nd oc #65753, rejecting stale exceptions once parity is restored.Validation
go test ./pkg/linters -count=1consolestderr -test=falseagainst the native production package set and the existing wasm package setgo run github.com/rhysd/actionlint/cmd/actionlint -shellcheck= -pyflakes= .github/workflows/cgo.ymlPATH="/opt/homebrew/bin:$PATH" make agent-report-progress(initial publication: build, changed-package lint, impacted tests, and workflow drift guard all passed; 337 workflows compiled successfully)Full
make fmtcompleted Go formatting but encountered an unrelated existing JavaScript formatter error intestdata/copilot_sdk_web_fetch_contract.json(convertToJson is not defined). Incidental formatting changes outside this issue were removed.