Skip to content

fix: prioritize PR status over waiting input#2228

Open
cneuralnetwork wants to merge 1 commit into
AgentWrapper:mainfrom
cneuralnetwork:codex/analyze-issue-2174
Open

fix: prioritize PR status over waiting input#2228
cneuralnetwork wants to merge 1 commit into
AgentWrapper:mainfrom
cneuralnetwork:codex/analyze-issue-2174

Conversation

@cneuralnetwork

Copy link
Copy Markdown

Summary

Prioritize PR-derived session statuses over a sticky waiting_input activity state so workers that have opened PRs show the actionable PR pipeline state instead of remaining pinned to needs_input.

Root Cause

deriveStatus returned needs_input before evaluating PR facts. If a worker's last persisted activity signal was waiting_input, newer PR facts such as an open PR or failing CI could not affect the display status.

Changes

  • Evaluate open and merged PR facts before falling back to waiting_input for live sessions.
  • Update status derivation tests for waiting_input combined with open, failing, and absent PR facts.
  • Refresh the architecture status precedence diagram to match the read model.

Testing

  • git diff --check
  • GOTOOLCHAIN=auto GOSUMDB=sum.golang.org go test ./internal/service/session
  • Attempted GOTOOLCHAIN=auto GOSUMDB=sum.golang.org go test ./...; it hit unrelated local terminal/runtime failures in backend/internal/adapters/runtime/tmux (no server running on /tmp/tmux-1000/default) and backend/internal/terminal (fish-shell parsing during an attachment integration test). The changed session package passed.

Fixes #2174

@cneuralnetwork cneuralnetwork marked this pull request as ready for review June 27, 2026 11:54
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.

bug(session activity): waiting_input masks PR-derived status after worker opens a PR

1 participant