Avoid closing active campaign issues from PR preambles - #1898
Conversation
🤖 Keepalive Loop StatusPR #1898 | Agent: Codex | Iteration 2/5 Current State
Last Codex Run
Codex output:
📋 Task Reconciliation NeededNext iteration should:
🧠 Task Analysis| Provider | ℹ️ anthropic |
|
Keepalive Work Log (click to expand)
|
There was a problem hiding this comment.
Pull request overview
Updates the PR-body preamble generator to avoid auto-closing durable campaign tracking issues (while preserving the hidden <!-- meta:issue:N --> traceability marker), preventing campaign PR merges from closing the campaign queue issue.
Changes:
- Detects “campaign” source issues via labels and replaces
Closes #Nwith a non-closing reference for those issues. - Threads the fetched source issue payload into
buildPreambleso label-based logic can be applied. - Adds a unit test ensuring campaign issues are not closed by the generated preamble.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/scripts/agents_pr_meta_update_body.js |
Adds campaign-issue detection and conditionally emits a non-closing reference instead of Closes #N. |
templates/consumer-repo/.github/scripts/agents_pr_meta_update_body.js |
Intended template mirror of the preamble behavior for consumer repos. |
.github/scripts/__tests__/agents-pr-meta-update-body.test.js |
Adds coverage ensuring campaign issues are referenced without closing keywords. |
| if (isCampaignIssue(sections.sourceIssue)) { | ||
| lines.push(`Related to campaign issue #${sections.issueNumber}`, ''); | ||
| } else { | ||
| lines.push(`Closes #${sections.issueNumber}`, ''); | ||
| } |
There was a problem hiding this comment.
The consumer template copy of this script appears to be out of sync: templates/consumer-repo/.github/scripts/agents_pr_meta_update_body.js does not currently include isCampaignIssue / issueLabelNames or the updated buildPreamble behavior, so consumer repos would still emit Closes #N for campaign issues. Please mirror this change into the template file as required for consumer-facing scripts (per CLAUDE.md editing rules).
Related to campaign issue #1836
Automated Status Summary
Scope
Sync/Dependabot Campaign Queue
Remote GitHub Actions owns discovery for sync-generated and Dependabot PR rounds. Local Codex should only claim items from this issue when
needs-local-codexwork is queued.Summary
Context for Agent
Related Issues/PRs
Tasks
Acceptance criteria