Skip to content

refactor: establish reusable finite-disclosure foundation - #6869

Merged
lpcox merged 1 commit into
mainfrom
lpcox-bounded-execution-foundation
Aug 3, 2026
Merged

refactor: establish reusable finite-disclosure foundation#6869
lpcox merged 1 commit into
mainfrom
lpcox-bounded-execution-foundation

Conversation

@lpcox

@lpcox lpcox commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • extract finite schema validation, canonicalization, cardinality, and information charging into reusable bounded-execution modules
  • extract sensitivity ledger, fixed timing scheduler, canonical response helpers, protected audit handling, and private repository staging descriptors
  • retain bounded-query imports and broker entrypoints as compatibility adapters with unchanged protocol bytes and runtime behavior
  • add regression coverage for shared and legacy surfaces

Tests

  • npm run build
  • npm run type-check
  • npm run lint (passes; existing warnings only)
  • npm run test:unit -- --runInBand --silent (287 suites, 4,972 passed, 1 skipped)
  • broker JavaScript syntax and runtime compatibility smoke checks

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d78e26c7-9fe6-4d34-a8bb-4afa87fc5f84
Copilot AI review requested due to automatic review settings August 3, 2026 00:30

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.

Pull request overview

Extracts bounded-query security primitives into reusable bounded-execution modules while preserving legacy imports and runtime behavior.

Changes:

  • Centralizes finite-disclosure and repository-staging logic.
  • Converts broker modules into compatibility adapters.
  • Adds parity and compatibility regression coverage.
Show a summary per file
File Description
src/types/bounded-query-options.ts Updates protocol reference.
src/bounded-query/types.ts Re-exports staging descriptors.
src/bounded-query/protocol.ts Re-exports finite-disclosure API.
src/bounded-query/protocol-parity.test.ts Tests relocated broker modules.
src/bounded-query/manager.ts Uses shared seed-map serialization.
src/bounded-execution/repository-staging.ts Defines reusable staging descriptors.
src/bounded-execution/index.ts Exposes shared TypeScript APIs.
src/bounded-execution/finite-disclosure.ts Hosts finite protocol implementation.
src/bounded-execution/compatibility.test.ts Verifies legacy compatibility.
containers/bounded-query/Dockerfile Packages and validates shared modules.
containers/bounded-query/broker/sensitivity.js Adds compatibility adapter.
containers/bounded-query/broker/scheduler.js Adds compatibility adapter.
containers/bounded-query/broker/protocol.js Adds compatibility adapter.
containers/bounded-query/broker/ledger.js Adds compatibility adapter.
containers/bounded-query/broker/config.js Uses shared seed-map parser.
containers/bounded-query/broker/audit.js Adds compatibility adapter.
containers/bounded-query/bounded-execution/sensitivity-policy.js Extracts sensitivity policy.
containers/bounded-query/bounded-execution/sensitivity-ledger.js Extracts information ledger.
containers/bounded-query/bounded-execution/repository-staging.js Extracts seed-map parsing.
containers/bounded-query/bounded-execution/protected-audit.js Extracts protected auditing.
containers/bounded-query/bounded-execution/index.js Exposes shared broker APIs.
containers/bounded-query/bounded-execution/fixed-timing.js Extracts timing scheduler.
containers/bounded-query/bounded-execution/finite-disclosure.js Hosts broker protocol implementation.
containers/agent/bounded-query-wrapper.sh Updates source references.

Review details

Tip

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

  • Files reviewed: 24/24 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 98.79% 98.82% 📈 +0.03%
Statements 98.72% 98.74% 📈 +0.02%
Functions 99.02% 99.02% ➡️ +0.00%
Branches 95.11% 95.11% ➡️ +0.00%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/bounded-query/protocol.ts 100.0% → 100.0% (+0.00%) 99.8% → 100.0% (+0.24%)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)
✨ New Files (3 files)
  • src/bounded-execution/finite-disclosure.ts: 100.0% lines
  • src/bounded-execution/index.ts: 100.0% lines
  • src/bounded-execution/repository-staging.ts: 100.0% lines

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Contribution Check completed successfully!

