Skip to content

chore(v1.100.3b): H-01/H-02/H-03 — strip dev-machine paths from 6 tracked files#506

Merged
itcmsgr merged 1 commit intomainfrom
chore/v1.100.3b-h01-h02-h03-dev-path-cleanup
Apr 27, 2026
Merged

chore(v1.100.3b): H-01/H-02/H-03 — strip dev-machine paths from 6 tracked files#506
itcmsgr merged 1 commit intomainfrom
chore/v1.100.3b-h01-h02-h03-dev-path-cleanup

Conversation

@itcmsgr
Copy link
Copy Markdown
Owner

@itcmsgr itcmsgr commented Apr 27, 2026

Summary

Repo hygiene Phase A — slice 1b. Mechanical dev-machine path cleanup across 6 files.

Closes audit findings H-01, H-02, H-03: hardcoded `/home/gituser/github/...nftban-v1.0-dev` and `/home/gituser/github/nftban-dev` defaults that leaked the maintainer's filesystem layout and broke non-author runs.

Files (locked scope — exactly 6)

File Finding Fix
`scripts/export_cli_inventory.sh` H-01 dev fallback resolved via `readlink -f "$0"`
`scripts/validate_cli_help.sh` H-01 same pattern
`cli/lib/nftban/tests/selftest.sh` H-01 same pattern using `BASH_SOURCE[0]`
`cli/lib/nftban/core/nftban_health_checks_config.sh` H-02 drop `/home/gituser/...nftban-dev` from auto-heal completion-source search; use `/usr/share/nftban/src` + `${NFTBAN_DEV_SRC_DIR:-}` opt-in
`cli/lib/nftban/core/nftban_health_checks_services.sh` H-02 same pattern for timer auto-install path
`tools/expand-config-schema.sh` H-03 `INPUT_SKELETON` required (`:?`); `OUTPUT_SCHEMA` repo-relative

7 files changed, 69 insertions(+), 13 deletions(-) — most of the diff is the CHANGELOG entry.

Locked verification gate

```bash
git grep -nE "/home/gituser|/home/commonfolder|nftban-v1.0-dev" -- ':(exclude).claude/*'
```

After this PR, the gate produces only intentionally-deferred hits:

  • 3 × H-04 sites (locked to slice 1c): `cli/lib/nftban/lib/nftban_distro_config.sh:296`, `packaging/polkit-1/rules.d/30-nftban-panel.rules:243`, `tests/review/05_feeds_test.sh:28`.
  • 1 × `scripts/test_server_cleanup.sh:121` (`/root/nftban-v1.0-dev` in a one-shot dev cleanup script — not in the audit's H-list, handled separately).

This matches the user's locked acceptance: "empty, or only hits that are intentionally deferred and explicitly excluded from this slice if any remain outside the targeted files."

Out of scope (deferred)

  • H-04 / H-05 / H-07 / H-08 / H-09 / H-16 / H-19 — separate Phase A slices.
  • Larger Phase A items (H-06 / H-11..H-19) — separate planning.

Lifecycle completion lane (PR-25..PR-30) remains explicitly OPEN.

Test plan

  • CI `Build & Test` PASS
  • CI `Build Docker Image` PASS
  • CI `Build RPM` × 2 PASS
  • CI `Build DEB` × 4 PASS
  • CI `Test DEB install` × 4 PASS
  • CI `Test RPM install` × 4 PASS
  • CI `CLI Smoke Test` PASS
  • CI `ShellCheck` (×2) + Shell Quality + Docs PASS
  • CI `Policy Gates` PASS
  • No regression in `scripts/export_cli_inventory.sh` / `validate_cli_help.sh` resolved paths

🤖 Generated with Claude Code

…cked files

Mechanical dev-machine path cleanup. Closes repo hygiene audit
findings H-01, H-02, and H-03: hardcoded /home/gituser/...
defaults that leaked the maintainer's filesystem layout and broke
non-author runs.

Changes:
- scripts/export_cli_inventory.sh (H-01): repo-relative dev fallback
  via readlink -f "$0" + ../cli/lib/nftban/cli
- scripts/validate_cli_help.sh (H-01): same pattern
- cli/lib/nftban/tests/selftest.sh (H-01): same pattern using
  BASH_SOURCE[0]
- cli/lib/nftban/core/nftban_health_checks_config.sh (H-02): drop
  /home/gituser/github/nftban-dev from auto-heal search list; use
  /usr/share/nftban/src (canonical install-time source) +
  ${NFTBAN_DEV_SRC_DIR:-} opt-in for maintainers
- cli/lib/nftban/core/nftban_health_checks_services.sh (H-02): same
  pattern for timer auto-install path
- tools/expand-config-schema.sh (H-03): INPUT_SKELETON required via
  :? (no public default for internal skeleton); OUTPUT_SCHEMA
  resolved repo-relative from the script's own location

Verification gate (locked):
  git grep -nE "/home/gituser|/home/commonfolder|nftban-v1.0-dev" \
    -- ":(exclude).claude/*"

Remaining 4 hits are intentionally deferred outside this slice:
  - 3 × H-04 sites (locked to slice 1c)
  - 1 × scripts/test_server_cleanup.sh:121 (one-shot dev cleanup
    script, not in audit H-list)

Out of scope (deferred): H-04 / H-05 / H-07 / H-08 / H-09 / H-16 /
H-19 — separate Phase A slices.

Lifecycle completion lane (PR-25..PR-30) remains explicitly OPEN.

Co-Authored-By: Claude Opus 4.7 (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

@itcmsgr itcmsgr merged commit c357384 into main Apr 27, 2026
49 checks passed
@itcmsgr itcmsgr deleted the chore/v1.100.3b-h01-h02-h03-dev-path-cleanup branch April 27, 2026 16:32
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.

1 participant