Skip to content

fix(e2e): validate Discord message fetches and bound rate-limit retries - #5703

Merged
itismyfield merged 1 commit into
mainfrom
fix/5071-gatec-e2e-message-fetch-20260905
Sep 5, 2026
Merged

fix(e2e): validate Discord message fetches and bound rate-limit retries#5703
itismyfield merged 1 commit into
mainfrom
fix/5071-gatec-e2e-message-fetch-20260905

Conversation

@itismyfield

Copy link
Copy Markdown
Owner

Summary

Validate E2E Discord message-fetch responses and add bounded, read-only rate-limit retries. The Gate C run at 2026-09-05 09:42–09:43 KST became UNEVALUABLE: harness failure: a decoded upstream error object was returned under local HTTP 200 messages, then a caller iterated its string keys and failed on .get. One admission and one E-1 body were preserved; no automatic rerun occurred.

The production route's upstream-status handling is separate work in #5702. This patch changes no production Rust, configuration, deployment, scenario YAML or POST retry behavior.

Scope

Path + -
scripts/e2e/tui_relay/discord.py 107 24
scripts/e2e/tui_relay/test_assertions.py 2 0
scripts/e2e/tui_relay/test_discord_client.py 270 3
Total, 3 paths 379 27

Within 20 paths/+800. No cap exception. Valid raw/enveloped arrays and same-ID edits remain supported. Malformed responses report observed local HTTP status and a bounded body excerpt; wrapped retry_after is labelled inference, not a fabricated observed upstream status. Actual HTTP 429 can honor valid headers even with an empty/non-JSON body.

At most three GET attempts, with a 15-second retry budget and no shortened reset delay. This is not a strict total-transfer wall-clock cutoff: urllib provides socket timeouts rather than a total-read deadline. No scenario/run auto-retry is introduced.

Validation

  • Original final-refetch failure: offline baseline RED → candidate GREEN.
  • Actual429 header-only empty/non-JSON/invalid-UTF8 owner: intermediate RED → candidate GREEN.
  • Client suite 23/23; existing CI assertion suite 78/78, including all 18 message-fetch owners; related offline suites 129/129. Counts overlap and are not summed.
  • Scope/syntax/portable-path/hotfile checks pass; standalone bundle restoration and full fscks pass; candidate clean.
  • Low-risk user policy: local Cargo/FULL omitted because src additions0 and no runtime-authority changes. Required CI remains mandatory before merge. No local live traffic.
  • Head c81d7b0; tree 55465df4e30b50cdb208455e1f5f3404c12ca890; base6d2db2ee8f0835038c29f2fd44f4027fff95d60e.
  • Implementation evidence SHA256 16d7b0d9944faa95d2944c97cc3b0f5cf076db7cc7ad1abb7ee607bf581467c0; full bundle SHA256 6945de79d4766088bed8820420f8f8276409fe21ccc7a02fb87998fb10a970a0.

Independent exact-head review

Both fresh reviewers bound the same full head/tree and returned VERDICT: CLEAN / PUSH_GO1:

  • Astra/ultra r1: P0/P1/P2 = 0/0/0; review SHA256 68917e3f729256fa22fdfbf1b61ab8c28b625139f65f3dcd9681bb109d678db4.
  • account1 Fable r1: P0/P1 = 0/0, six nonblocking P2 notes; review SHA256 0d291e8ebeff470774d1d0719ce498f6816fe3c9e02035c0000e2ff26bfa3e80.

Accepted compatibility disclosures: the first GET socket timeout is also capped at the smaller of the configured client timeout and the remaining 15-second budget. Empty 2xx bodies now fail explicitly rather than silently returning an empty list. CI imports the 18 new fetch owners, not all pre-existing client tests; existing send-prompt coverage gaps are not claimed closed. Numeric delay parsing retains Python float syntax. The intermediate header-only RED commit is preserved in a separate forensic bundle, not the final publication bundle.

Execution boundary

After merge, the user authorized exactly one supervised Gate C rerun from the new main harness source, subject to fresh preflight. Deployed leader/worker remain 6d2db2e, O100 only, channel1509350490461180105, no redeploy/config change. The supervisor polling delta is a separately reviewed local artifact, not part of this PR. A failed rerun is sealed and returned for user decision, not automatically repeated.

Refs #5071
Refs #5191
Refs #5702

Reject malformed message arrays with observed status and bounded body
diagnostics. Retry read-only message GETs for actual HTTP 429 and the
current HTTP 200-wrapped retry_after response, honoring reset metadata
within three attempts and a 15-second retry budget.

Keep fixed-cursor polling and same-ID edit observation, and expose the
offline client regression tests through the existing CI assertion suite.
The production route's upstream status handling remains separate work.

Refs #5071
Refs #5191
Refs #5702

Co-authored-by: Codex <noreply@openai.com>
@itismyfield
itismyfield merged commit 3b3b961 into main Sep 5, 2026
23 checks 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