Skip to content

fix: distinguish authentication statuses from numeric substrings - #83

Open
Afloat16 wants to merge 1 commit into
billion-token-one-task:masterfrom
Afloat16:fix/failure-status-token-boundaries-20261202-r2
Open

Afloat16 wants to merge 1 commit into
billion-token-one-task:masterfrom
Afloat16:fix/failure-status-token-boundaries-20261202-r2

Conversation

@Afloat16

@Afloat16 Afloat16 commented Dec 2, 2026

Copy link
Copy Markdown

Problem

The failure classifier treats any occurrence of 401 or 403 as an authentication failure. A network timeout containing a duration such as 1.403 seconds, or a connection failure involving a model name such as model-401b, therefore takes the non-retryable credential path instead of the ordinary recovery path. Package names can be misclassified in the same way.

Changes

Recognize 401/403 as separate numeric tokens rather than substrings of identifiers, longer numbers, or decimals. Keep standard HTTP error formats, explicit authentication messages, and gated-repository failures on the existing credential path.

Validation

  • New regression tests: 5 failed, 8 passed on base.
  • Tests also exercise the recovery decision and verify real 401/403 errors, including statuses followed by sentence-ending punctuation, still require credentials.
  • python -m pytest -q tests/test_failure_status_boundaries.py tests/test_runner_contract_and_failure_policy.py tests/test_degenerate_measurement.py: 57 passed, 30 subtests passed.

@cla-assistant

cla-assistant Bot commented Dec 2, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant

cla-assistant Bot commented Dec 2, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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