Skip to content

release: v1.98.2 — runtime correctness patch (R-1 + R-2 + R-3 + G-CI-1)#472

Merged
itcmsgr merged 5 commits intomainfrom
fix/v1.98.2-health-trap
Apr 19, 2026
Merged

release: v1.98.2 — runtime correctness patch (R-1 + R-2 + R-3 + G-CI-1)#472
itcmsgr merged 5 commits intomainfrom
fix/v1.98.2-health-trap

Conversation

@itcmsgr
Copy link
Copy Markdown
Owner

@itcmsgr itcmsgr commented Apr 19, 2026

Summary

Narrow patch release closing the three correctness follow-ups surfaced by the v1.98.1 operational audit.

No new modules, no lifecycle or API surface changes. VERSION 1.98.1 → 1.98.2, FHS spec regenerated.

Closes #463, closes #469, closes #470.

Test plan

  • Unit tests: TestRunAssertions_PayloadInventoryMissing reproduces v1.98.1 P0 and catches it
  • Unit tests: existing TestRunAssertions_* still pass with seeded payload inventory
  • CI: G-CI-1 runs on this PR
  • CI: package-path non-regression (build-packages.yml) stays green
  • CI: all standard gates (Policy Gates, Go build, ShellCheck, etc.) green

🤖 Generated with Claude Code

Narrow patch release closing the three correctness follow-ups surfaced
by the v1.98.1 operational audit. No new modules, no lifecycle or
API surface changes.

R-1 (issue #469) — nftban validate exit code:
  Derive shell exit from max(error-count, validator rc, .status ∈
  {down,degraded}). Fixes "misleading success" where Status: ERROR
  coexisted with exit 0. Contract documented in --help.

R-2 (issue #470) — nftban health check bash trap:
  Wrap validator command substitution in an if/assignment; capture
  rc + stderr; render bounded DOWN diagnostic with non-zero exit.
  Replaces ERR-trap crash at cmd_health.sh:417.

R-3 (issue #463) — installer payload truth:
  Tag payload entries by category (binaries/shell/configs/systemd/
  polkit/logrotate/docs/version). Emit INFO-level per-category
  summary. Add payload.VerifyInventory() + payload_inventory_ok
  assertion in validate.RunAssertions. The assertion blocks
  COMMITTED when required canonical destinations are absent —
  this is the check that would have caught the missing VERSION
  file before v1.98.1 tag.

G-CI-1 — Runtime Truth Gate (ci-runtime-truth.yml):
  Matrix Ubuntu 24.04 + AlmaLinux 9. Seven sub-gates G1-G7
  covering the three Rs plus source-install parity, idempotency,
  and package non-regression. Blocking on merge.

VERSION 1.98.1 → 1.98.2; FHS spec regenerated.

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

github-actions Bot commented Apr 19, 2026

Dependency Review

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

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 34e114876b0b11c390a56381ad16ebd13914f8d5 🟢 5.7
Details
CheckScoreReason
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Code-Review🟢 10all changesets reviewed
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
SAST🟢 8SAST tool detected but not run on all commits
actions/actions/setup-go d35c59abb061a4a6fb18e82ac0862c26744d6ab5 🟢 5.7
Details
CheckScoreReason
Maintained🟢 67 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 6
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 10SAST tool is run on all commits

Scanned Files

  • .github/workflows/ci-runtime-truth.yml

…r deps

Three post-CI-review fixes for PR #472:

1. R-1/R-2 bash if/assignment rc bug (CRITICAL):
   `if ! var=$(cmd); then rc=$?; fi` captures $?=0 inside the then-block
   because the ASSIGNMENT's own exit code is 0 (assignment succeeded),
   not the command substitution's exit. This caused G2 to report "health
   returned 0 while validator was broken" even though the code intended
   to return 2. Correct idiom: `var=$(cmd) || rc=$?` which captures the
   actual command exit without triggering the ERR trap.

   Applied to both cmd_health.sh (R-2) and nftban_ip_and_stats.sh (R-1).

2. revalidate tests: healthyMock now seeds payload inventory:
   RunAssertions gained payload_inventory_ok in v1.98.2 R-3. The
   revalidate_test.go healthyMock doesn't seed inventory paths, so
   every post-R-3 test run fails on "15 missing" paths. Fix: call
   seedCompletePayloadInventory from healthyMock so happy-path stays
   happy. Failure-path tests still work because they only care about
   AllPassed being false, not which assertion failed.

3. CI workflow fixes for ci-runtime-truth.yml:
   - AlmaLinux 9 container: drop `coreutils` from dnf install (conflicts
     with preinstalled coreutils-single on minimal image).
   - G4: drop dry-run attempt (install.sh is a 13-line bootstrap with
     no --dry-run mode); use structural check against Go source only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread internal/installer/payload/payload.go Fixed
itcmsgr and others added 2 commits April 19, 2026 18:32
…gosec G304

Three follow-ups to get PR #472 CI fully green:

1. G5 gate — stage nftban-installer binary and provide /bin/true stubs
   for nftban-core + nftband. VerifyInventory requires all four binaries
   at /usr/lib/nftban/bin/; the workflow built nftban-installer but
   never copied it, and nftban-core/nftband aren't built in this job
   (they need templ and the full daemon build pipeline). Stubs satisfy
   the existence check without pulling in templ.

2. gosec G304 annotation on dirIsEmpty: os.Open(dir) flagged as
   "Potential file inclusion via variable." The caller VerifyInventory
   only ever passes canonical FHS paths from a hardcoded list — no
   user-controlled input, no traversal surface. Added #nosec G304.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Inline annotation form is what gosec recognizes in this repo's
configuration — the preceding-comment form didn't suppress the warning.
No behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread internal/installer/payload/payload.go Fixed
…ttern

The inline #nosec G304 alone did not satisfy the gosec check in CI.
Existing G304 suppressions in internal/botguard/* use the same idiom:
filepath.Clean(path) wrap + inline #nosec comment. Adopting it here.

Behaviour is unchanged — canonical FHS paths are already clean, Clean()
is a no-op for them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@itcmsgr itcmsgr merged commit 60383f0 into main Apr 19, 2026
51 checks passed
@itcmsgr itcmsgr deleted the fix/v1.98.2-health-trap branch April 19, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants