Skip to content

fix(auth): define normalize input-open failure diagnostics - #8

Merged
stacknil merged 1 commit into
mainfrom
fix/auth-input-open-diagnostics
Oct 16, 2026
Merged

stacknil merged 1 commit into
mainfrom
fix/auth-input-open-diagnostics

Conversation

@stacknil

@stacknil stacknil commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Define normalize diagnostics for missing or unreadable inputs: retain exit 1 and empty stdout, and report the input path, error type and message on stderr without a Python traceback. Addresses #7.

Why

The README and tests define resilient per-line parsing but leave startup failure diagnostics unspecified. This closes a CONTRACT_GAP without claiming a violation of a prior no-traceback guarantee.

The baseline evidence and classification were posted before the signed commit and this PR.

Behavior change

  • Catch OSError only during automatic input detection and input opening; preserve existing output files.
  • Use str(exc) when OSError.strerror is None.
  • Keep completed-batch exit 0, per-line diagnostics and --error-output JSONL unchanged. Startup failures do not produce per-record error rows.

Validation

  • Missing-input and permission regressions previously demonstrated red-to-green behavior; the additional missing-strerror regression also failed before its fix and passed afterward.
  • Focused CLI: 14 passed; complete auth suite: 24 passed, on Windows Python 3.12.14 and WSL Python 3.12.3.
  • Applied the final patch to a clean auth-lab archive of 9b8ae31b7ea89eddf7bb4f8b1ce6c131e781b627; applied files match the tested candidate. WSL tests ran on that reconstructed candidate.
  • Syntax compilation and git diff --check pass. Local Python 3.11 was unavailable; GitHub Actions on Python 3.11 passed all four mini-labs: auth 24, socket 8, permission 6, process 30.

Compatibility

Exit codes, record schemas, source detection and the normalize/filter/summary workflow remain unchanged. Consumers parsing startup traceback text will see the intentional diagnostic change. Output failures remain outside the new catches; no dependency is added.

@stacknil
stacknil merged commit e152686 into main Oct 16, 2026
1 check passed
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