Skip to content

feat(mcp): occurrence_threshold, and the regenerated docs fixture (#2095) - #343

Merged
nc9 merged 2 commits into
mainfrom
feat/2095-followups
Sep 13, 2026
Merged

nc9 merged 2 commits into
mainfrom
feat/2095-followups

Conversation

@nc9

@nc9 nc9 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Two follow-ups to #342 that were agreed before it merged.

occurrence_threshold on compare_entities

The engine's diffEntityMaps has always accepted it and the epic specifies occurrenceDeltas as "above a configurable threshold", but neither MCP server exposed it, so the cloud lane had it as a server-specific input with an explicit exception in their drift test. Now shared, with the default in ENTITY_MCP_LIMITS so neither side hardcodes 1.

It filters occurrenceDeltas only. An entity added, removed, or changing its @id is a structural change, not a change of degree, and survives any setting. The test asserts both halves of that.

The CLI's own squirrel entities --diff does not expose the flag; this is the MCP input only.

The shared graph description implied formats a server may not have

From the cloud lane: their build implements json, jsonld and markdown, and refuses mermaid, dot and graphml. The shared sentence read as though all six exist everywhere, so an agent could take a refusal for a site with nothing to draw. It now says a refusal is a refusal.

The regenerated docs fixture

The committed "after" snapshot carried pages: [] beside pagesTotal: 60, exported before the publish projection stopped clipping the report's own copy, so the test rebuilt the page index by inverting the nodes' page lists. That was lossy for the three nodes whose lists are capped at 50 with a morePages remainder, and it was a liberty the CLI never takes: the CLI reads whatever the document carries.

Regenerated with the post-#333 CLI, it has 183 nodes and its own complete 60-page index, so the reconstruction is deleted. The "before" snapshot stays pre-v1 on purpose, because it exercises the lenient read path on an artefact that actually shipped.

29 tests in the entity MCP suite pass against the real fixture.

https://claude.ai/code/session_01T8w822GqnrviVMytnAsKFP

nc9 added 2 commits September 13, 2026 16:17
The engine's diffEntityMaps has always taken it and the epic specifies
occurrenceDeltas as "above a configurable threshold", but neither server
exposed it, so the cloud lane had added it as a server-specific input. Shared
now, with the default in ENTITY_MCP_LIMITS so neither side hardcodes 1.

It filters occurrenceDeltas only. An entity added, removed, or changing its @id
is a structural change and survives any setting.

Also, from the cloud lane: the shared get_entity_graph description implied all
six formats exist on every server. Theirs implements three and refuses the rest,
so the description now says a refusal is a refusal and not a site with nothing
to draw.

Claude-Session: https://claude.ai/code/session_01T8w822GqnrviVMytnAsKFP
Signed-off-by: Nik Cubrilovic <[email protected]>
…truction

The committed "after" snapshot carried `pages: []` beside `pagesTotal: 60`,
exported before the publish projection stopped clipping the report's own copy,
so the test rebuilt the page index by inverting the nodes' page lists. That was
lossy for the three nodes whose lists are capped at 50 with a morePages
remainder, and it was a liberty the CLI never takes.

Regenerated with the post-#333 CLI: 183 nodes and its own complete 60-page
index. The reconstruction is gone.

The "before" snapshot stays pre-v1 on purpose — it exercises the lenient read
path on an artefact that actually shipped.

Claude-Session: https://claude.ai/code/session_01T8w822GqnrviVMytnAsKFP
Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 merged commit b7cfdf5 into main Sep 13, 2026
14 checks passed
@nc9
nc9 deleted the feat/2095-followups branch September 13, 2026 06:24
@nc9 nc9 mentioned this pull request Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant