Repository navigation
Conversation
…ntextprotocol#451) The traceability run now records each scenario's counted check IDs (SUCCESS, FAILURE, WARNING) under a new scenarios key in traceability.json. After a scenario runs, the runner compares what it emitted against that baseline. It prints the count and the missing IDs, adds a coverage suffix to the suite summary, and writes coverage.json next to checks.json. Coverage is advisory and never changes the exit code. A run away from the scenario's default spec version gets no baseline, so it cannot show a false gap.
commit: |
This branch has not been deployed
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.
Draft for #451. On 2026-10-02 I offered to build it from the traceability run. This PR does that, so the design question now has code to look at.
A scenario can pass while most of its checks never run. In #451, AmirK-S showed a server that rejected every request and still passed
input-required-result-validate-input3/3. Pass/fail can't show this, but the number of checks that ran can.The weekly traceability run already runs every scenario against the reference SDK.
npm run traceabilitynow also records which check IDs each scenario emitted, under a newscenarioskey intraceability.json. Keys areclient:<scenario>andserver:<scenario>. Only SUCCESS, FAILURE and WARNING count. INFO and SKIPPED rows don't.After each scenario, the runner compares the IDs it emitted against that scenario's baseline.
Coverage: 3/12 expected checks emitted. Not emitted: ...under the per-scenario results.(coverage 3/12)to that scenario's line.coverage.jsonnext tochecks.jsonfor downstream tools.Some runs get no baseline, so they can't show a false gap. The reference run used each scenario's default spec version, so a run at another version gets no baseline. A scenario missing from the manifest gets none either. In both cases the runner prints nothing about coverage.
Coverage never changes the exit code. You may want a short count to fail a run, but that's a policy call, so I left it to you.
Tests:
src/coverage.test.tscovers two cases from Expose expected-vs-emitted check coverage per scenario #451's acceptance list, a thin run that passes and a setup failure. It also covers INFO and SKIPPED handling and the spec-version gate.src/traceability/index.test.tscovers mapping result dirs to scenario keys. One case is a client scenario whose name starts withserver-.I regenerated the manifest locally from
sdk typescript-sdk@main --suite all, which gave 113 scenarios and 643 IDs. Then I ranserver --suite allagainst two servers.The first is a Go SDK test server that doesn't declare the skills extension. All three skills scenarios pass on one check,
wire-schema-valid, and every other row is SKIPPED:The skips are intended. Without a count, though, the summary reads as three clean passes.
The second answers every request with
-32000 Server not initialized, like the server in AmirK-S's comment. Six scenarios go green, includinginput-required-result-validate-input3/3, and coverage flags none of them. The reference SDK emits the same 3 IDs there, so the count matches. Those cases still need the control calls in #537, and the count doesn't replace them.This PR doesn't include
traceability.jsonitself. The weekly workflow regenerates it and fillsscenarios. Until then the runner prints nothing new.Open questions:
schemaVersionmove to 2? The new field is additive, and I don't know whether plan.mcp.io checks the version.Once this merges we can delete our own per-scenario count snapshot.