Skip to content

chore(v1.100.1b.C2): GOTH cross-cutting prune#502

Merged
itcmsgr merged 5 commits intomainfrom
chore/v1.100.1b.C2-cross-cutting-prune
Apr 26, 2026
Merged

chore(v1.100.1b.C2): GOTH cross-cutting prune#502
itcmsgr merged 5 commits intomainfrom
chore/v1.100.1b.C2-cross-cutting-prune

Conversation

@itcmsgr
Copy link
Copy Markdown
Owner

@itcmsgr itcmsgr commented Apr 26, 2026

Summary

C2 of the locked C1+C2 split. Cross-cutting cleanup of the remaining GOTH surface that survived 1.100.1b.B (source delete) and 1.100.1b.C1 (orphan-package delete).

Principle applied (locked 2026-04-26):

If a file exists solely for the retired GOTH/UI surface, carveout = delete.
If a file serves mixed responsibilities, carve out only the UI parts.

Commit sequence (4 + CHANGELOG)

Commit Subsystem Net
183c91e0 internal/nftbanconf/ -36 lines
55afaad4 internal/installer/ -52 lines
6d981adf CLI (dispatcher + 5 carveouts + 3 deletes) -1,773 lines
c4ea96b7 packaging/ (2 deletes + 2 PAM deps) -317 lines
465d79e0 CHANGELOG +42 lines

Operator-impacting changes

  • nftban gui subcommand: retired entirely (managed the deleted nftban-ui binary)
  • nftban health gui subcommand: retired entirely (validated the deleted ui-registry.json)
  • Web GUI line in nftban status overview: removed
  • nftban-ui.service references in nftban status SERVICES + JSON output: removed
  • nftban menu (curses TUI) is unaffected

Files deleted (existed solely for retired GOTH/UI)

  • cli/lib/nftban/cli/cmd_gui.sh
  • cli/lib/nftban/health/check_gui.sh
  • cli/cmd_ui.sh (dead since GOTH — never wired into dispatcher)
  • packaging/rpm/nftban-ui.spec
  • packaging/deb/rules

Files surgically carved (mixed responsibility)

  • internal/nftbanconf/{services,loader,commands}.go — UIService/UIAuthService/UIBin/AuthBin/UIAuth fields + accessors + defaults
  • internal/installer/services/daemon.go — nftban-ui-auth.socket enable+start block
  • internal/installer/fhs/paths.goRunUIDir const + FHSDirectory entry
  • internal/installer/payload/payload.go + payload_test.go — 2 UI staging entries + uiRemoveInV2 machinery
  • cli/sbin/nftban — gui completion + dispatcher status block
  • cli/lib/nftban/cli/cmd_{config,status,support,stats,health_core,health,health_analysis}.sh — UI service-name carveouts
  • install/verify_installation.sh — drop check_file for cmd_gui.sh
  • packaging/build_nftban.sh — drop RPM pam Require + DEB libpam0g Depend

Pre-push verification (lab2)

  • go build ./... clean
  • go test ./internal/installer/... ./internal/nftbanconf/... all pass
  • go mod tidy no-op (md5 match)
  • bash -n clean on all edited shell files

