docs: require mcpg v0.4.18 and fix enclave network membership - #8305
Merged
Conversation
Two factual errors found while auditing the enclave documentation against the
current implementations in AWF, gh-aw, and gh-aw-mcpg.
1. The documented mcpg floor for dynamic repository admission was v0.4.17, but
the delegation wire contract now encodes durations as whole seconds. v0.4.17
typed max_identity_ttl and requested_ttl as Go time.Duration and decoded the
same JSON as nanoseconds; v0.4.18 added internal/delegation/wire.go, which
decodes both as int64 seconds. Pairing current AWF with v0.4.17 would read a
120-second TTL as 120 nanoseconds. gh-aw already pins v0.4.18 as
DefaultMCPGatewayVersion, so only AWF's docs and comments were stale.
2. CLAUDE.md stated that the MCP gateway is excluded from the awf-enclave-agent
network. It is not: when GitHub access is configured, statically or
dynamically, AWF attaches compiler-owned shared mcpg at 172.31.0.40 under
alias awf-enclave-github-mcp, and asserts that exact membership set in
assertNetworkIsolated. That attachment is how the enclave reaches the GitHub
data plane at all.
Verified the pinned cross-component constants against v0.4.18 before relabeling
the contract fixture rather than relabeling on trust: delegationControlPath, all
five operation paths, the CreateOrConfirmRequestWire key set and its whole-second
RequestedTTLSeconds field, and the closed {issue_read, list_issues} tool set.
Also records that capability-only protection of the delegation control listener
is a reviewed decision (github/gh-aw#59268, closed as not planned) rather than an
oversight, and disambiguates the static base version floor from the dynamic one
in both docs.
No behavior change; comments, docs, and one test description only.
Refs #8195
Refs github/gh-aw#59268
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 29264656-b8a8-4ae3-98fc-cb13fc6b3674
Contributor
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 5b9e19c |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The only unresolved comment is a minor provenance-attribution nit.
Review tier: Balanced
Findings: None
What changed in this PR
Corrects enclave documentation and comments to match current AWF and mcpg behavior.
Changes:
- Raises dynamic delegation’s mcpg minimum to v0.4.18.
- Corrects enclave network membership documentation.
- Records capability-only authentication as intentional.
| File | Description |
|---|---|
src/enclave/dynamic-delegation-handoff.ts |
Updates the documented mcpg version. |
src/enclave/dynamic-delegation-contract.test.ts |
Relabels the v0.4.18 contract; PR attribution has a non-blocking nit. |
src/enclave/delegation-control-client.ts |
Updates wire-contract commentary. |
docs/enclaves-architecture.md |
Corrects version, topology, and security details. |
docs/awf-config-spec.md |
Clarifies static and dynamic mcpg requirements. |
CLAUDE.md |
Corrects enclave architecture guidance. |
Suppressed comments (1)
src/enclave/dynamic-delegation-contract.test.ts:16
- The provenance is inaccurate: PR #12605 shipped in v0.4.17 and retained the
time.Durationwire fields;wire.goand the whole-second encoding were introduced separately by gh-aw-mcpg PR #12686 for v0.4.18. Because this fixture explicitly documents which upstream change its constants were copied from, please attribute the seconds contract to #12686 (or remove the PR attribution).
* - `github/gh-aw-mcpg` v0.4.18 `internal/proxy/delegation.go`,
* `internal/delegation/wire.go`, and
* `internal/delegation/{identity,store,selector}.go` (PR #12605): the
* operation paths, the `CreateOrConfirmRequest`/`IdentityResult` JSON key
* sets, the whole-second duration encoding, the status/reconcile/revoke
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
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.
Summary
Audited the enclave documentation and cross-component comments against the current implementations in AWF
main, gh-awmain, and gh-aw-mcpg v0.4.18. Found two factual errors and fixed both.No behavior change — comments, docs, and one test description only.
1. The documented mcpg floor was wrong (v0.4.17 → v0.4.18)
docs/enclaves-architecture.mdstated dynamic repository admission runs on "mcpg v0.4.17 or newer". That's incorrect now that delegation durations are whole seconds on the wire:max_identity_ttltime.Duration→ nanosecondsint64seconds (wire.go)requested_ttltime.Duration→ nanosecondsint64seconds (wire.go)internal/delegation/wire.goCurrent AWF sends
requested_ttl: 120. Against v0.4.17 that decodes as 120 nanoseconds — an instantly-expired identity. gh-aw already pins the correct floor (DefaultMCPGatewayVersion = v0.4.18inpkg/constants/version_constants.go), so only AWF's docs and comments were stale.Corrected in five places: the architecture doc plus the four source/test comments that cited v0.4.17 (
delegation-control-client.ts,dynamic-delegation-handoff.ts, and two indynamic-delegation-contract.test.ts).I also disambiguated the static base floor (spec 1.15.0 / post-v0.4.8, still accurate) from the dynamic floor in both
enclaves-architecture.mdandawf-config-spec.md, since a reader could otherwise take the base floor as sufficient for dynamic enclaves.Verified, not relabeled on trust
The contract fixture exists to pin upstream, so bumping its version label without re-checking would defeat it. I diffed each pinned constant against v0.4.18 before relabeling:
delegationControlPath=/internal/awf-enclave-mcp-control/✓create-or-confirm,status,reconcile,revoke,revoke-by-labels✓CreateOrConfirmRequestWirekey set, includingRequestedTTLSeconds int64withjson:"requested_ttl"✓{issue_read, list_issues}ininternal/delegation/selector.go✓2. CLAUDE.md misstated the enclave network membership
It claimed "the MCP gateway are excluded" from
awf-enclave-agent. The opposite is true whenever GitHub access is configured — statically or dynamically — and it's how the enclave reaches the GitHub data plane at all:Rewrote that bullet to state the mandatory peer (dedicated API proxy), the conditional peer (shared mcpg at
172.31.0.40, aliasawf-enclave-github-mcp), what genuinely is excluded, and thatassertNetworkIsolatedenforces the exact membership set. Also added the missing dynamic-enclave bullet: control client in the host process,0700file channel toenclave-mcp-server, no new network listener.Two terminology slips fixed while there:
enclave_run_script"launches a … Python executor" → enclave (an executor is broker-side machinery; the launched container is an enclave, per the terminology note inenclaves-architecture.md), and usedenclave-mcp-serverrather than "broker" to match the naming we agreed to keep.3. Recorded the capability-only decision
enclaves-architecture.mdalready described the reachability model correctly (4783af78). Added a short note that relying on capability authentication alone for the delegation control listener is a reviewed decision — github/gh-aw#59268, closed as not planned — rather than an oversight, with the constant-time/pre-routing/separate-handler properties that make it hold. Without this, the next reader may re-litigate it as a bug.Validation
npm run build(tsc) — cleannpm run lint— 0 errorsnpx jest src/enclave src/services/enclave— 28 suites, 549 tests passnpx jest— 356 suites, 5806 tests passgh-aw@mainandgh-aw-mcpg@v0.4.17/v0.4.18rather than from memoryRefs #8195
Refs github/gh-aw#59268
Fixes: #8195