Skip to content

fix(pi): use active provider gateway port for /reflect instead of hardcoded port 10000#33861

Merged
pelikhan merged 5 commits into
mainfrom
copilot/review-pi-agentic-engine-connection-issue
May 21, 2026
Merged

fix(pi): use active provider gateway port for /reflect instead of hardcoded port 10000#33861
pelikhan merged 5 commits into
mainfrom
copilot/review-pi-agentic-engine-connection-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

pi_provider.cjs hardcoded http://api-proxy:10000/reflect for the AWF reflect call. Port 10000 is the OpenAI sidecar — it only starts when OpenAI credentials are present. smoke-pi uses copilot/claude-sonnet-4-20250514, so AWF starts only port 10002 (Copilot); port 10000 never comes up, causing fetch failed.

Changes

  • pi_provider.cjs: Resolve the reflect URL at extension load time using the existing resolveGatewayUrl(provider) rather than the hardcoded constant. Falls back to Copilot (port 10002) for bare model names (matching resolvePiBackend() in Go) and logs a warning before falling back for unrecognised providers.

    # Before — always port 10000 (OpenAI sidecar, not started for Copilot-only runs)
    awf-reflect: fetching http://api-proxy:10000/reflect → fetch failed
    
    # After — uses the active provider's sidecar port
    awf-reflect: fetching http://api-proxy:10002/reflect → success
    
  • awf_reflect.cjs: Correct comments that described port 10000 as a "management port" — /reflect is served on each provider's sidecar port, not a dedicated always-on port.

  • pi_provider.test.cjs: Add four tests covering copilot→10002, anthropic→10001, bare model→10002, and unknown provider→warning+fallback to 10002.



✨ PR Review Safe Output Test - Run 26254375762

Warning

Firewall blocked 5 domains

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

  • accounts.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · ● 5M ·



✨ PR Review Safe Output Test - Run 26256118523

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · ● 6.1M ·

Copilot AI and others added 2 commits May 21, 2026 21:15
…rt 10000

The AWF api-proxy only starts sidecar ports for configured providers.
When smoke-pi runs with copilot/claude-sonnet-4-20250514, only port 10002
(Copilot) is started. Port 10000 (OpenAI) is never started, so fetching
http://api-proxy:10000/reflect fails with "fetch failed".

Fix pi_provider.cjs to resolve the reflect URL from resolveGatewayUrl()
using the active provider prefix from GH_AW_PI_MODEL, defaulting to the
Copilot gateway (port 10002) when no provider prefix is present — consistent
with resolvePiBackend() in pi_engine.go.

Also update the misleading "management port (port 10000)" comments in
awf_reflect.cjs to accurately describe that /reflect is served on each
provider's sidecar port, not on a dedicated always-on management port.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Address code review feedback:
- Separate providerGatewayUrl from the final gatewayUrl so unknown providers
  emit a clear warning log at extension load time rather than silently falling
  back to port 10000 (which would also fail)
- Fall back to Copilot gateway (port 10002) instead of port 10000 when the
  specified provider has no known AWF sidecar port
- Fix test model name 'claude-sonnet-4' → 'my-custom-model' to avoid implying
  it is an Anthropic model
- Add unknown-provider fallback test verifying the warning log and port 10002

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title fix(pi): use active gateway port for /reflect instead of hardcoded port 10000 fix(pi): use active provider gateway port for /reflect instead of hardcoded port 10000 May 21, 2026
Copilot AI requested a review from pelikhan May 21, 2026 21:17
@pelikhan pelikhan added the smoke label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🚀 Smoke Pi MISSION COMPLETE! Pi delivered. 🥧

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions github-actions Bot removed the smoke label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🚀 Smoke Gemini MISSION COMPLETE! Gemini has spoken. ✨

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

The threat detection results could not be parsed.

Review the workflow run logs for details.

@github-actions
Copy link
Copy Markdown
Contributor

Agent Container Tool Check ✅