Out of scope (deferred to 1.100.1b.D)

  • Documentation narrative cleanup (CHANGELOG history, ARCHITECTURE.md, REPRODUCIBLE_BUILDS.md, docs/systemd/UNITS.md/TIMERS.md)
  • Workflow comment cleanup (.github/workflows/*.yml — comments only)
  • Broader cli/lib/ cleanup beyond locked cmd_*.sh + health-check scope

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

Test plan

  • CI Build & Test (Go) PASS
  • CI Build Docker Image PASS
  • CI Build RPM (el9 + el10) PASS
  • CI Build DEB (debian12/13 + ubuntu22/24) PASS
  • CI Test DEB install × 4 PASS
  • CI Test RPM install × 4 PASS
  • CI CLI Smoke Test PASS
  • CI Runtime Truth × 2 PASS
  • CodeQL, Semgrep, OSV, gosec, govulncheck, Trivy PASS
  • ShellCheck (×2) + Shell Quality PASS
  • Validate binary consistency (RPM vs DEB) PASS

🤖 Generated with Claude Code

itcmsgr and others added 5 commits April 27, 2026 00:28
Removes the now-orphan UI/auth surface from internal/nftbanconf/:

services.go:
  - ServiceNames: drop UIService, UIAuthService fields + defaults
  - AllNFTBanServices(): drop the 2 entries
  - SocketPaths: drop UIAuth (was /run/nftban-ui/auth.sock)
  - GetSockets(): drop the UIAuth literal
  - PIDFiles: drop UI, UIAuth fields
  - GetPIDFiles(): drop the 2 literals

loader.go:
  - Config: drop UIBin, AuthBin fields
  - loadFromFile: drop NFTBAN_UI_BIN, NFTBAN_AUTH_BIN switch cases
  - loadOverrides: drop the same 2 cases
  - defaultConfig: drop UIBin, AuthBin defaults

commands.go:
  - Drop UIBin(), AuthBin() accessor methods
  - DebugString: drop UIBin/AuthBin format placeholders + args

Verified: zero non-self importers of these fields/methods/functions;
go build ./... and go test ./internal/nftbanconf/... pass on lab2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Removes the now-orphan UI/auth surface from internal/installer/:

services/daemon.go:
  - Drop the nftban-ui-auth.socket enable+start block (G6 marker).
    Sockets stop being managed; transitional postinst/prerm in
    1.100.1b.A already cleans up orphaned units on existing systems.

fhs/paths.go:
  - Drop RunUIDir constant (was /run/nftban-ui)
  - Drop the matching FHSDirectory entry (mode 0750, nftban:nftban)

payload/payload.go:
  - Drop the 2 UI staging entries (nftban-ui binary +
    nftban-ui-auth libexec) marked uiRemoveInV2
  - Drop the uiRemoveInV2 struct field (now unreferenced)
  - Drop the uiRemoveInV2 log handler in StageAll
  - Update G-14-B scope comment to reflect non-UI binaries only
  - Drop the "UI staging: ... REMOVE-IN-V2.0.0" doc paragraph

payload/payload_test.go:
  - Drop TestBuildEntries_UIRemoveInV2MarkersPresent (asserted the
    2 deleted entries existed)

Verified: go build ./... and go test ./internal/installer/... pass
on lab2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Retires the 'gui' subcommand and the 'health gui' subcommand entirely
since they exclusively managed/validated the deleted nftban-ui surface.

Deletions (files exist solely for retired GOTH/UI):
  - cli/cmd_ui.sh — dead (never wired into dispatcher)
  - cli/lib/nftban/cli/cmd_gui.sh — managed nftban-ui (build/install/
    enable/disable/restart/status/port). With the binary gone, the
    command is meaningless.
  - cli/lib/nftban/health/check_gui.sh — validated GOTH ui-registry.json
    (deleted in 1.100.1b.B).

Dispatcher carveouts (cli/sbin/nftban):
  - Drop "gui" from completion command list
  - Drop the gui subcommand-completion case (enable/disable/status)
  - Drop "systemctl is-active nftban-ui" from status section
  - Drop the "Web GUI" status block + printf line

Surgical cmd_*.sh carveouts:
  - cmd_config.sh: drop "ui"->"nftban-ui" module map + nftban-ui from
    SIGHUP services list
  - cmd_status.sh: drop nftban-ui units from systemctl reset list,
    SERVICES check, and JSON service-info output
  - cmd_support.sh: drop nftban-ui + nftban-ui-auth from binary
    inventory (locations + version dump)
  - cmd_stats.sh: drop "nftban-ui API" wording from helper comments
    (function structure preserved as generic API short-circuit)
  - cmd_health_core.sh: drop the "gui-not-installed" warning detector
  - cmd_health.sh: drop the "gui|ui)" dispatch case + matching export
  - cmd_health_analysis.sh: drop nftban_health_cmd_gui() definition
    + matching export

Installer surface:
  - install/verify_installation.sh: drop check_file for cmd_gui.sh

No bash subcommand surface remains for "nftban gui" or "nftban health gui".
"nftban menu" (curses TUI) is unaffected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deletions (files exist solely for retired GOTH/UI):
  - packaging/rpm/nftban-ui.spec — entire RPM spec for the nftban-ui
    package (deleted binary)
  - packaging/deb/rules — the debhelper rules file built specifically
    the nftban-ui Debian package (templ generate + go build nftban-ui
    + nftban-ui-auth + install systemd units + PAM config). No
    consumer in the current CI build path (handled by
    packaging/build_nftban.sh + fpm).

Surgical packaging/build_nftban.sh carveouts:
  - RPM Requires: drop "pam" (only needed for nftban-ui-auth)
  - DEB Depends: drop "libpam0g" (same reason)

Build comments documenting v1.100.1b.A's nftban-ui removal are
intentionally preserved for the upgrade-cycle window; broader doc
narrative cleanup remains deferred to 1.100.1b.D.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 7a731be into main Apr 26, 2026
54 checks passed
@itcmsgr itcmsgr deleted the chore/v1.100.1b.C2-cross-cutting-prune branch April 26, 2026 21:36
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