-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add agents-keepalive-loop.yml for consumer repos #185
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
Changes from all commits
1900a78
5f5ea2a
f6cc567
f0e2c5a
c7f2086
73f27fa
4f35c44
75b113b
5065251
48c10f8
9b86d35
9419900
7cb316c
b5215ae
6ac5340
e084cf9
a65d518
b859f4a
326dd51
ab87e2b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,16 +22,32 @@ body: | |
| placeholder: Provide the context and link supporting material. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: scope | ||
| attributes: | ||
| label: Scope | ||
| description: What is in scope for this work? Call out files, systems, or workflows to touch. | ||
| placeholder: Describe the intended scope. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: tasks | ||
| attributes: | ||
| label: Tasks | ||
| description: List the concrete tasks Codex should complete. | ||
| placeholder: "- [ ] Task 1\n- [ ] Task 2" | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: goals | ||
| attributes: | ||
| label: Goals | ||
| description: List the concrete outcomes this task should deliver. | ||
| placeholder: Bullet the acceptance criteria or deliverables. | ||
| label: Acceptance criteria | ||
| description: Describe what must be true for this work to be considered complete. | ||
| placeholder: "- [ ] Criterion 1\n- [ ] Criterion 2" | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: scope | ||
| id: guardrails | ||
|
||
| attributes: | ||
| label: Out of scope / guardrails | ||
| description: Clarify any boundaries Codex must respect (files to avoid, limits, etc.). | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,3 +31,32 @@ body: | |
| 1. | ||
| 2. | ||
| 3. | ||
| validations: | ||
| required: true | ||
|
Comment on lines
+34
to
+35
|
||
| - type: textarea | ||
| id: scope | ||
| attributes: | ||
| label: Scope | ||
| description: What is in scope for the fix? Call out files, systems, or workflows to touch. | ||
| placeholder: Describe the intended scope. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: tasks | ||
| attributes: | ||
| label: Tasks | ||
| description: Checklist of concrete work items for Codex to complete. | ||
| placeholder: "- [ ] Task 1\n- [ ] Task 2" | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: acceptance | ||
| attributes: | ||
| label: Acceptance criteria | ||
| description: Bullet list of verifiable outcomes for the fix. | ||
| value: | | ||
| - [ ] A | ||
| - [ ] B | ||
| - [ ] C | ||
| validations: | ||
| required: true | ||
| 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); | ||
| }); |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -112,6 +112,7 @@ jobs: | |||||||||||||
| "agents-orchestrator.yml:agents-orchestrator.yml" | ||||||||||||||
| "agents-orchestrator.yml:agents-70-orchestrator.yml" | ||||||||||||||
| "agents-pr-meta.yml:agents-pr-meta.yml" | ||||||||||||||
| "agents-keepalive-loop.yml:agents-keepalive-loop.yml" | ||||||||||||||
| "autofix.yml:autofix.yml" | ||||||||||||||
| "pr-00-gate.yml:pr-00-gate.yml" | ||||||||||||||
| ) | ||||||||||||||
|
|
@@ -295,6 +296,7 @@ jobs: | |||||||||||||
| SYNC_TEMPLATES=( | ||||||||||||||
| "agents-orchestrator.yml" | ||||||||||||||
| "agents-pr-meta.yml" | ||||||||||||||
| "agents-keepalive-loop.yml" | ||||||||||||||
| "autofix.yml" | ||||||||||||||
| "pr-00-gate.yml" | ||||||||||||||
| ) | ||||||||||||||
|
|
@@ -308,7 +310,9 @@ jobs: | |||||||||||||
| elif [ -f ".github/workflows/agents-70-orchestrator.yml" ] && [ "$file" = "agents-orchestrator.yml" ]; then | ||||||||||||||
| target=".github/workflows/agents-70-orchestrator.yml" | ||||||||||||||
| else | ||||||||||||||
| continue | ||||||||||||||
| # Create new file if it doesn't exist (for new workflows like keepalive-loop) | ||||||||||||||
| mkdir -p .github/workflows | ||||||||||||||
| target=".github/workflows/$file" | ||||||||||||||
|
Comment on lines
+313
to
+315
|
||||||||||||||
| # Create new file if it doesn't exist (for new workflows like keepalive-loop) | |
| mkdir -p .github/workflows | |
| target=".github/workflows/$file" | |
| # Skip workflows that don't already exist in the consumer repo | |
| echo "Skipping missing workflow: $file" | |
| continue |
| 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"]} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,15 @@ | ||
| 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`. | ||
| Improved placeholder handling so placeholder-only Scope/Tasks/Acceptance sections no longer count as real content, and added coverage to lock in missing-section detection. This keeps missing sections visible to the system while avoiding false “present” signals in `.github/scripts/issue_scope_parser.js` and ensures `buildIssueContext` surfaces warnings when placeholders are used. | ||
|
|
||
| Tests: `node --test .github/scripts/__tests__/keepalive-loop.test.js` | ||
| Details | ||
| - Updated `.github/scripts/issue_scope_parser.js` to treat placeholder-only content as not present for `analyzeSectionPresence`. | ||
| - Added placeholder-specific tests in `.github/scripts/__tests__/issue_scope_parser.test.js`. | ||
| - Added placeholder-missing coverage in `.github/scripts/__tests__/issue_context_utils.test.js`. | ||
|
|
||
| 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 | ||
| - `node --test .github/scripts/__tests__/issue_scope_parser.test.js .github/scripts/__tests__/issue_context_utils.test.js` | ||
|
|
||
| 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. | ||
| Notes | ||
| - `codex-prompt.md` has existing uncommitted changes (progress/checkbox resets). I didn’t modify it this round; let me know if you want me to update/commit it. | ||
|
|
||
| Next steps | ||
| 1) Update the source issue to add `Scope`, `Tasks`, and `Acceptance Criteria` sections, then re-run the PR body sync/keepalive. |
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 section header changed from "Goal" to "Why" but this is inconsistent with the YAML template changes where "Goal" was kept (though renamed to "Acceptance criteria"). Consider whether "Why" is the intended header name or if it should match other templates. Also, the "Success criteria" section is renamed to "Acceptance criteria" which is good for consistency, but ensure this aligns with the documentation and any parsing logic that looks for these section headers.