Skip to content

Keep Inbox answers through GitHub failures and low quotas - #1234

Merged
JacobStephens2 merged 5 commits into
issue-919from
issue-1197
Oct 24, 2026
Merged

JacobStephens2 merged 5 commits into
issue-919from
issue-1197

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Keep the Inbox usable when GitHub fails and leave its last quota to the factory.

refresh Inbox
  reuse the kept answer while fresh
  if a kept quota is below 500, wait until its reset
  check GraphQL and REST quotas before reading rows
  read up to 100 pull requests; stop if the reserve is reached
  on failure, keep row facts and the latest diagnostic
  warn after five minutes with the last-answer time and failure

Console and status share the quota gate, kept facts and warning. JSON adds github_last_answered_at and github_failure. Warning changes wake open Inbox pages. The site pages and domain-to-code index describe the behavior.

Closes #1197

Evidence

  • Before: github_failures_warn_with_last_answer_and_clear_after_recovery failed because JSON omitted the last-answer time and failure.
    After: binary and Console HTTP tests cover unreachable GitHub, expired credentials, rate limiting, preserved groups, warning recovery, both quota reserves, reset recovery, and stopping between GraphQL batches.
  • Before: the Spec review's exact cargo test --test status legacy_github_answer_time_survives_a_failed_refresh -- --exact failed: a second read returned null instead of the known timestamp.
    After: the retained test passes; cache migration preserves the last good read time.

Validation on 2512089: scripts/affected-tests origin/issue-919 passed with all 49 site browser checks and 2,485 Rust tests (57 skipped). cargo clippy --all-targets -- -D warnings and cargo fmt --check passed. All CI checks and release smoke checks are green on the same head.

Timing: PATH="$PWD/.thirdshift-review-XEZuP4/tools/bin:$PATH" /usr/bin/time -p scripts/affected-tests origin/issue-919 took 2,698.80s wall, including site checks and Rust recompilation. The documented optional Nextest runner was supplied on that task-local PATH: Rust execution took 2,436.788s, with 2m 58s compilation. The CI test job took 10m 58s execution, excluding queue time and including setup, formatting and clippy. Host load and runner differences limit timing comparisons.

Test seams

  • thirdshift status and status --json through the binary, with fake gh responses and fixture timestamps.
  • Console HTTP Inbox and event stream, backed by the same kept GitHub answer and fake gh.

Review coverage

Independent Standards and Spec reviews used issue-919 pinned at 326e4a175becdf9e576049c1a80f4392f3195c6f (the fetched remote branch; the local branch is stale in another worktree). Both reviewers read all 18 changed files, including generated output. Changed files left unread: none. Generated-output exclusions: none.

Standards: both P3 suggestions addressed (typed quota reset clocks and shared Console fixture aging). Spec: the P2 timestamp migration defect reproduced, fixed and verified. Reports, including final files-read lists, are retained in .thirdshift-review-XEZuP4/standards.md and .thirdshift-review-XEZuP4/spec.md beside the Session trace.

Unaddressed findings

  • Standards: none.
  • Spec: none.
  • Security: none.

Security review outcome

No unaddressed introduced findings.

CI notes

  • Failed test job: inherited fixture race in github::inbox_remains_responsive_during_a_blocked_github_read; Scenario::gh_calls reads gh-calls.json while the fake's append_record truncates and rewrites it. The test and both helper files are byte-identical to issue-919 at c21c317; the same base test reproduces EOF while parsing a value at tests/support/mod.rs:1175 with strace -f -e inject=write:delay_enter=20ms. Left unchanged because the failure is unrelated to this branch.

Local Repair validation on 91f1e21: scripts/affected-tests origin/issue-919 passed (all 49 site checks and the full Rust suite via cargo test), 1,167.25s wall, with a cached Rust build. No source changes or CI re-runs.

Merge Danger

Door: two-way

Reads GitHub and updates only the local kept answer. Existing version-1 answers remain readable, including their original last-answer time.

Blast Radius: Inbox

Affects CLI/Console refresh timing, warnings and shared GitHub quota use; the limits are fixed and add no User config settings.

Built with codex · gpt-6.1-sol · xhigh

Preserve Inbox failure/quota documentation alongside accumulated dismissal kinds, and regenerate the manual HTML.

Validation: cargo check, cargo clippy --all-targets -- -D warnings, cargo fmt --check, and scripts/affected-tests origin/issue-919 passed. The affected-test selector used cargo test and completed in 1908.99 seconds wall, including Rust compilation and all 49 site checks.
Preserve GitHub issue settlement and History facts alongside Inbox failure diagnostics, last-answer times, shared quota reserves and refresh locking. Combine the site documentation and regenerate the manual. Extend regressions to cover Needs you issue facts during failed or quota-deferred reads and legacy cache migration.

Validation: cargo check, cargo clippy --all-targets -- -D warnings, cargo fmt --check, and scripts/affected-tests origin/issue-919 passed. The affected-test run used cargo test: 2,504 Rust tests passed (57 ignored), and all 49 site checks passed, in 1,219.21 seconds wall including compilation.
@JacobStephens2
JacobStephens2 merged commit d917398 into issue-919 Oct 24, 2026
24 of 25 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1197 branch October 24, 2026 09:03
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