Repository navigation
feat(autopilot): accept issues with a declared scope - #3105
Daniel Meppiel (danielmeppiel) merged 8 commits into
Conversation
Issue Accept now drafts a triage-based scope comment, posts it only after exact chat approval by a GOVERNANCE roster human, and then applies status/accepted. A current unedited record is the delivery grant, including unattended runs. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unattended delivery lacks deterministic scope-record handoff and can bypass unresolved review-contact or withdrawal checks.
Review effort: Balanced
Findings: 2
Open (4)
What changed in this PR
Adds a governed issue-acceptance workflow that records human-approved scope before labeling and enables unattended delivery from that record.
Changes:
- Adds the
autopilot-issue-acceptskill and canvas integration. - Makes
record-presentscope evidence a delivery grant. - Updates tests, governance docs, package metadata, and lock artifacts.
| File | Description |
|---|---|
tests/unit/test_workflow_actor_contract.py |
Updates unattended-delivery assertions. |
tests/unit/test_governance_consumers.py |
Updates wave-gate assertions. |
packages/autopilot/README.md |
Documents acceptance and delivery behavior. |
packages/autopilot/autopilot-maintainer-canvas/tests/server.test.mjs |
Tests issue refusal and PR acceptance. |
packages/autopilot/autopilot-maintainer-canvas/tests/logic.test.mjs |
Tests acceptance spawning and mutations. |
packages/autopilot/autopilot-maintainer-canvas/.apm/extensions/autopilot-maintainer/ui.mjs |
Spawns acceptance sessions from issue actions. |
packages/autopilot/autopilot-maintainer-canvas/.apm/extensions/autopilot-maintainer/logic.mjs |
Registers the acceptance worker and blocks direct labeling. |
packages/autopilot/autopilot-issue-delivery-worker/.apm/skills/autopilot-issue-delivery-worker/SKILL.md |
Changes delivery authorization policy. |
packages/autopilot/autopilot-issue-delivery-worker/.apm/skills/autopilot-issue-delivery-worker/assets/solution-pipeline-prompt.md |
Changes per-wave scope gating. |
packages/autopilot/autopilot-issue-delivery-scheduler/.apm/skills/autopilot-issue-delivery-scheduler/SKILL.md |
Allows unattended delivery with current records. |
packages/autopilot/autopilot-issue-accept/SKILL.md |
Defines the new acceptance workflow. |
packages/autopilot/autopilot-issue-accept/apm.yml |
Declares the new skill package. |
GOVERNANCE.md |
Documents the worker-policy grant. |
docs/src/content/docs/contributing/development-guide.md |
Updates governance-tool guidance. |
CONTRIBUTING.md |
Documents unattended delivery authorization. |
CHANGELOG.md |
Records the feature. |
apm.yml |
Adds the direct skill dependency. |
apm.lock.yaml |
Records deployments and updated hashes. |
.agents/skills/autopilot-issue-delivery-worker/SKILL.md |
Updates the deployed worker copy. |
.agents/skills/autopilot-issue-delivery-worker/assets/solution-pipeline-prompt.md |
Updates the deployed pipeline prompt. |
.agents/skills/autopilot-issue-delivery-scheduler/SKILL.md |
Updates the deployed scheduler copy. |
.agents/skills/autopilot-issue-accept/SKILL.md |
Adds the deployed acceptance skill. |
.agents/skills/autopilot-issue-accept/apm.yml |
Adds deployed package metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thank you for contributing this pull request. This proposes substantive changes to governance and automation, so the current contribution process still applies: start with an issue and wait for a responsible maintainer to approve bounded scope before implementation (https://github.com/microsoft/apm/blob/main/CONTRIBUTING.md). I found related completed tracking in #2960 (#2960). Its accepted scope covered the advisory governance/eligibility rollout and is now closed; it does not establish approval for the delivery-grant policy proposed here. Please ask a responsible maintainer whether #2960 should be reopened or extended for this proposal, or whether a separate issue is appropriate, rather than creating duplicate tracking by assumption. On the canonical issue, a responsible maintainer should record whether to approve the bounded scope: scope, done when, out of scope, and review contact. Please link the issue and approval record here. The rules proposed in this PR do not change the current contribution policy. I added Generated by autopilot-pr-triage-worker. This comment is AI-generated and may contain errors. |
|
Maintainer decision (2026-11-12): Daniel Meppiel (@danielmeppiel) approves adopting this change as written: an unedited, record-present Sergio Sisternes (@sergio-sisternes-epam), thank you. Because the branch conflicts with Posted with AI assistance on behalf of Daniel Meppiel (@danielmeppiel). |
Resolve the apm.lock.yaml conflict by taking main's lock (regenerated in the next commit) and fold the #3105 CHANGELOG entry into main's existing [Unreleased] Added list instead of adding a duplicate heading. Co-authored-by: sergio-sisternes-epam <[email protected]> Co-authored-by: Copilot App <[email protected]>
Fold the four Copilot findings on #3105 inside the PR's stated scope: - issue-accept re-runs eligibility.cjs on the posted comment URL and requires record-present before adding status/accepted, so a later withdrawal or malformed record blocks the label. - delivery worker and pipeline child require contact_confirmation_needed: false; an unagreed named review contact stops unattended runs. - delivery worker discovers APPROVAL_URL deterministically from the latest roster apm-scope:v1 approve comment; the scheduler never guesses a URL. - maintainer-scope-evals.json pipeline case now encodes the new grant semantics and the contact failure state. Also regenerate apm.lock.yaml hashes against main's lock, fix a tautology in the development guide, and add contract tests for the accept skill (mutation-break verified). Co-authored-by: sergio-sisternes-epam <[email protected]> Co-authored-by: Copilot App <[email protected]>
Fold every finding from the full advisory panel on #3105: - docs: README shared rules name the autopilot-issue-accept label exception; Canvas says issue Accept starts the skill and PR Accept labels; README, CONTRIBUTING and the dev guide state the review-contact condition; GOVERNANCE links the record format and drops internal jargon. - security: the pipeline gate says the report is neutral evidence and step 2 is the worker grant; APPROVAL_URL discovery tolerates leading whitespace like the parser and sorts by created_at explicitly. - tests: pin the Decision: approve filter and sort, add a /spawn server test for worker-issue-accept, and pin the eval fixture's contact and second-confirmation semantics (mutation-break verified). - architecture: name authority.cjs as the record-format owner above the discovery locator. Co-authored-by: sergio-sisternes-epam <[email protected]> Co-authored-by: Copilot App <[email protected]>
Main relicensed first-party manifests to Apache-2.0 after this branch was written; test_first_party_manifest_declares_apache_license failed for the new autopilot-issue-accept apm.yml. Align it and refresh the lock hash and declared license. Co-authored-by: sergio-sisternes-epam <[email protected]> Co-authored-by: Copilot App <[email protected]>
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 2 | Clean owner split: canvas spawns the accept skill, planLabelMutation blocks the issue label path, eligibility.cjs stays the sole interpreter. |
| Supply Chain Security Expert | 0 | 1 | 2 | Grant chain is sound; aligned pipeline wording and hardened the approval-URL locator. |
| Doc Writer | 0 | 2 | 1 | README label exception, Canvas Accept behavior, and the review-contact condition were missing. |
| Test Coverage Expert | 0 | 1 | 2 | Core promises pinned; Decision filter, /spawn route and fixture semantics needed pins. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Architecture
flowchart TD
A["Maintainer clicks Accept on issue"] --> C["resolveSpawn worker-issue-accept N"]
C --> E["Session: autopilot-issue-accept"]
E --> G{"Proposed scope brief found?"}
G -->|no| I["STOP: no brief"]
G -->|yes| J{"Exact-text chat approval by roster human?"}
J -->|no| L["STOP: not approved"]
J -->|yes| M["Post apm-scope v1 comment as that human"]
M --> N["Re-read comment: body, author, unedited"]
N --> O["eligibility.cjs --approval-url COMMENT_URL"]
O --> P{"record-present?"}
P -->|no| R["STOP: do not label"]
P -->|yes| Q["Add status/accepted"]
Q -.-> W["Delivery worker locates APPROVAL_URL"]
W --> X["eligibility.cjs --approval-url APPROVAL_URL"]
X --> Y{"record-present and contact_confirmation_needed false?"}
Y -->|yes| Z["Implement and open PR"]
Y -->|no| AA["STOP: contact pending or needs-evidence"]
S["Canvas label path kind=issue action=accept"] --> U["planLabelMutation throws"]
Recommendation
Every panel finding has been folded and validated. The grant chain fails closed, the authority context is unambiguous, and the docs state the contract consistently. CI is green at the head above; the remaining step is the required CODEOWNER review by Daniel Meppiel (@danielmeppiel).
Folded in this run
- (merge) Merged
main(583 commits); resolved theapm.lock.yamlconflict and moved the CHANGELOG entry into the existing[Unreleased]Added list -- resolved in c43d0bd. - (copilot) Accept skill re-runs
eligibility.cjson the posted comment URL and requiresrecord-presentbefore the label -- resolved in 4872e2e. - (copilot) Delivery worker and pipeline child require
contact_confirmation_needed: false; unattended stops otherwise -- resolved in 4872e2e. - (copilot) Deterministic
APPROVAL_URLdiscovery from the latest roster approve record; scheduler never guesses a URL -- resolved in 4872e2e. - (copilot) Eval fixture pipeline case encodes the new grant semantics -- resolved in 4872e2e.
- (panel) README/CONTRIBUTING/GOVERNANCE/dev guide: label exception, Canvas Accept behavior, review-contact condition, plain wording -- resolved in 00f29c2.
- (panel) Pipeline gate wording; whitespace-tolerant, explicitly sorted discovery; format-owner pointer -- resolved in 00f29c2.
- (panel) Tests pin the Decision filter and sort, the
/spawn worker-issue-acceptroute, and the fixture C/D semantics -- resolved in 00f29c2. - (ci) New package manifest licensed Apache-2.0 to match main's relicensing -- resolved in 100b6ce.
Copilot signals reviewed
packages/autopilot/autopilot-issue-accept/SKILL.md:150-- LEGIT: label raced a later withdrawal (resolved in 4872e2e).packages/autopilot/autopilot-issue-delivery-worker/.apm/skills/autopilot-issue-delivery-worker/SKILL.md:143-- LEGIT: record-present alone did not prove review-contact agreement (resolved in 4872e2e).packages/autopilot/autopilot-issue-delivery-scheduler/.apm/skills/autopilot-issue-delivery-scheduler/SKILL.md:118-- LEGIT: unattended runs had no deterministic APPROVAL_URL (resolved in 4872e2e).packages/autopilot/autopilot-issue-delivery-worker/.apm/skills/autopilot-issue-delivery-worker/assets/solution-pipeline-prompt.md:50-- LEGIT: eval fixture encoded the old semantics (resolved in 4872e2e).
Regression-trap evidence (mutation-break gate)
test_issue_accept_posts_as_roster_human_and_rechecks_before_label-- deleted the eligibility--approval-url "$COMMENT_URL"guard; test FAILED as expected; guard restored.test_implementation_harnesses_assign_issue_and_pr_not_reviewer-- deletedcontact_confirmation_needed: false, then theDecision: approvefilter; test FAILED each time; guards restored.test_scope_eval_inventory_is_inputs_not_fake_results-- reverted the fixture's no-second-confirmation rule; test FAILED as expected; restored.
Lint contract
ruff check and ruff format --check (ruff 0.15.12, CI scope), pylint R0801, lint-auth-signals.sh, and lint-architecture-boundaries.sh all clean. apm audit --ci: 10/10 checks passed. Targeted tests: 55 passed (governance, triage-advisory hashes, licensing); canvas node tests: 46 passed.
CI
All checks green at 100b6ce (23 success, 2 neutral, 1 skipped; license/cla success) after 1 CI fix iteration.
Mergeability status
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | mergeStateStatus | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #3105 | 100b6ce |
ship_now | 1 | 9 | 0 | 1 | green | MERGEABLE | BLOCKED | pending required CODEOWNER review |
Convergence
1 outer iteration; 1 Copilot round. Final panel stance: ship_now. Ready for maintainer review.
Full per-persona findings
Python Architect
- [nit] Record-format sentinel appears in three prose files; add a pointer to the canonical format owner at
packages/autopilot/autopilot-issue-delivery-worker/.apm/skills/autopilot-issue-delivery-worker/SKILL.md-- folded. - [nit] Registry + Guard + Template Method applied cleanly; no additional pattern needed.
Supply Chain Security Expert
- [recommended] Pipeline prompt steps 1-2 read as contradictory on whether record-present is permission at
solution-pipeline-prompt.md:46-- folded. - [nit] Discovery did not tolerate leading whitespace the parser accepts -- folded.
- [nit] Discovery relied on implicit API order -- folded (explicit
sort_by(.created_at, .id)).
Doc Writer
- [recommended] README Shared rules said no skill writes
status/acceptedatpackages/autopilot/README.md:53-- folded. - [recommended] Docs omitted the review-contact condition at
CONTRIBUTING.md:96-- folded. - [nit] GOVERNANCE jargon at
GOVERNANCE.md:83-- folded.
Test Coverage Expert
- [recommended]
Decision: approvediscovery filter was unpinned attests/unit/test_workflow_actor_contract.py:302-- folded. - [nit] No
/spawn worker-issue-acceptserver test -- folded. - [nit] Eval fixture C/D semantics not content-pinned -- folded.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
…ptance-scope Co-authored-by: Copilot App <[email protected]>
Avoids landing-order conflicts with other queued PRs. Co-authored-by: Copilot App <[email protected]>
Lane L: main merged for landing
This comment was generated by an AI agent (Lane L landing desk) on behalf of Daniel Meppiel (@danielmeppiel). |
Resolve packages/autopilot/README.md by keeping both intents: status/deferred stays human-owned (PR triage only recommends it), and #3105's autopilot-issue-accept exception for adding status/accepted after a roster human approves is preserved. Lockfile auto-merged; apm audit --ci passes with no drift. Co-authored-by: sergio-sisternes-epam <[email protected]> Co-authored-by: Copilot App <[email protected]>


Issue Accept no longer stamps
status/acceptedand leaves delivery with nothing to honour. A newautopilot-issue-acceptskill drafts a scope comment from the latest triage brief, posts it only after exact chat approval by a GOVERNANCE roster human, then applies the label. A current uneditedrecord-presentcomment is the delivery grant, including unattended runs. Pull-request Accept is unchanged.Important
The eligibility tool stays neutral (
authorizes_implementation: false). The grant is worker policy, not a second authority implementation.Problem (WHY)
status/acceptedwith no<!-- apm-scope:v1 -->comment. Delivery and validation then rejected the run.GOVERNANCE.mdsaid the eligibility report "never grants implementation permission" and then required fresh confirmation before any automation implemented changes. That left no path from an accepted issue to a worker.Why these matter: the posted comment is the record a later worker is allowed to trust, and the canvas must not invent that record by labeling. "Add what the agent lacks, omit what it knows" — the skill exists because a label is not a scope.
Approach (WHAT)
gh api usermust be that roster human. No bot token, noautopilot-comment.updated_atequalscreated_at.record-presentas the grant, including ORIGINunattended. Every other eligibility state still stops.Implementation (HOW)
packages/autopilot/autopilot-issue-accept/— new flat skill. Draft fence is only the parser-legal record. Conflict notes stay in chat.autopilot-maintainer-canvaslogic.mjs/ui.mjs—worker-issue-acceptspawn.planLabelMutationthrows for issue accept. PR accept still adds the label.record-presentis the grant. No second in-session confirmation. Re-read before mutate and before the PR.scripts/governance/authority.cjs— not changed.authorizes_implementationstays false. Roster, unedited, and withdrawal checks stay in that tool.GOVERNANCE.md,CONTRIBUTING.md, development guide, autopilot README,CHANGELOG.md— the worker-policy split, not a new ledger.apm.yml/apm.lock.yaml/.agents/skills/— direct dependency, same summon-by-name pattern as the merge worker.apm audit --cireports no drift.Diagrams
Legend: yellow is the new accept path. The canvas never writes the label; delivery starts only after GitHub shows an unedited roster comment.
sequenceDiagram participant Canvas participant Accept as issue-accept participant Human participant GH as GitHub participant Delivery as delivery worker Canvas->>Accept: spawn worker-issue-accept Note over Canvas: does not add status/accepted Accept->>GH: read latest triage brief rect rgb(255, 247, 200) Note over Accept,Human: NEW exact-text chat approval Accept->>Human: draft fence Human-->>Accept: approve exact text Accept->>GH: gh api user Accept->>GH: post comment as that user Accept->>GH: re-read unedited comment Accept->>GH: add status/accepted end Delivery->>GH: eligibility record-present Note over Delivery: grant, including unattendedTrade-offs
authorizes_implementationto true. That would make the report a second authority. Worker prose is the grant; a deleted comment still stops the next re-read.origin: actor-session. Unattended delivery may implement only after a record already exists.Benefits
status/acceptedexists.withdrawn,needs-evidence,error, or a missing tool.Validation
uv run --extra dev ruff checkandruff format --checkonsrc/,tests/, and the architecture linter: all checks passed, 1882 files already formatted.bash scripts/lint-auth-signals.sh: auth-signal lint clean.uv run apm audit --ci: all 10 checks passed, includingno drift detected against lockfile.Governance and hash tests (31 passed)
Canvas tests covering issue-accept spawn and the label refusal were run on this change set before the lockfile sync. Those canvas files did not change after that run.
Scenario Evidence
status/accepted.packages/autopilot/autopilot-maintainer-canvas/tests/logic.test.mjs"refuses canvas issue accept and still labels a PR"; same title inserver.test.mjslogic.test.mjs"names workers with Domain stage #n and keeps merge behind confirm"tests/unit/test_workflow_actor_contract.py::test_implementation_harnesses_assign_issue_and_pr_not_reviewer;tests/unit/test_governance_consumers.py::test_pipeline_child_rechecks_scope_before_each_mutating_boundaryHow to test
Issue accept #Nrunningautopilot-issue-accept. The issue must not gainstatus/acceptedfrom the button.status/accepted.## Proposed scope brief, let the skill draft the fence. Change one field and confirm it waits again. Approve the exact text as a GOVERNANCE roster user and confirm the comment author is that user and the label lands only after the re-read.record-presentwithout a second chat confirmation. Remove or edit the comment and confirm the next re-read stops.Co-authored-by: Copilot [email protected]