Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lab/observe/from-conformance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ function upstreamAdapter(protocol: string): string {
return "anthropic";
case "openai-chat":
return "openai-chat";
case "cursor-protobuf":
return "cursor-protobuf";
Comment on lines +133 to +134

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Map the Cursor wire protocol to the Cursor adapter

When any mcp-core conformance result is persisted, this records both subject.effectiveAdapter and the fingerprint's wire.adapter as cursor-protobuf, but that is the wire protocol rather than a registered adapter: the runtime's canonical adapter identifier is cursor (src/server/adapter-resolve.ts:76). Consequently, the ledger attributes MCP evidence to a nonexistent adapter and produces incompatible subject/fingerprint metadata for actual Cursor routes. Return cursor here while retaining cursor-protobuf in upstreamProtocol, and update the new test accordingly.

Useful? React with 👍 / 👎.

default:
throw new Error(`unsupported protocol identity: ${protocol}`);
}
Expand Down
21 changes: 20 additions & 1 deletion tests/lab-evidence-ledger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,25 @@ describe("CL-02 projection rebuild determinism", () => {
});

describe("CL-02 CL-01 integration", () => {
test("mcp-core cursor-protobuf result produces protocol evidence", () => {
withHome((home) => {
const authority = loadCaseAuthority();
const caseRecord = discoverScenarios(authority, ["mcp-core"]).find(
(c) => c.id === "mcp-core.protocol.namespace-mapping",
)!;

const { event } = observationFromConformanceResult(
syntheticPassResult(caseRecord),
caseRecord,
authority,
{ configDir: home },
);

expect(event.subject.effectiveAdapter).toBe("cursor-protobuf");
expect(event.subject.upstreamProtocol).toBe("cursor-protobuf");
});
});

test("run → observation → JSONL → replay → SQLite protocol projection", async () => {
await withHome(async (home) => {
const authority = loadCaseAuthority();
Expand Down Expand Up @@ -1158,4 +1177,4 @@ describe("CL-02 phase-2 review regressions", () => {
closeTrustedArtifactDir(dir);
});
});
});
});
Loading