Ship the MCP prebuilt + per-call execution context (Phase A) - #30
Open
JeroenSoeters wants to merge 12 commits into
Open
Ship the MCP prebuilt + per-call execution context (Phase A)#30JeroenSoeters wants to merge 12 commits into
JeroenSoeters wants to merge 12 commits into
Conversation
…esh version cache on binary change - Add withNotice helper: appends the skew notice as a second content block so the primary JSON receipt (apply) or PKL output (extract) in block 0 remains parseable with no prefix to strip. - Refactor buildSkewNotice to accept a pre-resolved formaeBin path instead of re-running resolveCtx internally; handleCheckHealth now resolves ctx once and reuses it for both the health check client and the skew notice. - Key the featuregate version cache on file identity (path + mtime + size) so an in-place binary upgrade (same path, new build) invalidates the stale entry instead of returning it for the process lifetime. Stat failures fall back to path-only key, keeping TestDetectIsKeyedByBinary green. - Normalize skill references in README to plugin-namespaced form /formae:<skill-dir-name> throughout (table, authoring paragraph, verify step).
JeroenSoeters
force-pushed
the
mcp-prebuilt-distribution
branch
from
August 7, 2026 17:00
0985773 to
a33d954
Compare
This was referenced Aug 8, 2026
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.
What
Phase A of moving the MCP toward a prebuilt, bundle-and-ship distribution and reworking how it locates and versions the
formaebinary. Classic (self-hosted agent) behavior is unchanged; nothing hosted-specific is added here — this phase lays the structural seams for that later work.Why
Two problems motivated this:
apply_forma/destroy_formaevaluated the forma file (shelling out to a bareformae) before resolving the client/profile, so eval and submission could disagree on which binary/endpoint to use. Handlers now resolve one immutable execution context up front and thread it through eval, extract, feature-gates, and submission.Changes
internal/formaebin— mode-aware resolver picking whichformaeto run (classic: the user's own install → known locations → bundled fallback; the bundled binary is used when none is installed).internal/execctx— an immutable per-call execution context{profile, mode, endpoint, installation, credentialRef, formaeBin}resolved once per call.featuregateversion detection is keyed to the resolved binary path (per-binary cache), so a binary swap is observable.formaeexec sites centralized through the resolver — no bareexec.Command("formae", …)remain.formaeversions differ (surfaced on health/apply/extract; never turns a success into an error).formae-mcp→formae; added/formae:setupand/formae:upgradeskills + a migration note.Testing
make testgreen across all packages (newinternal/execctxandinternal/formaebinincluded);go vet ./...clean. New unit tests cover resolver branches, per-binary version detection, the context-binary wiring, and the skew notice both directions.