-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add agents-keepalive-loop.yml for consumer repos #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1900a78
feat: Add agents-keepalive-loop.yml for consumer repos
stranske 5f5ea2a
chore(codex-autofix): apply updates (PR #183)
github-actions[bot] f6cc567
Add required sections to agent task issue form
f0e2c5a
Align agent task template with required sections
c7f2086
chore(codex-keepalive): apply updates (PR #183)
github-actions[bot] 73f27fa
test: cover agent issue templates for required sections
codex 4f35c44
chore(codex-keepalive): apply updates (PR #183)
github-actions[bot] 75b113b
Add scope/tasks/acceptance to Codex issue forms
codex 5065251
chore(codex-keepalive): apply updates (PR #183)
github-actions[bot] 48c10f8
chore(autofix): formatting/lint
github-actions[bot] 9b86d35
Add keepalive placeholders for missing sections
9419900
chore(codex-keepalive): apply updates (PR #183)
github-actions[bot] 7cb316c
test(keepalive): prefer real sections over placeholders
b5215ae
chore(codex-keepalive): apply updates (PR #183)
github-actions[bot] 06d85a1
feat: Add workflow_dispatch trigger to keepalive-loop
stranske 5e840ab
fix: support override payload in evaluateKeepaliveLoop and add commit…
stranske File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| 'use strict'; | ||
|
|
||
| const test = require('node:test'); | ||
| const assert = require('node:assert/strict'); | ||
| const fs = require('node:fs'); | ||
| const path = require('node:path'); | ||
|
|
||
| const repoRoot = path.resolve(__dirname, '../../..'); | ||
| const issueFormPath = path.join(repoRoot, '.github/ISSUE_TEMPLATE/agent_task.yml'); | ||
| const issueTemplatePath = path.join(repoRoot, '.github/ISSUE_TEMPLATE/agent-task.md'); | ||
|
|
||
| const readFile = (filePath) => fs.readFileSync(filePath, 'utf8'); | ||
|
|
||
| test('agent task issue form includes Scope/Tasks/Acceptance sections', () => { | ||
| const content = readFile(issueFormPath); | ||
|
|
||
| assert.match(content, /label:\s*Scope\b/i); | ||
| assert.match(content, /label:\s*Tasks\b/i); | ||
| assert.match(content, /label:\s*Acceptance criteria\b/i); | ||
| }); | ||
|
|
||
| test('agent task markdown template includes Scope/Tasks/Acceptance sections', () => { | ||
| const content = readFile(issueTemplatePath); | ||
|
|
||
| assert.match(content, /^##\s+Scope\b/m); | ||
| assert.match(content, /^##\s+Tasks\b/m); | ||
| assert.match(content, /^##\s+Acceptance criteria\b/m); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"changed": true, "classification": {"total": 0, "new": 0, "allowed": 0}, "timestamp": "2025-12-26T16:43:58Z", "files": ["tests/workflows/test_workflow_agents_consolidation.py"]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,12 @@ | ||
| Added an automatic default metrics log path for keepalive iterations running under GitHub Actions so records are appended without extra inputs, and expanded keepalive-loop tests to verify the default log behavior and clean up the workspace file. Updated the acceptance checkbox in `codex-prompt.md` after verifying the new logging behavior. Changes are in `.github/scripts/keepalive_loop.js`, `.github/scripts/__tests__/keepalive-loop.test.js`, and `codex-prompt.md`. | ||
| Adjusted the keepalive scope extraction to ignore placeholder-only sections and prefer real content, added a fixture + test to lock in that behavior, and checked off the completed PR tasks in `codex-prompt.md`. | ||
|
|
||
| Tests: `node --test .github/scripts/__tests__/keepalive-loop.test.js` | ||
| Details | ||
| - Added placeholder detection in `.github/scripts/issue_scope_parser.js` and wired it into `scripts/keepalive-runner.js` so real sections win over placeholder-only comments. | ||
| - New scenario fixture `tests/workflows/fixtures/keepalive/prefers_real_sections.json` plus test coverage in `tests/workflows/test_keepalive_workflow.py`. | ||
| - Updated task checkboxes and progress line in `codex-prompt.md`. | ||
|
|
||
| Workflow update is still blocked by policy: I can’t edit `.github/workflows/agents-orchestrator.yml` in this run. Please add a `needs-human` label and a PR comment instructing the workflow update to call `scripts/keepalive_metrics_collector.py` after keepalive completes (or set `KEEPALIVE_METRICS_PATH` for the loop). | ||
| Tests | ||
| - `python -m pytest tests/workflows/test_keepalive_workflow.py -k "sections_missing or prefers_non_placeholder"` | ||
|
|
||
| Next steps: | ||
| 1) Have a human update `.github/workflows/agents-orchestrator.yml` to invoke the metrics collector or set `KEEPALIVE_METRICS_PATH`. | ||
| 2) Run the full selftest CI to satisfy the remaining acceptance criterion. | ||
| Suggestions | ||
| 1) Run the full keepalive workflow tests: `python -m pytest tests/workflows/test_keepalive_workflow.py` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"pr_number":2468,"iteration":2,"timestamp":"2025-12-26T16:21:39.803Z","action":"run","error_category":"none","duration_ms":1234,"tasks_total":10,"tasks_complete":4} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mkdir -p command will create the .github/workflows directory even if the repository doesn't have workflows configured yet. While this might be intentional for new workflows, it changes the behavior where previously files that didn't exist were skipped. Consider checking if .github/workflows exists before creating new files, or add a comment explaining that this is intentional behavior for bootstrapping new workflows in consumer repos.