PR #6869 appears to follow the documented contribution guidelines based on the provided context: the description is clear, references the work done, and explicitly lists build/type-check/lint/unit-test results. No missing tests, documentation, or file-organization issues are evident from the pre-fetched files, so no review comment was needed.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Security Guard failed. Please review the logs for details.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

Smoke test PASS: GitHub MCP ✓, GitHub.com ✓, file I/O ✓, BYOK inference ✓

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Result
API Status ✅ PASS
GH Check ✅ PASS
File Status ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #6869 · haiku45 · 54.8 AIC · ⊞ 3.6K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK Direct Mode ✅ PASS

  • ✅ GitHub MCP connectivity verified
  • ✅ HTTP 200 to github.com
  • ✅ File write/read successful
  • ✅ BYOK inference path working (api-proxy → api.githubcopilot.com)

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy sidecar.

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

@github-actions

github-actions Bot commented Aug 3, 2026

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

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Results: Services Connectivity

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

Overall: FAILhost.docker.internal did not resolve from the AWF sandbox.

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

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

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (api.github.com) reachable: allowed=200
✅ Non-allowed domain (example.com) blocked: CONNECT tunnel failed, 403 (denied)

Overall status: PASS

cc @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

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.13 Python 3.12.13 ✅ YES
Node.js v24.18.0 v22.23.1 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

⚠️ Not all tests passed — Node.js version mismatch between host and chroot environments. The smoke-chroot label was not added.

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Merged PR titles:

✅ PR list
✅ Playwright
✅ Smoke file
✅ Build
Overall: PASS

Warning

Firewall blocked 1 domain

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

  • registry.npmjs.org

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

network:
  allowed:
    - defaults
    - "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

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Results

Overall Status: PASS

💎 Faceted by Smoke Gemini
Add label ready-for-aw to run again

@github-actions github-actions Bot mentioned this pull request Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

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 ✅ PASS
.NET json-parse N/A ✅ PASS
Go color ok ✅ PASS
Go env ok ✅ PASS
Go uuid ok ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx all passed ✅ PASS
Node.js execa all passed ✅ PASS
Node.js p-limit all passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — PASS

Note: Java tests required overriding the Maven local repository (-Dmaven.repo.local=<tmp path>) because the default ~/.m2/repository path was not writable (pre-existing root-owned ~/.m2 directory); tests then ran successfully through the Squid proxy.

Generated by Build Test Suite for #6869 · auto · 39.5 AIC · ⊞ 11.4K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

📡 OTel Tracing Smoke Test Results

  • Scenario 1 (Module Loading): otel.js loads successfully, isEnabled() returns true, exports include startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled.
  • Scenario 2 (Test Suite): 59/59 tests passed (otel.test.js, otel-fanout.test.js).
  • Scenario 3 (Env Var Forwarding): env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID; api-proxy-env-config.ts forwards GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, and trace context vars.
  • Scenario 4 (Token Tracker Integration): onUsage callback present in token-tracker-http.js as the OTEL hook point.
  • Scenario 5 (OTEL Diagnostics): Workflow-level OTEL span export active (/tmp/gh-aw/otel.jsonl contains gh-aw workflow spans); api-proxy sidecar was not exercised in this run (no LLM API calls made), so no proxy-level spans/token-usage records were produced — expected for this smoke run.

Overall: All checks passed.

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@lpcox smoke test results:

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

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Docker Sbx@lpcox

Overall: PASS

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

@lpcox
lpcox merged commit 2f035b3 into main Aug 3, 2026
138 of 140 checks passed
@lpcox
lpcox deleted the lpcox-bounded-execution-foundation branch August 3, 2026 03:19
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.

2 participants