Skip to content

Fix IMP-004 $ref schema resolution - #58411

Open
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/imp-004-fix-checker-false-positives
Open

Fix IMP-004 $ref schema resolution#58411
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/imp-004-fix-checker-false-positives

Conversation

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

IMP-004 treated $ref-based Azure DevOps safe-output schemas as empty, incorrectly reporting 32 missing properties.

  • Schema traversal

    • Resolve local #/$defs/<name> references before collecting properties.
    • Preserve conflict detection across direct and composed schemas.
  • Regression coverage

    • Verify referenced oneOf schemas are recognized.
    • Ensure the genuine ado-update-work-item.status gap remains detectable.

Run: https://github.com/github/gh-aw/actions/runs/33907360580

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 20.6 AIC · ⌖ 8.82 AIC · ⊞ 9.2K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix false positives in IMP-004 safe-output conformance check Fix IMP-004 $ref schema resolution Sep 4, 2026
Copilot AI requested a review from pelikhan September 4, 2026 06:47
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Category: bug | Risk: medium | Score: 52 (impact 34 + urgency 10 + quality 8) | Action: batch_review | Batch: none

Generated by 🔧 PR Triage Agent · copilot · mai10 · 22.2 AIC · ⌖ 2.85 AIC · ⊞ 15.1K ·

1 similar comment
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Category: bug | Risk: medium | Score: 52 (impact 34 + urgency 10 + quality 8) | Action: batch_review | Batch: none

Generated by 🔧 PR Triage Agent · copilot · mai10 · 22.2 AIC · ⌖ 2.85 AIC · ⊞ 15.1K ·

@pelikhan
pelikhan marked this pull request as ready for review September 4, 2026 15:26
Copilot AI balanced review requested due to automatic review settings September 4, 2026 15:26
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR (only a shell script test check-safe-outputs-conformance_test.sh was added, which is outside the scored scope of Go/_test.go and JS/.test.cjs files). Test Quality Sentinel skipped.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer failed. Please review the logs for details.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by Ponytail Reviewer for #58411

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed: PR does not have the 'implementation' label and has <=100 new lines of code in business logic directories.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

🔎 Code quality review by PR Code Quality Reviewer

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.

🟢 Approval recommended

The implementation matches the reported failure mode and includes targeted regression coverage.

Pull request overview

Fixes IMP-004 false positives by resolving local schema references during safe-output property traversal.

Changes:

  • Resolve #/$defs/... references while preserving conflict detection.
  • Add regression coverage for Azure DevOps schemas and the genuine status gap.
  • Register the test in test-scripts.
File summaries
File Description
scripts/check-safe-outputs-conformance.sh Resolves referenced schema definitions.
scripts/check-safe-outputs-conformance_test.sh Tests referenced Azure DevOps schemas.
Makefile Runs the new regression test.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /diagnosing-bugs — small, targeted fix with one gap in regression coverage.

📋 Key Themes & Highlights

Key Themes

  • Root cause correctly addressed: the checker now resolves #/$defs/<name> $refs before collecting properties, which correctly fixes the false-positive IMP-004 reports for $ref-based schemas (e.g. oneOf alternatives).
  • Conflict detection untested: the new "conflicting schema definitions" branch has no dedicated test forcing a collision between a direct property and one resolved via $ref. The added check-safe-outputs-conformance_test.sh only verifies the expected single remaining finding, not this new failure path.

Positive Highlights

  • ✅ Regression test added and wired into make test-scripts.
  • ✅ Fix is minimal, scoped, and directly targets the root cause rather than papering over the symptom.

Note: pr-triage was not invoked (skills directory unavailable in this run); classification and high-impact file selection used the fallback heuristic (largest diff file, scripts/check-safe-outputs-conformance.sh).

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 20.8 AIC · ⌖ 14.6 AIC · ⊞ 10.3K
Comment /matt to run again

Comments that could not be inline-anchored

scripts/check-safe-outputs-conformance.sh:26

