Repository navigation
fix(api): include truncation metadata in named-query responses - #832
Merged
Merged
Conversation
Merged
scbrown
added a commit
that referenced
this pull request
Oct 25, 2026
…to the S3b stream branch Restacked on #816's final head 1e4947f first (clean), then main's delta since that head. One real conflict, src/asof_share.rs: this branch extracted the per-graph checks into resolve_graphs (shared with the replication stream), and #831 changed the same loop to read frozen graphs from their packs and refuse the graph-metadata graph. Resolution: - resolve_graphs refuses the graph-metadata graph (both cut and stream, per the s24.1.1 ruling) and attached packs, and no longer refuses frozen graphs itself; - the cut reads frozen graphs from their packs exactly as #831 does (pack re-verified inside the transaction, frozen_member); - the stream keeps this branch's reviewed behaviour and refuses frozen graphs explicitly (refuse_frozen), now tested together with the metadata refusal. The derived rest-api.md witness hash is recomputed from the merged file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BkdpDkAkbTvXvNbNacVpJb
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.
Strict
/askconsumers reject otherwise valid results because the response omitstruncated. Return booleanfalsefor complete named-query results and catalog responses, preserving existing query evaluation, result rows, and parameter handling. Named queries still return their complete evaluated result; a template'sLIMITis its selection, and/query's separate response ceiling is unchanged.Controls cover catalog discovery, built-in populated and empty reads, stored queries returning more rows than
max_sparql_rows, and logicalLIMIT 1/LIMIT 0. The small catalog-branch consolidation keeps the existing source-size ratchet; the REST documentation and its source witness are updated.Demo — readable transcript fallback (
asciinemaunavailable): actual library fixture with two names, base handlerd6c403c2d16f31aacf4e9aa37e2b1ca1d6874feeversus candidatee08cc52ee68f13c9b46c163b61785b53c1dce0b4, using the same regression harness. The base response below fails the boolean assertion; the candidate passes, including one-row and empty selections. This demonstrates source behavior, not an installed server.Base response:
{"columns":["name"],"count":2,"query":"complete_names","rows":[{"name":"Alice"},{"name":"Bob"}],"sparql":"SELECT ?name WHERE { ?s <http://example.org/name> ?name } ORDER BY ?name"}Candidate response:
{"columns":["name"],"count":2,"query":"complete_names","rows":[{"name":"Alice"},{"name":"Bob"}],"sparql":"SELECT ?name WHERE { ?s <http://example.org/name> ?name } ORDER BY ?name","truncated":false}Repeat on the candidate:
just test --lib mcp::tests::ask_truncation_marker_describes_complete_query_result_not_dataset_coverage -- --exact --nocaptureValidation:
just checkand documentation lint/build pass; MCP suite 283 passed, one existing ignored; repository-knowledge checks pass with two native-only checks skipped. The paired base control fails as expected, and both paired runs leave the HOME/resource guard clean. Hosted CI and independent review remain required.