feat: known-failures (xfail) list for expected failures - #29
Merged
Conversation
Add known-failures.json (repo root) listing tests expected to fail while a fix is pending, each linked to its PR. Listed tests still run, but: - a failure is reported as KNOWN_FAIL and does not fail the run; - an unexpected pass is reported as UNEXPECTED_PASS (warn), or fails the run with --strict-known-failures to force cleanup. Keeps the job green while upstream/NM fixes are in flight, preserves coverage, and flags the moment a fix lands. Exit code stays keyed on real (non-known) failures. Seeded with the 6 currently-pending diffs (NM #12003; geth #35271/#35129/#35228). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Why
Several rpc-int diffs are "correct behavior pending someone else's merge/release" — Nethermind is right, and the fix is an open NM or geth PR. We don't want the job red while waiting, but we also don't want to lose coverage or forget to clean up once the fix lands.
What
Adds an expected-failures (xfail) list —
known-failures.jsonat the repo root — keyed by"<api>/<test>"(extension-insensitive), each linked to its tracking PR:{ "eth_getBalance/test_40": { "pr": "ethereum/go-ethereum#35271", "note": "geth -32000 vs NM -32602 for empty {} block param; geth-side fix" } }Listed tests still run, but:
KNOWN_FAIL (<pr>), does not fail the run;UNEXPECTED_PASSwarning (the fix likely landed — remove the entry); with--strict-known-failuresthis fails the run to force cleanup.The exit code stays keyed on real (non-known) failures, so a genuine new regression still turns the job red. This is strictly better than excluding/skipping: coverage is preserved and you're told the moment a fix lands.
New flags:
--known-failures <path>(defaultknown-failures.json),--strict-known-failures.Seed entries (6, all with fixes in flight)
eth_sendRawTransaction05/06/21 → fix(eth_sendRawTransaction): return InvalidParams for malformed RLP nethermind#12003 (NM side)eth_getBalance40 → rpc: reject block parameter with neither number nor hash ethereum/go-ethereum#35271eth_sendRawTransaction23 → internal/ethapi: return InvalidParams for malformed sendRawTransaction RLP ethereum/go-ethereum#35129eth_estimateGas28 → eth/gasestimator,internal/ethapi: apply precompile overrides in eth_estimateGas ethereum/go-ethereum#35228Tests
LoadKnownFailures(missing file → empty, parse + key normalization, invalid JSON errors) andNormalizeTestKey.go build ./...+ fullgo test ./...pass.🤖 Generated with Claude Code