You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
review: Guard refreshDecisions against overlapping reads #325
Task: refreshDecisions in src/github/main.ts is started from several places (page load, the poll, force on r). Two overlapping calls can finish out of order, so an older read overwrites state.decisions/state.decisionsAnswered with stale data (and the cached-first read can overwrite a live one if it is slow). Add an in-flight guard like refreshOps' opsRunning: a call while one runs does not start a second read, but a force call during a read is remembered and runs once more when the first ends. Also stop the cached-first branch from applying after the live read has landed.
Acceptance: a unit test (extract the sequencing into a small testable function if main.ts can't be imported in tests) with a fake loader that resolves out of order proves the later-started read can't be overwritten by an earlier one, a forced call during a read re-runs once, and an error clears the flag; npm run check (typecheck, tests, build) passes.
Constraints: code and tests only, no GitHub writes (the coordinator opens the PR); no design decisions; do not touch .github/ workflows; keep the change small and match the surrounding style; commit message in the project's style with a Generated-by: AI trailer, no Signed-off-by.
Activity
cgwalters-bot commentedon Oct 7, 2026
Done: cgwalters-forge/review#36 is merged.
Generated-by: https://github.com/cgwalters/#llms