Skip to content

feat(steward): refine stalled PR signal clock, author-reply bypass, and bucket wakeups - #9207

Open
loopx-agent wants to merge 1 commit into
mainfrom
codex/steward-stalled-pr-buckets-20261121
Open

loopx-agent wants to merge 1 commit into
mainfrom
codex/steward-stalled-pr-buckets-20261121

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

动机 / Motivation

Scoped Steward PR monitors previously evaluated min_stalled_hours against raw item.updatedAt and recorded only stalled_threshold_met: true, which caused Mergify/bot comments to reset the stall clock, hid external contributor replies awaiting maintainer answers, and prevented bucket-crossing wakeups at 72h / 7d.

改动思路 / Approach

Extract an exact-head REQUEST_CHANGES stall clock (stalled_since) and non-bot author-reply state in github_pr_evidence.py, then classify stalled_bucket and stabilize observeStewardSignalMonitor hashes in steward_managed_mode.ts with awaiting_maintainer_reply priority for external PRs.

具体改动 / Changes

  • loopx/capabilities/native_chat/github_pr_evidence.py: extend _GITHUB_OPEN_PRS_GRAPHQL_QUERY and _normalize_graphql_pr_node with comments(last: 20) and head commit oid, committedDate, pushedDate; add _summarize_request_changes_stall to emit stalled_since, author_replied_after_request_changes, and latest_request_changes_review_id while ignoring bots and stale-commit reviews.
  • loopx/control_plane/collaboration/steward_managed_mode.ts: update filterScopedRepositoryItems and classifyStalledBucket to compute stalled_bucket (awaiting_maintainer_reply | 24h_to_72h | 72h_plus | 7d_plus), allow immediate awaiting_maintainer_reply inclusion under author_mode: "exclude", drop stale-commit REQUEST_CHANGES items when scoped to REQUEST_CHANGES, and exclude updatedAt from observeStewardSignalMonitor hash inputs when stalled_since is present.
  • loopx/capabilities/native_chat/steward_turn.py: document the projected stall clock and bucket fields in the advancement instruction string.
  • tests/control_plane_ts/steward_managed_mode.test.ts & tests/test_steward_pr_merge_and_review_signal.py: add unit coverage for bot updatedAt bumps, external author replies vs maintainer replies, stale-commit exclusion, and 24h/72h/7d bucket wakeups.

验证 / Verification

  • node --test tests/control_plane_ts/steward_managed_mode.test.ts: 17 passed, 0 failed
  • pytest -n 4 tests/test_steward_pr_merge_and_review_signal.py tests/test_steward_generic_monitor_todo.py -q: 15 passed
  • pytest -n 4 tests/test_lark_steward_reports.py -q: 30 passed
  • ruff check: All checks passed
  • mypy: Success: no issues found in 17 source files
  • loopx check --scan-path .: ok=True, 0 errors
  • loopx canary premerge --tier quick --from-git-diff --git-diff-base origin/main: passed (3/3 catalog canaries)

对主干的风险 / Risks

Low risk: preserves signal_scope: null feature-off parity and falls back to updatedAt only when stalled_since is absent. Leaves protected PR merge behind independent exact-head review.

…nd bucket wakeups

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

This branch has not been deployed

No deployments
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