Tasks
tasks12/12
1. Adapter implementation
- 1.1 Encode the hit connection into search result ids
(
{connection_id}/{stream}:{record_id}) innormalizeSearchResults, wrapping only record-shaped base ids. - 1.2 Parse both id grammars in
fetch(parseRecordResultIdsplits the connection segment at the first/; every segment passesrequireSafeName) and forward the embedded connection as the canonicalconnection_idquery parameter. - 1.3 Reject a self-contained id whose embedded connection disagrees with
an explicit
connection_idargument with a typedconflicting_connection_iderror before any RS call. - 1.4 Stop repeating
connection_id=in searchcontent[]preview lines when it is embedded in the id; raise the preview id bound from 80 to 200 chars so handles stay complete; update the fetch hint line. - 1.5 Carry the embedded connection into constructed citation URLs
(
?connection_id=...). - 1.6 Update tool descriptions, the
fetchid input description, the search output-schema description, server instructions, and the package README for the new grammar.
2. Regression coverage
- 2.1 Multi-source journey test per the model-visible-journey canon rule:
consume only
content[]text, extract the id, complete search→fetch with noconnection_idargument against a fixture whose unscoped record reads return typed 409ambiguous_connection(test/self-contained-result-id.test.js). - 2.2 Backcompat pins: legacy
stream:record_idunscoped still surfaces the typed 409; legacy id + explicitconnection_idunchanged (new file plus existingconnection-id-forwarding.test.js). - 2.3 Conflict, traversal/malformed-segment, matching-explicit-argument, and no-connection passthrough pins.
- 2.4 Update existing pins to the new contract
(
server.integration.test.js,record-payload-token-budget.test.js) and re-run the footprint/token-budget suites within their budgets.
3. Validation
- 3.1 Full
packages/mcp-serversuite green (127 tests; was 120). - 3.2
openspec validate --all --strictgreen.