Skip to content

needs_capture_file was a requirement enforced by nothing - #104

Merged
Nerds489 merged 1 commit into
mainfrom
fix/dead-needs-capture-file
Sep 26, 2026
Merged

Nerds489 merged 1 commit into
mainfrom
fix/dead-needs-capture-file

Conversation

@Nerds489

Copy link
Copy Markdown
Owner

What

needs_capture_file was a requirement declared and enforced by nothing. aircrack-ng carried needs_capture_file=True and the preflight's ToolContext had a matching capture_file slot, but PreflightRunner.prepare_tool never resolved it (its siblings root/target/interface/wordlist/api_key/gpu all are), and nothing read the slot. aircrack-ng is driven from the CLI and the chain with its .cap passed in, so it never reaches the preflight and the flag connected to nothing.

Same dangling-declaration shape as the root defect in #90/#102, found by continuing that audit into the preflight's requirement flags.

Change

  • Removed the dead needs_capture_file field, its aircrack-ng setter, and the unused ToolContext.capture_file slot. aircrack-ng's .cap still comes from the caller (CLI/chain), unchanged.
  • Added test_requirement_flags_enforced.py: a reachability guard in the style of test_reachability / test_db_schema. Every needs_* field on ToolRequirement must be referenced by the preflight, or named as carried-for-documentation with a reason (only needs_network, which the preflight cannot meaningfully pre-check). A new requirement flag that nothing enforces now fails a test rather than sitting dead.

Verified the guard catches the defect: it flagged needs_capture_file before removal, passes after. No behaviour change to any tool. Bump 12.1.9 -> 12.1.10.

Audit status

This closes the declared-flag enforcement audit that #102/#103 began. Both flag surfaces are now sound: the manifest cost-flags (destructive/requires_confirmation enforced, needs_hardware intentionally informational, pinned in #103) and the preflight requirement flags (all enforced except needs_network, now guarded here).

aircrack-ng declared needs_capture_file=True and the preflight's ToolContext had
a matching capture_file slot, but PreflightRunner.prepare_tool never resolved it
(root/target/interface/wordlist/api_key/gpu all are) and nothing read the slot.
aircrack-ng is driven from the CLI and the chain with its .cap passed in, so it
never reaches the preflight: the flag connected to nothing, the dangling-
declaration shape of #90/#102.

Remove the dead flag, its aircrack-ng setter and the unused ToolContext slot, and
add test_requirement_flags_enforced: every needs_* field on ToolRequirement must
be read by the preflight or named carried-for-documentation (only needs_network).
It caught needs_capture_file.

Bump 12.1.9 -> 12.1.10.
@Nerds489
Nerds489 merged commit 2c815fb into main Sep 26, 2026
2 checks passed
@Nerds489
Nerds489 deleted the fix/dead-needs-capture-file branch September 26, 2026 03: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