[/diagnosing-bugs] Root cause fix looks correct (resolving #/$defs/&lt;name&gt; before collecting properties), but the new conflict-detection branch (lines 27-29) has no regression test exercising it — the added test only checks the $ref-resolution count/output, not a case where a direct property collides with a $ref-resolved one.

<details>
<summary>💡 Suggested addition</summary>

Add a fixture schema (or synthetic node passed directly to properties()) where a property name exists both …

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

reviewed_at: 2026-09-04T15:31:13.969+00:00
review_event: COMMENT
top_themes:
  - no blocking issues found in changed lines
files_reviewed:
  - Makefile
  - scripts/check-safe-outputs-conformance.sh
  - scripts/check-safe-outputs-conformance_test.sh
comment_count: 0

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 11.5 AIC · ⌖ 7.3 AIC · ⊞ 23.5K ·
Comment /review to run again

@github-actions github-actions Bot 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.

No blocking issues in the changed lines. The $ref traversal fix addresses the false positives directly, preserves conflict detection when merging composed schemas, and the regression test covers the reported path while keeping the one genuine schema gap visible.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 11.5 AIC · ⌖ 7.3 AIC · ⊞ 23.5K
Comment /review to run again

@github-actions github-actions Bot 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.

Verified: the $ref/#/$defs/ resolution fix in properties() correctly resolves nested Azure DevOps schemas (checked ado-update-work-item, ado-create-work-item, and non-ADO schemas like create-issue all now return their full property sets). The new regression test (check-safe-outputs-conformance_test.sh) is shellcheck-clean and correctly asserts only the genuine ado-update-work-item.status gap remains. Makefile wiring is correct. No blocking issues found — this is a clean, well-tested bug fix.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 36.2 AIC · ⌖ 14.3 AIC · ⊞ 8.3K

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot This PR looks ready for a forward-progress pass.

  • Branch refresh was requested by sous-chef for run https://github.com/github/gh-aw/actions/runs/33890946663.
  • Failed checks to investigate: js-typecheck, agent, JS Tests (shard 4/4), impacted-js-tests, lint-js, Artifact API Integration.
  • Please run the pr-finisher skill, investigate the failing jobs, and either push the next fix or report the blocker clearly.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • github.com
  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 20.8 AIC · ⌖ 8.72 AIC · ⊞ 9.2K ·
Comment /souschef to run again

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot This PR looks ready for a forward-progress pass.

Investigated the reported failures. The current PR commit’s JS checks, lint, artifact integration, and impacted tests are passing. The failed JS shard was a checkout-cache miss; the agent failure was an external workflow/tooling failure; and the Go unit failure is an unrelated existing AWF-version mismatch (trusted requires v0.28.14 while this checkout reports v0.28.13), reproduced by make test. The IMP-004 regression passes locally, and no additional code change is warranted. CI should be re-triggered by a maintainer.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot This PR still has failing checks to investigate.

Please inspect the current failing jobs, refresh the branch if needed, and run the pr-finisher skill once the failures are addressed.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 9.25 AIC · ⌖ 8.65 AIC · ⊞ 9.2K ·
Comment /souschef to run again

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot This PR still has failing checks to investigate.

Inspected all listed jobs. js-typecheck, JS shard 4/4, impacted-js-tests, lint-js, and Artifact API Integration all fail at the initial actions/cache/restore step because the checkout cache key is missing; no project code runs. The agent job fails on the external server/discover MCP method (-32601), not this PR. The targeted IMP-004 regression passes locally, and formatting/lint/test-unit/recompile pass with no changes needed. A maintainer must re-trigger CI; the PR remains blocked on required review/CI state.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Category: bug | Risk: medium | Score: 59 (impact 28 urgency 18 quality 13) | Action: batch_review | Batch: workflow-reliability

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.github.com"

See Network Configuration for more information.

Generated by 🔧 PR Triage Agent · copilot · mai10 · 25.2 AIC · ⌖ 2.93 AIC · ⊞ 15.1K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot CI is currently failing on this PR:

Please fix the failing checks, refresh the branch if needed, and run the pr-finisher skill before pushing the next update.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 20.6 AIC · ⌖ 8.82 AIC · ⊞ 9.2K ·
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator
pr-sous-chef

@copilot The listed failures on this PR look non-code-related from the last investigation, but the PR still needs a clean maintainer-facing status refresh.

  • Please re-check the current failing jobs on HEAD and confirm whether they are still cache/tooling/version-environment failures rather than regressions from this $ref fix.
  • If the IMP-004 fix is still passing locally and no code changes are needed, say that explicitly.
  • After that, run the pr-finisher skill and summarize the exact remaining blocker for maintainers.

Failed checks to reconcile:

  • js-typecheck
  • agent
  • JS Tests (shard 4/4)
  • impacted-js-tests
  • lint-js
  • Artifact API Integration

Generated by PR Sous Chef: https://github.com/github/gh-aw/actions/runs/33908460692

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 33.4 AIC · ⌖ 8.81 AIC · ⊞ 9.2K ·
Comment /souschef to run again

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot CI is currently failing on this PR:

Inspected every listed job. js-typecheck, JS Tests shard 4/4, impacted-js-tests, lint-js, and Artifact API Integration all stop at actions/cache/restore because the checkout cache key is missing; no repository code executes. The agent job fails in the external MCP workflow with server/discover method-not-found. The branch was refreshed to current PR head 19f3566; the IMP-004 regression passes, and make fmt, make lint, make test-unit, make test, and make recompile pass locally. No code fix is warranted; CI must be re-triggered by a maintainer.

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author
pr-sous-chef
```...

Rechecked the current PR head 19f3566. The listed CJS failures remain cache misses at the initial actions/cache/restore step, before checkout or project code; the agent failure remains an external MCP server/discover method-not-found/tooling failure. The branch is refreshed and the IMP-004 $ref regression passes locally. On the refreshed head, make fmt, make lint, make test-unit, make test, and make recompile all pass. No code changes are needed. The exact remaining blocker is maintainer-side: re-trigger CI and provide/complete the required maintainer review; the PR is still marked blocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Safe Outputs Conformance] IMP-004: Checker false-positives on $ref-based ado-* safe-output schemas

4 participants