Skip to content

Ready for review learns from GitHub (#1194) - #1220

Merged
JacobStephens2 merged 6 commits into
issue-919from
issue-1194
Oct 24, 2026
Merged

JacobStephens2 merged 6 commits into
issue-919from
issue-1194

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

thirdshift status learns when a ready row's pull request was merged or closed, keeps one GitHub answer per machine for five minutes, and shares it with the Console.

status
  load the kept GitHub answer
  freeze History facts per row
  select ready rows' own PRs, including dispatched Ticket runs
    continue reading departed rows while in Done or Resolved
  if the answer is missing, unusable or at least five minutes old
    query PR state + mergedAt/closedAt + rateLimit, in batches of 100
    keep healthy aliases when another alias cannot resolve
  group rows using the last facts
    open → Ready for review, however old
    merged/closed → Done, Resolved or History
      Resolved lasts inbox.days from GitHub's merge/close time
    reopened in Done/Resolved → Ready for review
    History → frozen facts, no further reads for that row

Rows with no pull request, no Command record, no read yet or an unresolvable pull request retain #1083's local exits. A later Command taking up the issue still clears its earlier row. Reads never write to GitHub. status --json adds github_state, github_at and the Inbox's github_answer_age_seconds.

The fake gh answers aliases with rateLimit, partial data and scoped errors. The manual, generated manual page, hand-written site pages and domain-to-code index describe the behavior. Console background polling remains #1195; quota reserves and stale-answer warnings remain #1197.

Seams tested: the thirdshift binary's status and status --json commands against the fake gh, using fixture timestamps and the kept file's modification time.

Closes #1194

Evidence

  • Before: each exact Spec reproducer failed: an unresolved alias discarded a healthy merged PR; a History row suppressed a current row sharing its PR; a corrupt fresh cache prevented a read.
    After: all three exact reproducers pass. Each corresponding binary regression failed before its fix and passes afterward; History's previous facts also survive subsequent status invocations. The failed-read test now ages the cache and proves an actual failed refresh retains the old answer.
  • /usr/bin/time -p scripts/affected-tests issue-919 passed: 2,450 Rust tests across 57 test binaries (56 ignored, zero failed), including all 47 status tests; all 49 site tests passed. Local wall time was 2448.81s (40m48.81s), including site checks and compilation; Cargo's compilation phase was 3m43s. Nextest was unavailable, so the selector used cargo test.
  • cargo clippy --all-targets -- -D warnings passed. CI passed on ca890ce; its Linux test job took 11m23s, including its checks and compilation.
  • Review against issue-919: Standards' one judgment finding and Spec's three behavior findings addressed. Both reviewers inspected all 16 changed files, including generated output; no exclusions and no unread changed files. Final reports: .thirdshift-review-XQ3nN1/standards.md and .thirdshift-review-XQ3nN1/spec.md.

Merge Danger

Door: two-way

No Command records or GitHub state are changed by these reads. The kept answer is disposable; removing logs/github-inbox.json causes a new read.

Blast Radius: Inbox

Ready-row grouping in CLI status and the Console, additional status JSON fields, and the shared kept-answer file. History facts are retained per row so a continuation sharing its pull request can still refresh.

Unaddressed findings

Standards

None. S1 (departure-field Data Clumps) is addressed by the single departure choice in src/logs/reading/inbox.rs.

Spec

None. P1, P2 and P3 were reproduced with their exact commands, fixed, and covered by retained binary tests. No finding was skipped or left for a Spec or Day shift decision.

Built with codex · gpt-6.1-sol · xhigh

Security review outcome

No unaddressed introduced findings.

status looks up every ready row's pull request in one batched GraphQL
query, asking for each one's state and merge or close time and the query's
own rateLimit, and keeps the answer in one file per machine for 5 minutes.
A merged pull request takes its row to Resolved for inbox.days from the
merge time, a closed one from the close time; an open one keeps its row
however old it is. Reopened rows come back while in Done or Resolved, and
History rows are not read again. status --json reports each row's GitHub
facts and the answer's age.
Guide now names all four rows GitHub can't speak for and the History
freeze. Two more tracer tests: reopen-from-Done and a failed GitHub read
keeping the last answer. Small cleanups: one record_pull_request helper,
one event_time helper, github_moved naming.
…ror: function_call_arguments.done name mismatch for `fc_01a16b5348787389b5a11e30ce602db4` (request id: 15dda57c-2635-4605-87a3-c8e38f050348, response: resp_6adbfcbbfb2b673229854061))

2026-10-24T02:17:21Z, host stephens. Uncommitted work at the time of failure is included in this commit.
@JacobStephens2
JacobStephens2 marked this pull request as draft October 24, 2026 02:17
@JacobStephens2
JacobStephens2 marked this pull request as ready for review October 24, 2026 03:37
Preserve GitHub ready-row exits and CLI dismissals, share the kept GitHub answer with dismissal selection, and regenerate the combined manual. Add binary regressions for dismissal across GitHub refreshes and reopening.

Validation: scripts/affected-tests origin/issue-919 passed (2469 Rust tests, 49 site checks; 2254.01 seconds including compilation). cargo check, focused status/dismiss tests, clippy with warnings denied, and formatting checks passed.
Preserve the architecture descriptions of GitHub Inbox reads and Console Dismiss/Undo. Pass the kept GitHub answer into Console dismissal availability so it follows the same grouping as the Inbox and CLI; cover merged and old-open pull requests through HTTP.
@JacobStephens2
JacobStephens2 merged commit d7db253 into issue-919 Oct 24, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1194 branch October 24, 2026 04:46
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