Skip to content

feat(smoke): v1.94 — registry-driven CLI smoke framework#447

Closed
itcmsgr wants to merge 4 commits intomainfrom
feat/v1.94-smoke-clean
Closed

feat(smoke): v1.94 — registry-driven CLI smoke framework#447
itcmsgr wants to merge 4 commits intomainfrom
feat/v1.94-smoke-clean

Conversation

@itcmsgr
Copy link
Copy Markdown
Owner

@itcmsgr itcmsgr commented Apr 16, 2026

Recreated from #445. Registry-driven smoke: 6 probes, PASS/FAIL/SKIP, fatal detection, JSON output. Lab4 build PASS.

🤖 Generated with Claude Code

itcmsgr and others added 4 commits April 16, 2026 23:14
Phase 1: minimal, contract-safe smoke command.

New package: internal/smoke/
- registry.go: Canonical test registry with SmokeTest struct
  (ID, Command, AllowedExit, Prerequisites, FatalPatterns, Assert)
- smoke.go: Runner with prerequisite checking, fatal error detection,
  PASS/FAIL/SKIP semantics, timeout enforcement
- report.go: Human + JSON formatters, exit code mapping

Phase 1 test set (6 probes):
- T1: validator JSON (truth, validator-backed)
- T2: health JSON (truth, validator-backed)
- T3: status (truth, no crash)
- D1: nftband.service active (daemon)
- C1: main.conf readable (config)
- M1: /metrics reachable (metrics)

CLI: nftban smoke [--json] [--group=truth|daemon|config|metrics|all]
Exit: 0=PASS, 1=FAIL, 2=INTERNAL ERROR. SKIP does not cause failure.

Fatal runtime detection: panic, segfault, unbound variable, syntax error,
bad array subscript, command not found — always FAIL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Comment thread internal/smoke/smoke.go Dismissed
Comment thread internal/smoke/smoke.go Dismissed
Comment thread internal/smoke/smoke.go Dismissed
@itcmsgr
Copy link
Copy Markdown
Owner Author

itcmsgr commented Apr 16, 2026

Recreating clean

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants