RFC: main-red watchdog (Option C of main-never-red directive) #420

Closed
opened 2026-05-11 07:32:00 +00:00 by claude-ceo-assistant · 0 comments

Context

Per hongming directive ("main NEVER goes red"), and hongming-pc's 2026-05-11 07:26Z architecture call: implement Option C — main-red watchdog. Option B (auto-revert) is explicitly rejected per feedback_no_such_thing_as_flakes and feedback_fix_root_not_symptom — the watchdog files an idempotent issue + Loki alert, never mutates main.

Scope (this issue / PR)

  • .gitea/workflows/main-red-watchdog.yml — hourly :05 cron + workflow_dispatch
  • .gitea/scripts/main-red-watchdog.py — sidecar with --dry-run
  • tests/test_main_red_watchdog.py — pytest, hostile-self-review proven

Pattern mirrors

CP #112 (0adf2098): same shape — scheduled cron + workflow_dispatch, sidecar Python, Gitea API GET, idempotent-by-title [main-red] issue, api() raises on non-2xx (feedback_api_helper_must_raise_not_return_dict).

Differences from CP#112

  • Source surface is 1 (combined status of main HEAD), not 3 (CI yaml + protection + audit env).
  • Title pattern: [main-red] {repo}: {SHA[:10]} (commit-scoped, so a fix-forward auto-closes when next cron sees green).
  • Auto-close behavior when main returns to green.
  • Emits Loki JSON line via logger -t main-red-watchdog (Vector → Loki, per reference_obs_stack_phase1).

Out-of-scope (follow-up PRs)

  • Replicate to operator-config, internal, molecule-controlplane itself, hermes-agent, and remaining repos.
  • Option D (block-merge-when-main-red) — depends on this PR's "is main green?" primitive.

DoD

  • PR opened in molecule-core, labelled tier:low
  • All pytest cases pass
  • Hostile self-review: tests FAIL on a pre-fix implementation (proof in PR body)
  • Five-Axis review per feedback_dev_sop_phase_1_to_4
## Context Per hongming directive ("main NEVER goes red"), and hongming-pc's 2026-05-11 07:26Z architecture call: implement **Option C — main-red watchdog**. Option B (auto-revert) is explicitly rejected per `feedback_no_such_thing_as_flakes` and `feedback_fix_root_not_symptom` — the watchdog files an idempotent issue + Loki alert, never mutates main. ## Scope (this issue / PR) - `.gitea/workflows/main-red-watchdog.yml` — hourly `:05` cron + `workflow_dispatch` - `.gitea/scripts/main-red-watchdog.py` — sidecar with `--dry-run` - `tests/test_main_red_watchdog.py` — pytest, hostile-self-review proven ## Pattern mirrors CP `#112` (`0adf2098`): same shape — scheduled cron + `workflow_dispatch`, sidecar Python, Gitea API GET, idempotent-by-title `[main-red]` issue, `api()` raises on non-2xx (`feedback_api_helper_must_raise_not_return_dict`). ## Differences from CP#112 - Source surface is 1 (combined status of `main` HEAD), not 3 (CI yaml + protection + audit env). - Title pattern: `[main-red] {repo}: {SHA[:10]}` (commit-scoped, so a fix-forward auto-closes when next cron sees green). - Auto-close behavior when main returns to green. - Emits Loki JSON line via `logger -t main-red-watchdog` (Vector → Loki, per `reference_obs_stack_phase1`). ## Out-of-scope (follow-up PRs) - Replicate to `operator-config`, `internal`, `molecule-controlplane` itself, `hermes-agent`, and remaining repos. - Option D (block-merge-when-main-red) — depends on this PR's "is main green?" primitive. ## DoD - [ ] PR opened in molecule-core, labelled `tier:low` - [ ] All pytest cases pass - [ ] Hostile self-review: tests FAIL on a pre-fix implementation (proof in PR body) - [ ] Five-Axis review per `feedback_dev_sop_phase_1_to_4`
claude-ceo-assistant added the
tier:low
label 2026-05-11 07:32:10 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#420
No description provided.