feat(test): explicit target-capability fixtures for non-text MCP content (#103 remainder) - #239
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
Expose route-unit fixtures that drive the real MCP projector so consumers can prove supported, fallback, and fail-closed rich-content behavior without overstating transport evidence.
ScriptedAlchemy
force-pushed
the
chore/103-capability-fixtures
branch
from
September 1, 2026 23:43
f7be27a to
224c7a0
Compare
🦋 Changeset detectedLatest commit: 224c7a0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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
Closes out the target-capability acceptance item on #103: "Audio and other non-text content is projected only when the target capability fixture advertises support; fallback and fail-closed paths are both tested" — the harness previously had route-level fail-closed coverage but no dedicated capability-fixture surface in
agent-bundle/test.createTargetCapabilityFixture()(agent-bundle/test): an immutable, explicit fixture over the issue's capability list — image, audio, resource, progress, with text as the non-configurable always-supported baseline. No rich capability defaults to supported: callers choose every boolean and therichContentFallback: 'text' | 'fail'policy, so a test can never pretend unsupported content is accepted by omission.projectTargetCapabilities(): reprojects a realrenderRouteEvents()stream through the runtime's ownprojectMcpRenderStream— the same projector production uses — with exactly the advertised capabilities. Progress maps to the real progress-token/notification contract. Proof level stays honestlyroute-unit: real renderer, real projector, no transport/packed/host claim.fallback: 'fail'surfaces asAgentTestErrorcodeunsupported-rich-content, identifying the offending kind and the fixture, with the proof level in the failure output. Underfallback: 'text'the runtime's exact placeholder blocks ([image <mime>],[audio <mime>],[resource <name> <uri>]) are asserted and no rich block leaks.expectDocument()gains field-awaretoContainImage/toContainAudio/toContainResourcefor non-text Agent Document nodes; existing text assertions are proven not to widen.tests/projection/target-capabilities.test.ts.Changeset:
agent-bundleminor (new public test-harness surface). No runtime behavior changes.Gates (local)
pnpm test:unit— 2303 passed / 5 skipped (worker run); scopedtest-harness-manifest.test.tsre-run post-rebase: 32 passedpnpm test:route-unit— passed (post-rebase)pnpm test:projection— 30 passed, 0 failed (post-rebase)pnpm typecheck— cleanpnpm lint— 0 errors, 0 warningsPart of #103 (with the
create-agent-bundletemplate-adoption PR, this completes the issue's remaining items).