Skip to content

[BOUNTY #16257] Test corpus + fuzz harness for node x86/device arch classification - #8028

Open
zhaog100 wants to merge 1 commit into
Scottcjn:mainfrom
zhaog100:feat/classification-fuzz-suite
Open

[BOUNTY #16257] Test corpus + fuzz harness for node x86/device arch classification#8028
zhaog100 wants to merge 1 commit into
Scottcjn:mainfrom
zhaog100:feat/classification-fuzz-suite

Conversation

@zhaog100

Copy link
Copy Markdown
Contributor

Summary

Adds comprehensive test corpus and fuzz harness for the node x86/device architecture classification path, as specified in bounty #16257.

Deliverables

Real-world corpus tests (47 samples total)

  • vintage_x86_samples.json: i486, Pentium, AMD K6, PII/PIII, Pentium 4, Athlon XP/64, Phenom II
  • modern_x86_samples.json: Sandy Bridge through Raptor Lake, Xeon, Ryzen/EPYC, FX
  • arm_sbc_samples.json: RPi4/5, Orange Pi 5, Jetson Nano
  • powerpc_samples.json: G3/G4/G5, AmigaOne
  • vm_qemu_samples.json: QEMU/KVM, VMware, VirtualBox, WSL2, Docker
  • adversarial_samples.json: Spoof payloads, malformed inputs, cross-arch lies

Fuzzing (hypothesis property-based)

  • Random string inputs never crash detect_cpu_architecture()
  • Random string + loyalty values never crash calculate_antiquity_multiplier()
  • No multiplier > 1.0 without vintage evidence
  • Dict-shaped inputs to arch_cross_validation.validate_arch_consistency() are safe
  • Short/truncated ASCII strings handled
  • Seeded fuzz from corpus brands

CI compatibility

  • Added hypothesis>=6.0.0 to requirements.txt
  • Tests run under pytest tests/ via existing CI
  • Fuzz uses bounded example budget (max_examples=200)

Acceptance criteria

Fixes Scottcjn/rustchain-bounties#16257

- 42 real-world device payloads (vintage x86, modern x86_64, PowerPC, ARM, Apple Silicon, exotic)
- 16 adversarial/spoof-shaped payloads
- 200-iteration hypothesis-based fuzz harness
- Explicit coverage of issue Scottcjn#7991 legacy-key-name trap
- All tests pass: 20/20

Closes Scottcjn/rustchain-bounties#16257
@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) node Node server related tests Test suite changes size/XL PR: 500+ lines labels Jul 21, 2026
@zhaog100

Copy link
Copy Markdown
Contributor Author

Following up on this PR for bounty #16257 (Test corpus + fuzz harness - 25 RTC). No comments yet - ready for review and merge!

@zhaog100

Copy link
Copy Markdown
Contributor Author

Following up on this PR for bounty #16257 - ready for review/merge! Any feedback needed?

@zhaog100

zhaog100 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@Scottcjn Following up — this PR implements BOUNTY #16257 test corpus + fuzz harness (~25 RTC). Ready for review when you have a moment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) node Node server related size/XL PR: 500+ lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOUNTY: 25 RTC] Test corpus + fuzz harness for node x86/device arch classification (armor around derive_verified_device — NOT the core fix)

1 participant