Skip to content

Fix canonical Copilot placeholder checks in daily runtime regression - #11161

Merged
lpcox merged 3 commits into
mainfrom
copilot/fix-copilot-credential-placeholder
Nov 5, 2026
Merged

lpcox merged 3 commits into
mainfrom
copilot/fix-copilot-credential-placeholder

Conversation

Copilot AI commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

All three primary Copilot runtime cases rejected the intended placeholder before inference because the guest assertion expected log-redacted text rather than the canonical value.

  • Credential contract

    • Load the compiled canonical constant shared with the production injector, eliminating duplicated literals.
    • Accept only absent, empty, or exact-placeholder values for all three Copilot credential variables, without logging values.
    • Leave other provider and enclave checks unchanged after reviewing their distinct contracts.
  • Executable regression coverage

    • Replace the fixture’s redacted literal with production credential-builder output.
    • Exercise acceptance, rejection, nondisclosure, and fail-closed behavior when the canonical module is unavailable.
    • Cover version capture and inference across Docker, Cloud Hypervisor, and NVX fixtures while preserving exact proof/response requirements and downstream failure propagation.

Copilot AI changed the title [WIP] Fix Copilot credential-placeholder assertions in daily runtime regression Fix canonical Copilot placeholder checks in daily runtime regression Nov 5, 2026
Copilot AI requested a review from lpcox November 5, 2026 17:45
@lpcox
lpcox marked this pull request as ready for review November 5, 2026 17:52
Copilot AI adaptive review requested due to automatic review settings November 5, 2026 17:52

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 guest regression script conflates an unavailable placeholder contract with credential rejection, requiring distinct fail-closed diagnostics and an updated missing-module assertion.

1 open issue
What changed in this PR

Fixes false credential-isolation failures in the daily runtime regression harness by checking Copilot credentials against the canonical production placeholder.

Changes:

  • Validates all three Copilot credential variables without logging their values.
  • Uses production credential-builder output in fixtures and covers acceptance, rejection, and unavailable-contract failures.
  • Expands fixture coverage for version capture, exact proof/response checks, and downstream failures across Docker, Cloud Hypervisor, and NVX.
File Description
scripts/​ci/​run-agent-regression-guest.sh Loads the canonical Copilot placeholder and validates credential isolation.
scripts/​ci/​agent-runtime-regression.test.ts Updates production-backed fixtures and expands credential and cross-runtime regression coverage.

Review effort: Max (auto)

test -n "${HTTPS_PROXY:?}"
test -z "${GH_TOKEN:-}${GITHUB_TOKEN:-}${ANTHROPIC_API_KEY:-}" || fail 'A host credential variable reached the guest'
test -z "${COPILOT_GITHUB_TOKEN:-}" || test "$COPILOT_GITHUB_TOKEN" = '******' || fail 'Copilot credential is not isolated'
node <<'NODE' || fail 'Copilot credential is not isolated'
@lpcox

lpcox commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

Copilot AI commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address review feedback

Distinguished an unavailable or empty canonical placeholder contract from a rejected credential, preserving fail-closed behavior. Added assertions for both cases; targeted regression tests pass. Commit: 726d1ac.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 93.78% 93.77% 📉 -0.01%
Statements 92.33% 92.32% 📉 -0.01%
Functions 93.07% 93.07% ➡️ +0.00%
Branches 86.57% 86.56% ➡️ -0.01%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/nvx/one-shot-process.ts 84.0% → 81.5% (-2.47%) 76.8% → 74.7% (-2.11%)
src/enclave/host-executor-server.ts 91.2% → 91.2% (+0.00%) 90.1% → 89.8% (-0.29%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@lpcox
lpcox merged commit 3028f71 into main Nov 5, 2026
33 of 35 checks passed
@lpcox
lpcox deleted the copilot/fix-copilot-credential-placeholder branch November 5, 2026 19:08
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.

Fix Copilot credential-placeholder assertions in daily runtime regression

3 participants