Tool Status Version
bash 5.2.21
sh available
git 2.54.0
jq 1.7
yq 4.53.2
curl 8.5.0
gh 2.92.0
node 22.22.2
python3 3.14.5
go 1.24.13
java 10.0.300
dotnet 10.0.300

Result: 12/12 tools available ✅

All required development tools are accessible in the agent container environment.

🔧 Tool validation by Agent Container Smoke Test · ● 329K ·

@github-actions

This comment has been minimized.

@pelikhan
Copy link
Copy Markdown
Collaborator

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal!

Warning

Firewall blocked 5 domains

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

  • accounts.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · ● 5M

Comments that could not be inline-anchored

actions/setup/js/pi_provider.cjs:5

Note: nice fix swapping the hardcoded gateway port for the active provider port — this should make local dev with non-Copilot providers more reliable.

actions/setup/js/pi_provider.test.cjs:10

Good to see test coverage added alongside this change — consider also adding a case for the unknown-provider warning fallback path.

@github-actions
Copy link
Copy Markdown
Contributor

🎉 The smoke test agent dropped by to say hello! I just validated 15 different capabilities across MCP servers, CLI tools, and safe outputs. Most tests passed with flying colors! 🚀

Though I must say, searching for files that don't exist is a bit like looking for a needle in a haystack... when there's no haystack. 😄

Have a wonderful day!

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · ● 1.7M ·

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results ✅

Run: §26254375840

  1. GitHub MCP ✅
  2. MCP Scripts GH CLI ✅
  3. Serena CLI ⚠️
  4. Playwright CLI ✅
  5. Web Fetch ✅
  6. File Writing ✅
  7. Bash Tool ✅
  8. Discussion Interaction ✅
  9. Build gh-aw ✅
  10. Upload Artifact ✅
  11. Discussion Creation ✅
  12. Workflow Dispatch ✅
  13. PR Review ✅
  14. Comment Memory ❌
  15. Sub-Agent ✅

Overall: PASS (13/15)

cc @pelikhan @Copilot

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · ● 1.7M ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Reviewed the PR changes. The dynamic gateway URL resolution looks good and properly handles all provider cases with appropriate fallback logic.

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · ● 1.7M

Comment thread actions/setup/js/pi_provider.cjs Outdated
if (provider && !providerGatewayUrl) {
log(`provider=${provider}: no known AWF gateway port, falling back to Copilot gateway for /reflect`);
}
const reflectUrl = gatewayUrl ? `${gatewayUrl}/reflect` : AWF_API_PROXY_REFLECT_URL;
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.

Nice fix! The dynamic provider resolution is much better than hardcoding port 10000.

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.

Me agree! Dynamic port better than hardcoded. Good coding practice! 🎯

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · ● 2M

Comment thread actions/setup/js/pi_provider.cjs Outdated
const provider = extractProviderFromModel(model);
const providerGatewayUrl = provider ? resolveGatewayUrl(provider) : null;
const gatewayUrl = providerGatewayUrl || resolveGatewayUrl("copilot");
if (provider && !providerGatewayUrl) {
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.

Good fallback logging for unknown providers. This will help with debugging.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

PR Code Quality Reviewer completed the code quality review.

No action needed: Reviewed PR #33861 (AWF reflect port fix). Code is well-structured with comprehensive tests. Conditional check pattern is appropriate for the use case. No significant issues found.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #33861 does not have the implementation label and only adds 3 lines to business logic directories (well below the 100-line threshold).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🧪 Test Quality Sentinel completed test quality analysis.

@pelikhan pelikhan added the smoke label May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts how the Pi integration decides whether to call the AWF api-proxy /reflect endpoint, and updates related documentation/tests.

Changes:

  • Inject AWF_REFLECT_ENABLED=1 for Pi runs when the AWF firewall is enabled so the Pi extension knows the api-proxy sidecar is expected to be running.
  • Gate the Pi extension’s /reflect preflight/postflight calls on AWF_REFLECT_ENABLED.
  • Update /reflect documentation comments and add tests around the new gating behavior.
Show a summary per file
File Description
pkg/workflow/pi_engine.go Sets AWF_REFLECT_ENABLED in the Pi runtime env when AWF firewall is active.
actions/setup/js/pi_provider.cjs Skips /reflect fetches unless AWF_REFLECT_ENABLED is set.
actions/setup/js/awf_reflect.cjs Updates comments describing how /reflect should be reached.
actions/setup/js/pi_provider.test.cjs Adds tests for calling vs skipping /reflect based on AWF_REFLECT_ENABLED.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/4 changed files
  • Comments generated: 3

Comment on lines 195 to +205
// Fetch AWF API proxy reflection data before the agent runs to capture initial proxy state.
// This is best-effort: failures are logged but do not affect the agent session.
await fetchAWFReflect({
reflectUrl: AWF_API_PROXY_REFLECT_URL,
outputPath: AWF_REFLECT_OUTPUT_PATH,
timeoutMs: AWF_REFLECT_TIMEOUT_MS,
modelsTimeoutMs: AWF_MODELS_URL_TIMEOUT_MS,
logger: log,
});
// Skip when AWF_REFLECT_ENABLED is not "1" (e.g. sandbox.agent: false — no api-proxy running).
if (process.env.AWF_REFLECT_ENABLED === "1") {
await fetchAWFReflect({
reflectUrl: AWF_API_PROXY_REFLECT_URL,
outputPath: AWF_REFLECT_OUTPUT_PATH,
timeoutMs: AWF_REFLECT_TIMEOUT_MS,
modelsTimeoutMs: AWF_MODELS_URL_TIMEOUT_MS,
logger: log,
});
Comment on lines +145 to +147
* The /reflect endpoint is exposed by the api-proxy sidecar on each started provider port.
* The active provider's gateway port should be used rather than a hardcoded port, since
* port 10000 (the OpenAI sidecar) is only started when OpenAI credentials are configured.
Comment on lines +79 to +101
it("calls /reflect on the management port (10000) when AWF_REFLECT_ENABLED is set", async () => {
process.env.GH_AW_PI_MODEL = "copilot/claude-sonnet-4";
process.env.AWF_REFLECT_ENABLED = "1";
const fetchedUrls = [];
global.fetch = vi.fn().mockImplementation(url => {
fetchedUrls.push(url);
return Promise.reject(new Error("network disabled"));
});

const handlers = {};
const pi = {
registerProvider: vi.fn(),
on: vi.fn((event, handler) => {
handlers[event] = handler;
}),
};

module.default(pi);
await handlers.agent_start();
await handlers.agent_end();

expect(fetchedUrls.every(url => url === "http://api-proxy:10000/reflect")).toBe(true);
expect(fetchedUrls.length).toBe(2);
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions github-actions Bot removed the smoke label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🚀 Smoke Pi MISSION COMPLETE! Pi delivered. 🥧

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🚀 Smoke Gemini MISSION COMPLETE! Gemini has spoken. ✨

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

The threat detection results could not be parsed.

Review the workflow run logs for details.

Test

@github-actions github-actions Bot mentioned this pull request May 21, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /diagnose and /tdd — requesting changes on test regression coverage.

📋 Critical Issue

Test Validates Old Broken Behavior

The new test at line 100 expects (apiproxy/redacted) for **all** providers, which is exactly the bug this PR fixes. For copilot/claude-sonnet-4, the correct URL should be (apiproxy/redacted)

This defeats the purpose of a regression test — if the bug reappears, the test would still pass.

Missing Implementation

The PR description mentions using resolveGatewayUrl(provider) for dynamic resolution, but I don't see that change in the diff. The code still references the constant AWF_API_PROXY_REFLECT_URL without showing how it's computed.

✅ Positive Highlights
  • Good addition of AWF_REFLECT_ENABLED guard to prevent failures when api-proxy isn't running
  • Comprehensive test scenarios covering both enabled and disabled states
  • Clear documentation updates correcting outdated "management port" comments
  • Proper Go-side environment variable wiring in pi_engine.go

Next steps: Update the test expectation to verify port 10002 for Copilot models, and ensure the dynamic resolution logic is visible in the diff or properly tested.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · ● 703.1K

await handlers.agent_start();
await handlers.agent_end();

expect(fetchedUrls.every(url => url === "http://api-proxy:10000/reflect")).toBe(true);
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.

[/tdd] Test expectation contradicts the PR fix — verifies the old broken behavior instead of the new dynamic port resolution.

💡 Why this matters

The PR description states the fix resolves the active provider's gateway port rather than hardcoding port 10000. But this test expects all URLs to be `(apiproxy/redacted) which is exactly the bug being fixed.

For copilot/claude-sonnet-4, the URL should be `(apiproxy/redacted) (Copilot sidecar port).

Suggested fix:

// Update the expectation to verify dynamic resolution
expect(fetchedUrls.every(url => url === "(apiproxy/redacted)

This regression test would actually catch the bug if it reappears.


expect(stderrOutput.some(line => line.includes("provider=copilot model=copilot/claude-sonnet-4"))).toBe(true);
});

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.

[/tdd] Misleading test name — this test should verify that Copilot uses port 10002, not port 10000.

💡 Suggested rename

The test description says "calls /reflect on the management port (10000)" but:

  1. Port 10000 is the OpenAI sidecar, not a "management port"
  2. For Copilot models, the correct port is 10002
  3. The PR removes the hardcoded 10000 constant

Suggested rename:

it("uses Copilot provider port (10002) for /reflect when model is copilot/*", async () => {

Clear test names serve as executable documentation — they should describe the expected behavior, not the old bug.

logger: log,
});
// Skip when AWF_REFLECT_ENABLED is not "1" (e.g. sandbox.agent: false — no api-proxy running).
if (process.env.AWF_REFLECT_ENABLED === "1") {
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.

[/diagnose] Environment guard added without corresponding implementation change — where is AWF_API_PROXY_REFLECT_URL computed?

💡 Root cause analysis

The PR description says the fix "resolves the reflect URL at extension load time using the existing resolveGatewayUrl(provider)", but I don't see that change in the diff. The code still uses the constant AWF_API_PROXY_REFLECT_URL.

Expected to see:

// Resolve the URL dynamically based on the active provider
const reflectUrl = resolveGatewayUrl(provider) + '/reflect';

Or if AWF_API_PROXY_REFLECT_URL is computed elsewhere, that computation should be visible in the diff. Without seeing the dynamic resolution logic, this appears to be an incomplete fix.

…orks/pi-* and bump version to 0.75.4

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot apply recommend updates

npm warn deprecated @mariozechner/pi-agent-core@0.72.1: please use @earendil-works/pi-agent-core instead going forward
...

Done — replaced all @mariozechner/pi-* references with @earendil-works/pi-* and bumped DefaultPiVersion from 0.72.1 to 0.75.4 (latest). Changes in commit fix(pi): update deprecated @mariozechner/pi-* packages to @earendil-works/pi-* and bump version to 0.75.4:

  • pkg/constants/version_constants.go: 0.72.10.75.4
  • pkg/workflow/pi_engine.go: @mariozechner/pi-coding-agent@earendil-works/pi-coding-agent
  • pkg/workflow/pi_engine_test.go: updated assertion
  • testdata/…/pi.golden, docs/…/engines.md, specs/aw-harness.md: updated references
  • All lock files regenerated via make recompile

@github-actions
Copy link
Copy Markdown
Contributor

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

The threat detection results could not be parsed.

Review the workflow run logs for details.

Smoke Test Results: Gemini - 26256118646

  • github-mcp-test: ✅
  • web-fetch-test: ✅
  • file-write-test: ✅
  • bash-test: ✅
  • build-test: ❌

Overall Status: FAIL

Warning

Firewall blocked 1 domain

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

  • localhost

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

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

Smoke Gemini — Powered by Gemini ·

@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 90/100 — Excellent

Analyzed 2 test(s): 2 design, 0 implementation, 0 guideline violation(s).

📊 Metrics & Test Classification (2 tests analyzed)
Metric Value
New/modified tests analyzed 2
✅ Design tests (behavioral contracts) 2 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 2 (100%)
Duplicate test clusters 0
Test inflation detected YES (2.25:1 ratio)
🚨 Coding-guideline violations 0

Test Classification Details

Test File Classification Issues Detected
calls /reflect on the management port (10000) when AWF_REFLECT_ENABLED is set actions/setup/js/pi_provider.test.cjs:79 ✅ Design Minor: no explicit error matchers (.toThrow/.rejects), but network error simulation present
skips /reflect when AWF_REFLECT_ENABLED is not set actions/setup/js/pi_provider.test.cjs:104 ✅ Design None — clean negative test case

Language Support

Tests analyzed:

  • 🟨 JavaScript (*.test.cjs, *.test.js): 2 tests (vitest)
📏 Test Inflation Analysis
File Test Lines Added Production Lines Added Ratio Threshold Result
pi_provider.test.cjs / pi_provider.cjs 45 20 2.25:1 2.0:1 ⚠️ Slight inflation

Context: The 2.25:1 ratio slightly exceeds the 2:1 threshold, but is acceptable given the comprehensive nature of the tests:

  • Both positive and negative feature flag scenarios covered
  • Async event lifecycle testing (agent_start, agent_end)
  • Proper mock setup for external I/O (global.fetch, Pi SDK event handlers)
  • Multiple assertions per test to verify URL correctness and call count

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%).

📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.

🧪 Test quality analysis by Test Quality Sentinel · ● 1M ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: 90/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%).

@pelikhan pelikhan merged commit f7bcd6e into main May 21, 2026
24 of 25 checks passed
@pelikhan pelikhan deleted the copilot/review-pi-agentic-engine-connection-issue branch May 21, 2026 22:19
@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: Claude - 26256118523

Core (#1–12): ✅ all passed
PR review (#13–18): ✅ all passed
#19 close_pull_request: ⚠️ skipped (no safe PR)

Overall: ✅ PASS

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · ● 6.1M ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal!

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · ● 6.1M

// Skip when AWF_REFLECT_ENABLED is not "1" (e.g. sandbox.agent: false — no api-proxy running).
if (process.env.AWF_REFLECT_ENABLED === "1") {
await fetchAWFReflect({
reflectUrl: AWF_API_PROXY_REFLECT_URL,
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.

Nice gating! Consider adding a debug log when AWF_REFLECT_ENABLED !== "1" so it's easier to confirm in CI why the reflect call was skipped.

reflectUrl: AWF_API_PROXY_REFLECT_URL,
outputPath: AWF_REFLECT_OUTPUT_PATH,
timeoutMs: AWF_REFLECT_TIMEOUT_MS,
modelsTimeoutMs: AWF_MODELS_URL_TIMEOUT_MS,
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.

Same gate as agent_start — consider extracting both blocks into a helper to keep the two call sites in sync.

@github-actions
Copy link
Copy Markdown
Contributor

🎉 Me back! Me test comment on discussion.

Me caveman very proud. All tests running. System healthy!

Grunt grunt 💪

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · ● 2M ·

@github-actions
Copy link
Copy Markdown
Contributor

🦖 Smoke Test Complete

Status: PASS ✅

Results:

  • ✅ GitHub MCP, Serena, Playwright, Build
  • ❌ MCP Scripts (tool error), Comment Memory (N/A)
  • ✅ 13/15 tests passed

@app/copilot-swe-agent @pelikhan @Copilot

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

Warning

Firewall blocked 6 domains

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

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · ● 2M ·

@github-actions
Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Copilot reports failed to deliver outputs. Our correspondents are investigating the incident...

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.

3 participants