nas-burnin/app
Brandon Walter eb2a964171
Some checks are pending
Security scan / pip-audit (push) Waiting to run
Security scan / bandit (push) Waiting to run
Security scan / gitleaks (push) Waiting to run
fix: address Codex review of burnin package split (1.0.0-32)
Three LOW-severity findings from Codex's audit of the post-split
package, all small mechanical cleanups:

#1 routes.py:848 read burnin.UNLOCK_TTL_SECONDS — a snapshot alias
   bound at import time. After a test (or runtime) monkey-patches
   app.burnin.unlock.UNLOCK_TTL_SECONDS the API response would
   advertise the OLD value while grant_pool_unlock used the new one.
   Now reads burnin.unlock.UNLOCK_TTL_SECONDS directly so the API
   stays in sync with whatever the actual source-of-truth is.

#2 _stage_surface_validate_ssh() carried dead extraction scaffolding
   from when the badblocks logic was first inlined into burnin.py:
   _is_cancelled_sync (sync wrapper that does run_until_complete in
   a coroutine — would deadlock if ever called), last_logged_pct,
   on_progress, accumulated_lines, on_progress_async — none on any
   control-flow path. Plus result["output"] which was set but never
   read. All deleted; the inline _drain coroutines below already
   handle progress/log throttling correctly.

#3 The new module boundaries were leaking — root orchestration
   mutated _remote_pids and _unlock_grants directly even though
   kill.clear_remote_pid() and unlock.invalidate_grant() existed.
   Now using the helpers, so a future change to the storage shape
   only requires editing the owning module.

Bonus from Codex's check note: _get_client() now asserts
burnin._client is not None with a clear message instead of relying
on an obscure NoneType AttributeError if a stage is somehow called
before init().

Verified: 44/44 tests pass; container boots clean; /health 200.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 01:35:07 -04:00
..
burnin fix: address Codex review of burnin package split (1.0.0-32) 2026-05-03 01:35:07 -04:00
static feat: secret handling — status badges + redacted endpoint + rotation audit (1.0.0-26) 2026-05-02 18:15:57 -04:00
templates feat: secret handling — status badges + redacted endpoint + rotation audit (1.0.0-26) 2026-05-02 18:15:57 -04:00
__init__.py Initial commit — TrueNAS Burn-In Dashboard v0.5.0 2026-02-24 00:08:29 -05:00
auth.py fix: address Codex audit findings (1.0.0-28) 2026-05-02 18:48:16 -04:00
auth_cli.py feat: app-level login + hardening sweep (1.0.0-22 -> 1.0.0-23) 2026-05-02 11:08:29 -04:00
config.py fix: address Codex review of burnin package split (1.0.0-32) 2026-05-03 01:35:07 -04:00
database.py fix: address Codex audit findings (1.0.0-28) 2026-05-02 18:48:16 -04:00
logging_config.py Initial commit — TrueNAS Burn-In Dashboard v0.5.0 2026-02-24 00:08:29 -05:00
mailer.py feat: app-level login + hardening sweep (1.0.0-22 -> 1.0.0-23) 2026-05-02 11:08:29 -04:00
main.py fix: address Codex audit findings (1.0.0-28) 2026-05-02 18:48:16 -04:00
models.py feat: pool-membership lock + cancellation hardening + smart_health refresh + tunables (1.0.0-13 -> 1.0.0-21) 2026-05-02 09:25:56 -04:00
notifier.py Stage 7: SSH architecture, SMART attribute monitoring, drive reset, and polish 2026-02-24 08:09:30 -05:00
poller.py fix: address Codex audit findings (1.0.0-28) 2026-05-02 18:48:16 -04:00
renderer.py Stage 7: SSH architecture, SMART attribute monitoring, drive reset, and polish 2026-02-24 08:09:30 -05:00
retention.py fix: address Codex audit findings (1.0.0-28) 2026-05-02 18:48:16 -04:00
routes.py fix: address Codex review of burnin package split (1.0.0-32) 2026-05-03 01:35:07 -04:00
settings_store.py feat: pool-membership lock + cancellation hardening + smart_health refresh + tunables (1.0.0-13 -> 1.0.0-21) 2026-05-02 09:25:56 -04:00
ssh_client.py fix: live pool re-check before start_job + drop dead run_badblocks (1.0.0-29) 2026-05-02 21:29:11 -04:00
terminal.py chore: re-sync deployed work that pre-dates this session 2026-05-02 09:24:42 -04:00
truenas.py chore: re-sync deployed work that pre-dates this session 2026-05-02 09:24:42 -04:00