Enhance Keepalive logic and add workflow validation - #3542
Conversation
Updated the Keepalive worker and PR-meta logic to improve activation evaluation and dispatch summaries. Added validation for GitHub workflow files to prevent merges with errors.
|
Gate fast-pass: docs-only change detected; heavy checks skipped. |
Automated Status SummaryHead SHA: 6fa60c3
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
Pull Request Overview
This PR significantly expands and restructures the Issues.txt file to document four detailed implementation issues related to enhancing keepalive workflow logic and adding CI validation for GitHub workflow files. The changes transform a single issue about worker skip guard logic into a comprehensive specification covering PR-meta activation evaluation, run-cap enforcement, orchestrator author invariants, and workflow file validation.
Key Changes:
- Replaced original Issue #1 (worker skip guard) with a new Issue #1 focused on PR-meta Gate replay logic and dispatch summaries
- Added three new issues: run-cap enforcement (#2), orchestrator summary requirements (#3), and workflow validation (#4)
- Expanded content from 118 lines to 238 lines with detailed scope, tasks, acceptance criteria, and implementation notes for each issue
| Labels: ci, automation, enhancement | ||
|
|
||
| Why | ||
| A single top‑level expression error previously invalidated the orchestrator workflow and blocked keepalive entirely. We want a fast‑failing check that prevents merges when any workflow is invalid. |
There was a problem hiding this comment.
Spelling error: "top‑level" should be "top-level". The en-dash (‑) should be a hyphen (-) for compound adjectives.
| A single top‑level expression error previously invalidated the orchestrator workflow and blocked keepalive entirely. We want a fast‑failing check that prevents merges when any workflow is invalid. | |
| A single top-level expression error previously invalidated the orchestrator workflow and blocked keepalive entirely. We want a fast‑failing check that prevents merges when any workflow is invalid. |
| @@ -1,118 +1,238 @@ | |||
| 1. Keepalive Worker: fix skip guard (execute on new instruction even if head SHA hasn’t moved) | |||
| 1. Keepalive PR‑meta: Gate replay must always evaluate a real activation; print mandatory one‑line DISPATCH summary for comment and gate lanes | |||
There was a problem hiding this comment.
Spelling error: "PR‑meta" should be "PR-meta". The en-dash (‑) should be a hyphen (-) for compound nouns.
|
|
||
| - Do not change label policy, reaction‑lock behavior, run‑cap numbers, or connector settings. | ||
|
|
||
| Non‑Goals |
There was a problem hiding this comment.
Spelling error: "Non‑Goals" should be "Non-Goals". The en-dash (‑) should be a hyphen (-) in section headings.
| Non‑Goals | |
| Non-Goals |
|
|
||
| - Write one line to $GITHUB_STEP_SUMMARY: | ||
| DISPATCH: ok=<true|false> reason=<ok|no-instruction-segment> pr=#<n> comment=<id> agent=<alias> bytes=<len> | ||
| - After branch‑sync gate, write: |
There was a problem hiding this comment.
Spelling error: "branch‑sync" should be "branch-sync". The en-dash (‑) should be a hyphen (-) for compound nouns.
|
|
||
| - Fails if GitHub’s workflow‑parser annotations indicate an error (or if act/actionlint reports an error) | ||
|
|
||
| Non‑Goals |
There was a problem hiding this comment.
Spelling error: "Non‑Goals" should be "Non-Goals". The en-dash (‑) should be a hyphen (-) in section headings.
| Pin action versions; do not grant extra permissions. | ||
|
|
||
| Do not alter moderation of connector comments; this issue only controls what is dispatched, not who posts publicly. | ||
| Keep the job fast (<30s) so it doesn’t slow inner‑loop iteration. |
There was a problem hiding this comment.
Spelling error: "inner‑loop" should be "inner-loop". The en-dash (‑) should be a hyphen (-) for compound adjectives.
| Keep the job fast (<30s) so it doesn’t slow inner‑loop iteration. | |
| Keep the job fast (<30s) so it doesn’t slow inner-loop iteration. |
| - In .github/workflows/agents-pr-meta.yml: | ||
|
|
||
| - Head SHA unchanged since the last processed instruction. | ||
| - Gate lane: if activation_comment is empty, fetch the most‑recent human @agent activation comment on the PR and pass it to detection (fallback). |
There was a problem hiding this comment.
Spelling error: "most‑recent" should be "most-recent". The en-dash (‑) should be a hyphen (-) for compound adjectives.
| - Gate lane: if activation_comment is empty, fetch the most‑recent human @agent activation comment on the PR and pass it to detection (fallback). | |
| - Gate lane: if activation_comment is empty, fetch the most-recent human @agent activation comment on the PR and pass it to detection (fallback). |
|
|
||
| Implementation notes | ||
|
|
||
| Keep reaction‑lock behavior unchanged; this issue only ensures replay always brings a concrete activation into detection and that decisions are visible. |
There was a problem hiding this comment.
Spelling error: "reaction‑lock" should be "reaction-lock". The en-dash (‑) should be a hyphen (-) for compound nouns.
| Keep reaction‑lock behavior unchanged; this issue only ensures replay always brings a concrete activation into detection and that decisions are visible. | |
| Keep reaction-lock behavior unchanged; this issue only ensures replay always brings a concrete activation into detection and that decisions are visible. |
|
|
||
| Why | ||
| On typical test PRs (e.g., #3529), the instruction comment currently includes a long status/summary bundle (Head SHA, “Latest Runs”, “Workflow / Job Result Logs”, coverage) below the Scope/Tasks/Acceptance block. When the full comment body is forwarded to the agent/connector, that additional material can dilute or confuse the prompt. We want the connector to receive only the instruction text (Scope/Tasks/Acceptance + required markers/mention), not the status bundle. | ||
| When the round‑start instruction is posted by the automation bot, some external agents ignore it and no code is produced. Also, without invariant one‑line summaries, it’s hard to prove the orchestrator actually posted, executed, and synced. |
There was a problem hiding this comment.
Spelling error: "round‑start" should be "round-start". The en-dash (‑) should be a hyphen (-) for compound adjectives.
| When the round‑start instruction is posted by the automation bot, some external agents ignore it and no code is produced. Also, without invariant one‑line summaries, it’s hard to prove the orchestrator actually posted, executed, and synced. | |
| When the round-start instruction is posted by the automation bot, some external agents ignore it and no code is produced. Also, without invariant one‑line summaries, it’s hard to prove the orchestrator actually posted, executed, and synced. |
| WORKER: action=<execute|skip> reason=<new-instruction|no-new-instruction-and-head-unchanged|cap-reached|...> pr=#<n> head=<sha7> instr=<comment_id> trace=<trace> | ||
|
|
||
| - Summarize dispatch (no PR noise) | ||
| - Branch‑sync summary |
There was a problem hiding this comment.
Spelling error: "Branch‑sync" should be "Branch-sync". The en-dash (‑) should be a hyphen (-) for compound nouns.
| - Branch‑sync summary | |
| - Branch-sync summary |
Updated the Keepalive worker and PR-meta logic to improve activation evaluation and dispatch summaries. Added validation for GitHub workflow files to prevent merges with errors.