Skip to content

fix(evals): send Copilot integration identity to Decisions - #75859

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan/decision-model-pat-support
Nov 8, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan/decision-model-pat-support

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Standalone Copilot Decisions evals already use Bearer authentication but omit the integration identity that gh-aw-firewall sends. Add Copilot-Integration-Id: agentic-workflows to align these requests with the firewall's default.

The reusable Decisions client accepts an optional integrationId; the evals runtime supplies it only for Copilot, using shared normalization for github-copilot, copilot, and github while preserving usage attribution. OpenAI and generic callers remain unchanged unless explicitly opted in. Documentation and a patch changeset describe the behavior.

Add a CJS integration job using only the built-in Actions token with copilot-requests: write. It makes one synthetic choice request through the real client and requires a named basket_fruit answer of type choice with value apples. This is an API/authentication/protocol smoke check, not statistical model-quality evaluation; it has no confidence threshold or retries. Missing credentials, API errors, and incorrect or malformed answers fail the test. Fork PRs are excluded; repository-write permissions and PAT secrets remain prohibited. The purity guard exempts only .github/workflows/cjs.yml, with regressions rejecting same-basename impostors. Cache cleanup already waits for this job.

Relates to #75637

Validation

  • make fmt-cjs, make lint-cjs, and make agent-report-progress passed for the original client fix; all 83 targeted JavaScript tests passed.
  • The original live-test addition passed typechecking, eight purity-guard regression tests, the current workflow purity guard, and make agent-report-progress-no-test. Actionlint introduced no new diagnostics; the workflow retains eight existing shellcheck info diagnostics.
  • Client changes passed read-only security review. The live integration test ran after explicit security approval.
  • Original live Decisions integration passed on commit 4c2be18cc2076f2a37e8f0258c298026a4ae413b: CJS integration job. Runner logs confirm CopilotRequests: write, one passing predicate test, and zero failures. The job used github.token, not a PAT.
  • Review fixes on commit 12ac2baad7005985d75134b0b4ef2abaacf0a7c5 passed formatting, lint, typechecking, make agent-report-progress-no-test, 86 client/runtime tests, nine purity regressions, and the current workflow guard. The revised smoke assertion also passed eight mocked-fetch success/failure cases. The original live result validates the earlier predicate revision, not the revised categorical assertion; no new live result is claimed here.

Scope and limitations

This validates the client and integration identity with a Copilot-enabled Actions job token. Live PAT acceptance remains unverified; the test does not establish PAT support or prove that omission of the integration header caused the original rejection. Separate unsupported-authentication diagnostics from #75637 remain out of scope.

One original live synthetic Decisions request ran through PR-triggered CI. Review fixes were pushed normally; no additional workflow dispatch was performed.

pelikhan and others added 2 commits November 7, 2026 23:39
Add a CJS integration job that calls the Decisions client with synthetic evidence and copilot-requests: write. Keep inference permission limited to CJS and retain repository-write and secret restrictions.

Co-authored-by: Copilot App <[email protected]>
@pelikhan
pelikhan marked this pull request as ready for review November 8, 2026 07:51
Copilot AI adaptive review requested due to automatic review settings November 8, 2026 07:51
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from PR Specification Reviewer · gpt56 · ~2 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.7K · ◷

Generated by PR Specification Reviewer for #75859

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 8, 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 Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · routed: gpt56 max · ~6 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 118 · ◷

Generated by Ponytail Reviewer for #75859

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 8, 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.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate 🏗️ · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-08T07:54:50Z
review_event: COMMENT
top_themes: [workflow cache lifecycle, integration-job dependencies]
files_reviewed: [.github/workflows/cjs.yml, actions/setup/js/decisions_client.cjs, actions/setup/js/run_evals.cjs, scripts/check-cgo-cjs-workflow-purity.sh]
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷
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.

Static review completed. I found one actionable workflow-lifecycle issue: cleanup-cache should wait for decisions-integration before deleting the shared checkout cache and completing the aggregate job. The live test design and provider-header changes otherwise look consistent from the changed-line review; no tests were run per review instructions.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again

Comment thread .github/workflows/cjs.yml Resolved

@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 /tdd and /codebase-design. No blocking issues; three non-blocking suggestions are inline.

📋 Key Themes & Highlights

