Skip to content

Improve extension command contract review coverage - #10820

Merged
Travis Angevine (trangevi) merged 10 commits into
mainfrom
trangevi/improve-contract-command-detection
Nov 4, 2026
Merged

Travis Angevine (trangevi) merged 10 commits into
mainfrom
trangevi/improve-contract-command-detection

Conversation

@trangevi

@trangevi Travis Angevine (trangevi) commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Extension command additions can be missed when registration and constructor changes are in different files. Repeated reviews can also request an experiences spec again for contracts already covered by earlier threads.

The review procedure now traces base/head command registrations across files, records each contract item, and matches earlier threads even when they are grouped, unmarked, resolved, or outdated. Merged findings must name every covered item so later reviews can recognize that coverage. Findings must be anchored on changed diff lines; unchanged constructors are inspected only for context. The companion skill version is bumped to 1.3.

Seven new eval tasks include six contract-review regressions covering cross-file command registration, multiple independent commands, command-tree-preserving refactors, grouped existing threads, partial thread coverage with a new flag, and explicit item coverage in merged findings, plus a JSON-extraction regression for leading diagnostics, trailing logs, nested objects, and escaped strings.

Validation: the full 15-task suite passed after the initial review fixes. Subsequent targeted duplicate-matching and merged-finding evals passed. waza check, spelling, and whitespace checks passed.

Fixes #10821

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@trangevi
Travis Angevine (trangevi) requested a review from a team as a code owner November 3, 2026 00:19
Copilot AI max review requested due to automatic review settings November 3, 2026 00:19
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
27 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The evaluation fixtures require an out-of-scope service-API thread match and allow comments with incorrect file/side anchors or missing experiences-spec requests to pass.

2 open issues
What changed in this PR

This PR strengthens azd’s extension contract-review tooling to catch commands registered separately from their constructors while avoiding false positives for command-tree-preserving refactors.

Changes:

  • Adds cross-file tracing of base/head registrations, constructors, and parent commands.
  • Expands per-contract coverage tracking and the parent reviewer’s completion audit.
  • Adds three regression evaluations and bumps the companion skill to version 1.3.

Extension user-contract review: not-applicable (0 extension files inspected; 0 new contract comments; 0 existing threads).

File Description
.github/​skills/​extension-user-contract-review/​SKILL.md Bumps the companion skill version to 1.3.
.github/​skills/​extension-user-contract-review/​references/​review.md Defines cross-file command tracing and distinct-contract tracking.
.github/​skills/​extension-user-contract-review/​evals/​tasks/​multiple-command-registrations.yaml Tests separate findings for two new commands.
.github/​skills/​extension-user-contract-review/​evals/​tasks/​command-tree-refactor.yaml Tests that registration refactors produce no contract findings.
.github/​skills/​extension-user-contract-review/​evals/​tasks/​command-registration.yaml Tests command discovery alongside an existing review thread.
.github/​skills/​azd-code-reviewer/​SKILL.md Aligns parent reviewer guidance and completion audits.

Review effort: Max

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings November 3, 2026 16:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The evaluation cases lack changed-line coordinates and a registration-only scenario, leaving inline-anchor behavior and command-path tracing through unchanged source untested.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

Medium severity Test tracing command paths through unchanged declarations

.github/​skills/​extension-user-contract-review/​evals/​tasks/​command-registration.yaml:15

The prompt supplies the resolved command path and places the constructor in an added file, so it does not exercise tracing into unchanged source. Add a registration-only case that supplies the unchanged constructor and parent declarations without spelling out the resolved path. Assert the full command path in the resulting comment.

Medium severity Add changed-line coordinates to the refactor case

.github/​skills/​extension-user-contract-review/​evals/​tasks/​command-tree-refactor.yaml:16

This refactor case supplies no changed-line coordinates, although the harness says tasks provide them. That leaves the zero-comment check untested against valid inline anchors for the extracted registrations. Add LEFT coordinates for the removed calls and RIGHT coordinates for the replacement call and helper.

2 resolved since last review

Review effort: Max

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings November 3, 2026 17:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Merged findings can omit covered inputs, causing prior-thread matching to treat unchanged inputs as uncovered and generate duplicate spec requests.

1 open issue

Review effort: Max

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings November 3, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

2 open issues
1 resolved since last review

Review effort: Lite

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings November 3, 2026 18:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues
2 resolved since last review

Review effort: Lite

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings November 3, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The shared grader’s greedy extraction fails when output contains an earlier diagnostic object, and the regression checks only the task-local selector rather than exercising that shared extraction path.

1 open issue
3 resolved since last review

Review effort: Max

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings November 3, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues
1 resolved since last review

Review effort: Lite

Share bounded review JSON extraction across program graders and keep task assertions readable.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings November 4, 2026 01:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A balanced but invalid trailing JSON-like candidate can make JSON.parse throw, rejecting an earlier valid review instead of continuing to the previous candidate.

1 open issue
3 resolved since last review

Review effort: Max

Continue parsing earlier candidates when trailing JSON-like diagnostics are malformed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings November 4, 2026 17:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because the regression can pass despite missing required shorthand aliases, leaving its coverage unreliable.

No open issues 🎉

1 resolved since last review

Review effort: Max

@trangevi

Copy link
Copy Markdown
Member Author

/check-enforcer override

@trangevi
Travis Angevine (trangevi) merged commit 95a80c7 into main Nov 4, 2026
15 checks passed
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.

Ensure extension command additions are detected during contract review

4 participants