Skip to content

Add necromancer label-command workflow for PR regression test hardening#31125

Merged
pelikhan merged 2 commits into
mainfrom
copilot/add-test-coverage-for-regression
May 9, 2026
Merged

Add necromancer label-command workflow for PR regression test hardening#31125
pelikhan merged 2 commits into
mainfrom
copilot/add-test-coverage-for-regression

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

New Feature

This change adds a Codex-powered agentic workflow, necromancer, triggered by label_command on pull requests. It is designed to investigate regression context (original issue + fix + existing tests), generate missing regression coverage, and push test-only updates to the PR branch.

What does this feature do?

  • Workflow trigger and execution model

    • Adds .github/workflows/necromancer.md with label_command: necromancer scoped to pull requests.
    • Uses engine: codex, strict: true, status comments, and read-only job permissions.
  • Regression investigation flow

    • Instructs the agent to:
      • resolve and inspect the originating issue,
      • analyze the PR’s fix surface,
      • audit current related tests,
      • identify regression-risk gaps before merge.
  • Automated regression test generation + branch update

    • Adds safe output support for push-to-pull-request-branch to publish generated tests directly to the PR branch.
    • Constrains writable output to test artifacts only (*_test.go, *.test.*, *.spec.*, snapshots).
    • Requires a single PR comment summary (add-comment) or explicit noop when no meaningful test delta is possible.
  • Compiled workflow artifact

    • Includes compiled lock file .github/workflows/necromancer.lock.yml.

Why is this feature needed?

Merge-ready PRs often close the immediate bug but leave regression vectors under-tested. This workflow codifies a repeatable “bug lineage → fix analysis → coverage augmentation” pass so regressions are less likely to recur after merge.

Implementation details

on:
  label_command:
    name: necromancer
    events: [pull_request]
engine: codex
safe-outputs:
  push-to-pull-request-branch:
    allowed-files:
      - "**/*_test.go"
      - "**/*.test.js"
      - "**/*.test.cjs"
      - "**/*.spec.ts"

Copilot AI and others added 2 commits May 9, 2026 00:55
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review May 9, 2026 02:14
Copilot AI review requested due to automatic review settings May 9, 2026 02:14
@pelikhan pelikhan merged commit c1b1297 into main May 9, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/add-test-coverage-for-regression branch May 9, 2026 02:14
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

Adds a new agentic workflow, necromancer, triggered via label_command on pull requests to investigate regression context and (when possible) generate and push test-only hardening changes back to the PR branch.

Changes:

  • Introduces .github/workflows/necromancer.md defining the necromancer label-command workflow, tooling, safe-outputs constraints, and the agent’s required investigation/testing process.
  • Adds the compiled workflow artifact .github/workflows/necromancer.lock.yml corresponding to the new markdown workflow.
Show a summary per file
File Description
.github/workflows/necromancer.md Defines the new Codex-powered PR regression-test hardening workflow, including safe-outputs constraints and agent instructions.
.github/workflows/necromancer.lock.yml Compiled lock file for the necromancer workflow (generated artifact consumed by GitHub Actions).

Copilot's findings

Tip

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

  • Files reviewed: 1/2 changed files
  • Comments generated: 2

- "git grep:*"
- "git log:*"
- "git show:*"
- "go test:*"
Comment on lines +45 to +53
push-to-pull-request-branch:
allowed-files:
- "**/*_test.go"
- "**/*.test.js"
- "**/*.test.cjs"
- "**/*.spec.js"
- "**/*.spec.ts"
- "**/*.spec.tsx"
- "**/*.snap"
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.

3 participants