Key Themes

  • Live test flakiness: the required CJS job asserts probability >= 0.9 on one sample from a stochastic model.
  • Provider gating: the header is keyed on the exact string github-copilot, while resolve_model_alias.cjs treats it as one of several aliases. Latent today because Go emits only that value.
  • Purity exemption scope: the cjs.yml exemption matches the basename rather than the repository path.

Positive Highlights

  • ✅ Header is sent only when integrationId is set, so OpenAI and generic callers are unchanged. I confirmed this with a fake-fetch check.
  • ✅ Purity guard keeps contents: write and PAT secrets rejected for CJS, with regression tests (8/8 passing locally).
  • ✅ The fork-PR guard on the new job matches the existing pattern.
  • ✅ The changeset, README, and evals.md updates describe the behavior.

Not verified

  • The live Decisions call needs a Copilot-enabled token, so I did not run it. I checked the workflow YAML from HEAD, not the working tree, which has an unrelated uncommitted edit to cjs.yml.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 5.4K
Comment /matt to run again

Comment thread actions/setup/js/run_evals.cjs Resolved

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

Dependabot PRs still pass the job condition, but their read-only GITHUB_TOKEN causes the live request to fail, introducing unrelated CJS check failures.

1 open issue
What changed in this PR

This PR aligns standalone Copilot Decisions evals with the firewall’s integration identity while preserving Bearer authentication and leaving OpenAI requests unchanged. It does not establish PAT support or address the authentication diagnostics in #75637.

Changes:

  • Add an optional integration identity to the Decisions client and supply it for Copilot evals.
  • Add unit coverage and a live integration job using the built-in Actions token.
  • Update the workflow purity guard, documentation, and patch changeset.
File Description
scripts/​check-cgo-cjs-workflow-purity.sh Allow Copilot inference permissions in CJS workflows.
scripts/​check-cgo-cjs-workflow-purity_test.sh Cover the permission exception and retained restrictions.
actions/​setup/​README.md Document the integration header and live test.
actions/​setup/​js/​scripts/​test_decisions_client.cjs Add a live synthetic predicate test.
actions/​setup/​js/​run_evals.test.cjs Verify provider-specific header selection.
actions/​setup/​js/​run_evals.cjs Supply the integration identity for Copilot evals.
actions/​setup/​js/​decisions_client.test.cjs Test optional header handling and unchanged authentication.
actions/​setup/​js/​decisions_client.cjs Accept and send the optional integration header.
.github/​workflows/​cjs.yml Add the live Decisions integration job.
.github/​aw/​evals.md Explain provider-specific integration identity behavior.
.changeset/​patch-evals-copilot-integration-id.md Record the client fix as a patch release.

Review effort: Balanced (auto)

Comment thread .github/workflows/cjs.yml Resolved
Normalize Copilot provider aliases, restrict the inference permission exemption to the CJS workflow, and use a categorical live smoke assertion.

Co-authored-by: Copilot App <[email protected]>
@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

For the Code Quality Reviewer notice, no code change was needed because the notice contains no separate change request. The actionable inline feedback was handled separately, rather than treating this completion status as correctness evidence.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

For the Skills Reviewer notice, no code change was needed because the notice contains no separate change request. Its reported model and routing metadata are not being treated as correctness or scope-acceptance evidence.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

For the Specification Reviewer notice, no code change was needed because the notice contains no separate change request. Its completion status is not being treated as proof that all required work or publication checks passed.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

For the Ponytail Reviewer notice, no code change was needed because the notice contains no separate change request. A successful reported_no_action outcome is not being treated as verification of all required work or publication checks.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

For the Design Decision Gate notice, no code change was needed because this status message contains no concrete change request. Its reported_no_action outcome is not being treated as design acceptance or completion evidence.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

For the Test Quality Sentinel notice, no code change was needed because the notice contains no separate change request. Its reported_no_action outcome is not being treated as proof of adequate coverage or publication readiness.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

Left the reviewer-managed Comment Memory unchanged because this note requests no edits. Its saved review metadata is historical context, not proof that the associated feedback has been addressed.

Keep the live API check on runs with a write-capable job token, preserving fork exclusions and documenting the restriction.

Co-authored-by: Copilot App <[email protected]>
@pelikhan
pelikhan merged commit 2a4655a into main Nov 8, 2026
58 of 61 checks passed
@pelikhan
pelikhan deleted the pelikhan/decision-model-pat-support branch November 8, 2026 08:18
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.2

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.

2 participants