Skip to content

Fix/scope checkbox stripping#327

Merged
stranske merged 11 commits intomainfrom
fix/scope-checkbox-stripping
Dec 30, 2025
Merged

Fix/scope checkbox stripping#327
stranske merged 11 commits intomainfrom
fix/scope-checkbox-stripping

Conversation

@stranske
Copy link
Copy Markdown
Owner

No description provided.

stranske and others added 10 commits December 30, 2025 16:07
Scope is informational context, not actionable items to check off.

1. Add stripCheckboxesFromScope() function that:
   - Converts '- [ ] text' to '- text' (plain bullets)
   - Filters out placeholder content entirely
   - Removes empty lines

2. Update PR_META_FALLBACK_PLACEHOLDERS.scope:
   - Change from '- [ ] Scope section missing...' to italicized text
   - Matches standard PLACEHOLDERS.scope pattern

3. Update consumer repo template with same placeholder change

4. Update test to match new placeholder format

This ensures scope sections in:
- PR Automated Status Summary (via issue_scope_parser.js)
- Verifier follow-up issues (via verifier_issue_formatter.js)

...display as informational text rather than checkbox items.
Add extractSourceSection() to parse Source section from PR body and
include it in buildTaskAppendix(). This gives Codex visibility into
linked parent issues and original PRs for additional context.

Changes:
- Add extractSourceSection() function to extract Source links from PR body
- Update buildTaskAppendix() to accept options.prBody parameter
- Add 'Source Context' section to agent prompt when Source links present
- Add CONTEXT TIP to keepalive-instruction.md template
- Add 5 new tests for source section extraction

When a PR has a Source section with links like:
- Original PR: #123
- Parent issue: #456

The agent prompt now includes these as 'Source Context' so Codex
knows to check linked issues/PRs for additional background.
The src/trend_analysis/ directory contains CI test fixtures used to
exercise the autofix pipeline workflows - not production code. These
files (e.g., _autofix_trigger_sample.py, _ci_probe_faults.py) were
showing 0% coverage and artificially dragging down overall metrics.

Add 'src/trend_analysis/*' to [tool.coverage.run].omit patterns.
These CI autofix test fixtures were at risk of being mistakenly deleted
or flagged as orphaned code. The README explains:
- Why these files exist (autofix pipeline testing)
- Why they're excluded from coverage
- Which tests use them
The Workflows repo was missing the caller workflow for the bot comment
handler - only the reusable version existed. This meant the
'autofix:bot-comments' label had no effect.

Copied from templates/consumer-repo/.github/workflows/ to enable:
- Manual trigger via 'autofix:bot-comments' label
- Automatic trigger after Gate completion for agent PRs
- Manual dispatch via workflow_dispatch
…r bug

Addresses 3 review comments from Copilot and Codex:

1. **Copilot (regex)**: Changed `\s+` to `\s*` in checkbox pattern to handle
   edge cases where space after bracket is missing (e.g., `- [ ]text`)

2. **Copilot (tests)**: Added 11 new tests for `stripCheckboxesFromScope()`:
   - Checkbox-to-bullet conversion (unchecked, x, X)
   - Preservation of indentation
   - Filtering of placeholder content
   - Handling of empty lines and null input
   - Edge case: no space after bracket

3. **Codex P1 (scope placeholder alignment)**: Fixed critical regression where
   `agents_pr_meta_update_body.js` was still emitting checkbox format for scope
   fallback while `issue_scope_parser.js` changed to italicized format.
   Scope is now treated as informational (plain text), not actionable (checkbox).

Tests: 471 passing (up from 424)
Add instruction #5 and CRITICAL section to keepalive-instruction.md
asking Codex to output '✅ Completed: [task text]' in final summary.

This enables reliable reconciliation parsing for completed tasks.
Consumer repos had their own copies that weren't being updated.
Now the template will sync automatically with other consumer files.
Copilot AI review requested due to automatic review settings December 30, 2025 17:31
@agents-workflows-bot
Copy link
Copy Markdown
Contributor

⚠️ Action Required: Unable to determine source issue for PR #327. The PR title, branch name, or body must contain the issue number (e.g. #123, branch: issue-123, or the hidden marker ).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 30, 2025

Automated Status Summary

Head SHA: 414f2ae
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / Enforce agents workflow protections
Required: core tests (3.11): ⏳ pending, core tests (3.12): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 0.00%
Baseline 85.00%
Delta -85.00%
Minimum 70.00%
Status ❌ Below minimum

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 30, 2025

🤖 Keepalive Loop Status

PR #327 | Agent: Codex | Iteration 0/5

Current State

Metric Value
Iteration progress [----------] 0/5
Action wait (missing-agent-label)
Gate success
Tasks 0/0 complete
Keepalive ❌ disabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | resource |
| Suggested recovery | Confirm the referenced resource exists (repo, PR, branch, workflow, or file). |

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new keepalive instruction template to guide automated agents (Codex) in completing tasks with proper checkbox tracking. The template provides explicit directives about code implementation, checkbox updates, and summary formatting to prevent issues with scope checkbox stripping.

  • Introduces a new keepalive-instruction.md template with detailed task completion guidelines
  • Adds the template to the sync manifest for distribution to consumer repositories
  • Provides explicit instructions for checkbox format updates and completion tracking

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
templates/consumer-repo/.github/templates/keepalive-instruction.md New instruction template providing detailed guidelines for agents to implement code changes, update task checkboxes, and format completion summaries
.github/sync-manifest.yml Adds new templates section to manifest for syncing the keepalive instruction template, but has a structural issue with section placement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@stranske
Copy link
Copy Markdown
Owner Author

@codex fix comments

@chatgpt-codex-connector
Copy link
Copy Markdown

Summary

Testing

  • ⚠️ Not run (not requested)

View task →

@stranske stranske merged commit 48059e9 into main Dec 30, 2025
37 checks passed
@stranske stranske deleted the fix/scope-checkbox-stripping branch December 30, 2025 17:40
stranske added a commit that referenced this pull request Feb 7, 2026
Adds noqa: N806 comments to suppress false positive naming convention
warnings where ChatAnthropic is set to None as an ImportError fallback.
The variable name intentionally matches the class name for consistency.

Fixes linting failures in sync PR #327 (stranske/Collab-Admin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants