Skip to content

Unexport LINUX_CAPABILITY_MAP from capability-filter.ts - #7928

Merged
lpcox merged 2 commits into
mainfrom
copilot/export-linux-capability-map
Aug 31, 2026
Merged

Unexport LINUX_CAPABILITY_MAP from capability-filter.ts#7928
lpcox merged 2 commits into
mainfrom
copilot/export-linux-capability-map

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

LINUX_CAPABILITY_MAP was exported from src/capability-filter.ts but only ever consumed internally by filterCapDrop(), unnecessarily widening the public API of a security-critical module.

Changes

  • Removed export from LINUX_CAPABILITY_MAP, making it a private implementation detail of filterCapDrop().
  • Exposed the map to unit tests via the repo's existing testHelpers convention (@internal + ts-prune-ignore-next) instead of a direct export.
  • Updated capability-filter.test.ts to pull the map from testHelpers rather than importing it directly.
-export const LINUX_CAPABILITY_MAP: Record<string, number> = {
+const LINUX_CAPABILITY_MAP: Record<string, number> = {
   ...
 };
+
+/** @internal Exposed for unit tests only. */
+// ts-prune-ignore-next
+export const testHelpers = { LINUX_CAPABILITY_MAP };

Copilot AI changed the title [WIP] Remove unused export LINUX_CAPABILITY_MAP from capability-filter.ts Unexport LINUX_CAPABILITY_MAP from capability-filter.ts Aug 31, 2026
Copilot AI requested a review from lpcox August 31, 2026 21:35
@lpcox
lpcox marked this pull request as ready for review August 31, 2026 21:36
Copilot AI balanced review requested due to automatic review settings August 31, 2026 21:36

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 focused API cleanup follows established repository conventions without changing runtime behavior.

Pull request overview

Makes the Linux capability map private while retaining test access through the established internal helper convention.

Changes:

  • Removes the direct LINUX_CAPABILITY_MAP export.
  • Updates unit tests to access it through testHelpers.
File summaries
File Description
src/capability-filter.ts Privatizes the map and adds a test-only helper export.
src/capability-filter.test.ts Uses testHelpers for map assertions.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

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

@github-actions

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.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

Warning

Firewall blocked 2 domains

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

  • msfeed25.pkgs.visualstudio.com
  • registry.npmjs.org

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

network:
  allowed:
    - defaults
    - "msfeed25.pkgs.visualstudio.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini reports failed. Facets need polishing...

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

Warning

Firewall blocked 1 domain

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

  • example.com

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

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

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Docker Sbx

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@lpcox
lpcox deployed to aoai-model August 31, 2026 22:26 — with GitHub Actions Active
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

Warning

Firewall blocked 1 domain

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

  • api.anthropic.com

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

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

See Network Configuration for more information.

Generated by Smoke Claude for #7928

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

Generated by Build Test Suite for #7928

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Contribution Check completed successfully!

No contribution-guideline issues found in PR #7928. The change is small, stays in src/, includes a matching unit test update, updates the PR description with a related issue reference, and does not require documentation changes.

Generated by Contribution Check for #7928

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (api.github.com) reachable — HTTP 200
✅ Blocked domain (example.com) denied — CONNECT tunnel 403

Overall: PASS

@lpcox

Warning

Firewall blocked 1 domain

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

  • example.com

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

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

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Status
API ✅ PASS
gh CLI ✅ PASS
File ✅ PASS

Overall result: PASS

Warning

Firewall blocked 1 domain

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

  • api.anthropic.com

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

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

See Network Configuration for more information.

Generated by Smoke Claude for #7928 · claude · haiku45 · 58.2 AIC · ⊞ 4.5K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode

PASS — All tests successful

  • ✅ GitHub MCP connectivity verified
  • ✅ HTTP connectivity: 200 OK
  • ✅ File write/read test passed
  • ✅ BYOK inference working (direct mode via api-proxy → api.githubcopilot.com)

Running in direct BYOK mode with COPILOT_PROVIDER_API_KEY forwarded to sidecar. Agent inference routed through authenticated api-proxy.

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Engine @lpcox

Overall: PASS

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: GitHub Actions Services Connectivity — FAIL

  • Redis PING: ❌ (Temporary failure in name resolution)
  • PostgreSQL pg_isready: ❌ (no response)
  • PostgreSQL SELECT 1: ❌ (could not translate host name "host.docker.internal")

Overall: FAIL — DNS resolution for host.docker.internal failed inside the AWF sandbox; no connectivity checks succeeded.

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test

  • PR: Unexport LINUX_CAPABILITY_MAP from capability-filter.ts
  • Reviewed: fix(ci): match staged KVM processes
  • Reviewed: fix: avoid self-matching KVM process probes
  • GitHub MCP review: ❌
  • safeinputs-gh PR query: ❌
  • Playwright title check: ✅
  • File write/read: ✅
  • Discussion interaction: ❌
  • Build (npm ci && npm run build): ✅
  • Overall: FAIL

Warning

Firewall blocked 2 domains

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

  • msfeed25.pkgs.visualstudio.com
  • registry.npmjs.org

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

network:
  allowed:
    - defaults
    - "msfeed25.pkgs.visualstudio.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Docker Sbx Validation

Overall: PASS

cc @lpcox

📰 BREAKING: Report filed by Smoke Docker Sbx
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.14 Python 3.12.14 ✅ YES
Node.js v24.19.0 v22.23.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: FAILED — Node.js version mismatch between host and chroot environments. smoke-chroot label not applied.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

📡 OTel Tracing Smoke Test Results

  • Scenario 1 (Module Loading): otel.js loaded successfully, isEnabled()true. Exports: startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled, _provider, _ProxyAwareOtlpExporter, _FileSpanExporter, _FanOutSpanExporter, _parseEndpoints, _parseOtlpHeaders, _buildResourceSpans, _createOtlpWorkloadIdentity.
  • Scenario 2 (Test Suite): otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js68/68 tests passed, 3/3 suites passed.
  • Scenario 3 (Env Var Forwarding): src/services/agent-environment/env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID and GITHUB_AW_OTEL_PARENT_SPAN_ID to the agent. src/services/api-proxy-env-config.ts forwards OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_SERVICE_NAME, plus the trace-context vars to the api-proxy container.
  • Scenario 4 (Token Tracker Integration): onUsage callback confirmed in token-tracker-http.js (line 348/406) as the OTEL hook point, invoked after normalized usage extraction to set gen_ai.usage.* span attributes.
  • Scenario 5 (OTEL Diagnostics): Covered by test suite (span creation, token attributes, OTLP export, fan-out, graceful degradation) — all passing; no runtime span export errors observed.

Overall: All 5 scenarios pass. No regressions detected in OTel tracing integration.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A (ran ok) ✅ PASS
.NET json-parse N/A (ran ok) ✅ PASS
Go color 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx passed ✅ PASS
Node.js execa passed ✅ PASS
Node.js p-limit passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — PASS

Notes:

  • Bun and Deno were installed fresh in this environment (not preinstalled).
  • Java builds required overriding the local Maven repo path (-Dmaven.repo.local=/tmp/gh-aw/agent/m2repo) because the default ~/.m2/repository directory could not be created (pre-existing root-owned ~/.m2 dir with no write access, unrelated to firewall config). The provided ~/.m2/settings.xml proxy config itself worked correctly.
  • All repository clones succeeded.

Generated by Build Test Suite for #7928 · copilot · auto · 36.4 AIC · ⊞ 12K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

@Copilot @lpcox

PR Titles:

  • fix(ci): match staged KVM processes
  • fix: avoid self-matching KVM process probes

GitHub MCP Testing: ❌ (expected #7929/#7927)
GitHub.com Connectivity: ✅
File I/O Test: ✅
BYOK Inference: ✅

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)

Overall Status: FAIL

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

@Copilot @lpcox

✅ GitHub MCP test
✅ GitHub.com connectivity
✅ File write/read test
✅ BYOK inference test

Note: Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra

Overall: PASS

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)
Add label ready-for-aw to run again

@lpcox
lpcox deployed to aoai-model August 31, 2026 22:32 — with GitHub Actions Active
@lpcox
lpcox merged commit 56960a3 into main Aug 31, 2026
160 of 165 checks passed
@lpcox
lpcox deleted the copilot/export-linux-capability-map branch August 31, 2026 22:41
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.

[Export Audit] LINUX_CAPABILITY_MAP unused outside defining file

3 participants