Skip to content

Fix loop watch writer fallbacks and stale-pending self-heal#682

Merged
Jonnyton merged 3 commits intomainfrom
codex/loop-watch-workflow-run-fallback
May 9, 2026
Merged

Fix loop watch writer fallbacks and stale-pending self-heal#682
Jonnyton merged 3 commits intomainfrom
codex/loop-watch-workflow-run-fallback

Conversation

@Jonnyton
Copy link
Copy Markdown
Owner

@Jonnyton Jonnyton commented May 8, 2026

Summary

  • Treat a recent successful auto-fix-bug.yml workflow_run as productive fallback evidence when the required scheduled writer run is stale.
  • Add a regression for the observed live state: stale schedule at 2026-05-08T03:55:48Z plus recent workflow_run success at 2026-05-08T04:28:48Z should downgrade writer health to yellow instead of red.

Why

auto-fix-bug.yml intentionally runs from workflow_run events after Wiki bug sync / deploy completions. The watch already downgraded stale schedule reds for workflow_dispatch and issues successes, but missed the workflow's own backfill path.

This does not claim the schedule is fresh. It keeps that as yellow while preventing a false red when the writer has proven productive recently.

Verification

  • python -m pytest tests/test_community_loop_watch.py -q - 28 passed
  • python -m ruff check scripts/community_loop_watch.py tests/test_community_loop_watch.py - passed
  • python scripts/community_loop_watch.py --json with this patch - overall yellow; Writer workflow yellow with fallback_event: workflow_run

Gate

Writer family: Codex/OpenAI. Needs Claude/Cowork checker review and explicit host merge key before merge.

@Jonnyton Jonnyton added writer:codex Automated PR was written by a Codex/OpenAI-family model. checker:claude PR requires checker/reviewer from the Claude-family. priority:loop-discipline Loop discipline items route before primitive work. labels May 8, 2026
@Jonnyton
Copy link
Copy Markdown
Owner Author

Jonnyton commented May 8, 2026

Codex update after the 2026-05-08 loop-health pass:

Verification on this branch:

  • python -m pytest tests/test_community_loop_watch.py -q -> 29 passed
  • python -m ruff check scripts/community_loop_watch.py tests/test_community_loop_watch.py -> passed
  • PyYAML parse of .github/workflows/community-loop-watch.yml -> passed
  • GitHub checks on Fix loop watch writer fallbacks and stale-pending self-heal #682: policy and actionlint pass

Writer family remains Codex. Required checker remains Claude/Cowork before any host merge key can matter.

@Jonnyton Jonnyton added the ready_for_checker Loop PR passed source, duplicate, stale-base, and scope-split pre-checks. label May 8, 2026
@Jonnyton Jonnyton changed the title Fix loop watch workflow_run writer fallback Fix loop watch writer fallbacks and stale-pending self-heal May 8, 2026
@Jonnyton
Copy link
Copy Markdown
Owner Author

Jonnyton commented May 8, 2026

Codex follow-up from the duplicate-PR loop-health signal:

Live evidence after #684/#686: auto-fix-bug.yml later selected issue #483 again even though #483 already had open PR artifacts (#678/#679/#681/#685), and it opened another duplicate, #688. Root cause is discovery retrying auto-fix-stale-gate issues without first checking for linked open PRs.

New patch in commit 177e9d0:

  • auto-fix discovery now paginates open PRs once per run and skips an issue when a linked open PR already exists by branch ref/body/title issue mention.
  • added static workflow regression coverage so stale-gate priority cannot bypass duplicate-open-PR detection.

Additional verification after this patch:

  • python -m pytest tests/test_auto_fix_workflow.py -q -> 68 passed
  • python -m pytest tests/test_community_loop_watch.py -q -> 29 passed
  • python -m ruff check scripts/community_loop_watch.py tests/test_community_loop_watch.py tests/test_auto_fix_workflow.py -> passed
  • PyYAML parse of community-loop-watch.yml and auto-fix-bug.yml -> passed

This keeps #682 as a Codex-written loop-health PR; it still needs Claude/Cowork checker before any host merge key can matter.

@Jonnyton Jonnyton force-pushed the codex/loop-watch-workflow-run-fallback branch from 177e9d0 to 3ee5654 Compare May 8, 2026 23:07
@Jonnyton
Copy link
Copy Markdown
Owner Author

Jonnyton commented May 8, 2026

Codex writer-side rebase complete after PR #617 merge. New head 3ee5654; merge state CLEAN; policy + build-smoke + lint success. Current diff is the loop-watch code/workflow/test slice only; stale #617 baggage is gone. Still needs Cowork/Claude checker review; no host key requested.

@Jonnyton Jonnyton merged commit 39c5545 into main May 9, 2026
3 checks passed
@Jonnyton Jonnyton deleted the codex/loop-watch-workflow-run-fallback branch May 9, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

checker:claude PR requires checker/reviewer from the Claude-family. priority:loop-discipline Loop discipline items route before primitive work. ready_for_checker Loop PR passed source, duplicate, stale-base, and scope-split pre-checks. writer:codex Automated PR was written by a Codex/OpenAI-family model.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant