Add request-bound SOXL error 321 classifier - #240
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d017b26fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| or isinstance(error_code, bool) | ||
| or error_code != 321 |
There was a problem hiding this comment.
When error_code is 321.0, Decimal(321), or another non-integer value equal to 321, this validation accepts it and stores that value in the nominally integer numeric_code field; _request_validation_321_payload repeats the equality-only check, so the writer can emit 321.0 despite the closed diagnostic contract. Require a non-boolean int here and in the writer validation before accepting code 321.
Useful? React with 👍 / 👎.
| re.compile( | ||
| r"(?<![a-z0-9])invalid\s+end(?:datetime|\s+date(?:\s*/\s*|\s+)time)(?![a-z0-9])" | ||
| ), |
There was a problem hiding this comment.
Recognize field-first invalid end-time messages
When the provider reports the end-time failure in the common field-first form, such as End date/time: the date, time, or time-zone entered is invalid, the field pattern detects end date/time but this cause pattern does not match because it requires invalid to precede the field. The equality check at lines 232–235 therefore downgrades an unambiguous end-time validation failure to unknown_321; accept the corresponding field-first wording as well.
Useful? React with 👍 / 👎.
| assert provider_end_time in { | ||
| CUTOFF.strftime("%Y%m%d %H:%M:%S UTC"), | ||
| CUTOFF.strftime("%Y%m%d-%H:%M:%S"), | ||
| } |
There was a problem hiding this comment.
Exercise each provider end-time representation
This assertion only checks each hard-coded parameter against the same two hard-coded formats, so both parameterized cases pass regardless of what acquire_strict_adjusted_last or its requester actually does. A regression that emits neither supported provider end-time representation would remain undetected; derive or capture the representation produced by the exercised request path and compare that value instead.
Useful? React with 👍 / 👎.
Fresh-base replacement for closed-unmerged #238.