Repository navigation
fix: match capped enclave tool descriptions during readiness - #10386
Merged
Merged
Conversation
Account for the trusted tool-call cap advisory in the exact routed tool contract. Exercise real broker dispatch through the CI gateway fixture for capped and uncapped executor profiles and fail closed on tool mismatches. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0dfaa32d-cf37-44f5-9084-6529d3b9b413
Contributor
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit ed98cb4 |
Contributor
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 93.40% | 93.39% | 📉 -0.01% |
| Statements | 91.84% | 91.83% | 📉 -0.01% |
| Functions | 90.98% | 90.98% | ➡️ +0.00% |
| Branches | 85.86% | 85.87% | 📈 +0.01% |
📁 Per-file Coverage Changes (1 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/one-shot-adapter.ts |
83.4% → 82.9% (-0.56%) | 80.7% → 80.2% (-0.52%) |
Coverage comparison generated by scripts/ci/compare-coverage.ts
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The localized fix preserves strict validation, has targeted regression coverage, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Fixes AWF enclave gateway readiness for configured tool-call caps while preserving exact tool-contract validation.
Changes:
- Reuse the broker’s advisory formatter for expected capped descriptions.
- Add readiness coverage across executor profiles, cap values, and invalid contracts.
- Document the cap-aware matching requirements.
| File | Description |
|---|---|
src/enclave/gateway.ts |
Match descriptions containing the configured cap advisory. |
scripts/ci/cloud-hypervisor-enclave-gateway.test.ts |
Test real broker listings through the gateway readiness handshake. |
docs/enclaves-architecture.md |
Clarify exact matching for capped tool descriptions. |
Review effort: Max
github-actions Bot
added a commit
that referenced
this pull request
Oct 21, 2026
- Add unified enclaves to Feature highlights in README.md with mention of cost control via --max-num-tool-calls, repository seedling, and dynamic admission - Clarify that tool description text for capped limits must match exactly during readiness handshake in enclaves-architecture.md Addresses recent code changes: - Commit 0f185e3: match capped enclave tool descriptions during readiness (#10386) - Commit c915e89: preserve enclave gateway notification acknowledgments (#10383) Verified that: - Tool descriptions are correctly documented in awf-config-spec.md §14.2a - MCP notification acknowledgment handling is documented in INTEGRATION-TESTS.md - Release template remains consistent with current CLI features Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 21, 2026
lpcox
added a commit
that referenced
this pull request
Oct 21, 2026
…ns (#10388) * docs: sync unified enclave features and capped tool descriptions - Add unified enclaves to Feature highlights in README.md with mention of cost control via --max-num-tool-calls, repository seedling, and dynamic admission - Clarify that tool description text for capped limits must match exactly during readiness handshake in enclaves-architecture.md Addresses recent code changes: - Commit 0f185e3: match capped enclave tool descriptions during readiness (#10386) - Commit c915e89: preserve enclave gateway notification acknowledgments (#10383) Verified that: - Tool descriptions are correctly documented in awf-config-spec.md §14.2a - MCP notification acknowledgment handling is documented in INTEGRATION-TESTS.md - Release template remains consistent with current CLI features Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: use repository seeding terminology Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
Both release v0.28.71 jobs in run 39538048055 pass
initializeandnotifications/initialized, then failtools/listwithtools-mismatch. The common smoke arguments configure--max-num-tool-calls 16. The real broker appends that trusted limit's advisory to each tool description, but host readiness expected only the static uncapped description. This diagnosis follows the release-equivalent source; the logs do not contain a captured tool-list payload.Changes
Review and validation
Exact-source read-only review passed for this patch and reachable dependencies; no confirmed vulnerability or blocking correctness defect was reported. Review includes shared formatter, actual dispatcher, strict comparison, bundling/configs and hooks.
Normal PR CI verified head
b1b5eb2d8b233a4a48903c110323e5bf79515d35: deterministic enclave conformance passed 45 suites / 1,817 tests, including explicit passes forsrc/enclave/gateway.test.tsandscripts/ci/cloud-hypervisor-enclave-gateway.test.ts. Build/Lint on Node 20 and 22, TypeScript type-check, ESLint, Markdown lint and link checks also passed. Broader root-unit/coverage/chroot/security jobs were still pending at that observation; no failed check was reported. Live/environment/privileged VM jobs were skipped, not validated.Local validation was blocked, not passed: clean-env
npm run buildfailed becausetscwas missing. One approved unchanged-locknpm ci --ignore-scripts --no-audit --no-fund --fetch-retries=0 --fetch-timeout=15000attempt failed with package GETENOTCONNand npm'sExit handler never called!. No retries, alternate registry/cache, copied dependencies, auth variables or lifecycle installation scripts. Manifests, lockfile and tracked.npmrcstayed unchanged. Targeted Jest and ESLint were therefore not run locally. Configured generated Husky wrappers were absent; ordinary commit behavior was not bypassed, and silent hooks are not claimed as validation.git diff --checkpassed. Owned partial installation/cache files were cleaned up; raw evidence was retained privately outside the repository.No manual dispatch/rerun/cancellation, KVM/live acceptance, secrets access or inference was performed. New test fixtures use synthetic credentials and listing-only requests; existing budget tests use in-process fake tool calls.
Source and scope
Based on current
origin/mainc915e89f470bba946b76c16203b6692c87b68208; fetched and merged current main before publication (already up to date). No inherited branch changes. GitHub's release comparison shows v0.28.71's release commit differs from this base only in package version fields and the artifact compatibility release tag. This is a new follow-up, not a repurposing of merged #10383.Authored documentation annotation: docs/enclaves-architecture.md:495–500 changes the generic exact-contract explanation to explicitly account for the configured cap advisory. Security impact: unchanged exact matching of schemas, enabled names, gateway-origin prefix and every other description character; no credential, recipient, permission, persistence or approval changes.