fix: drop unused siblings section from mymir_context working depth#84
Merged
Conversation
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.
Summary
mymir_context depth='working'had a## Siblingssection that calledfetchSiblingTasks(projectId, taskId)— a query that returns every other task in the project, no filter. For a 50-task project, every working-depth call dumped 50 lines of- TASK-N "title" (status)into the agent's context. The section was also semantically redundant:## Connected Tasksalready renders all 1-hop neighbors (bothdepends_onandrelates_to, both directions, with edge notes) viagetTaskEdgesDetailedTx.This PR drops the section and its supporting code.
## Connected Tasksis the lone neighbor surface in working depth going forward, which is strictly more useful (edge type + direction + note per neighbor).lib/context/_core/working.ts— dropsiblingsfromWorkingContext, drop thefetchSiblingTaskscall, dropformatSiblingsSectionand its caller, update JSDoc.lib/data/task.ts— deletefetchSiblingTasks+SiblingTaskInfo(no other callers in the repo).lib/mcp/create-server.ts+lib/graph/tool-handlers.ts— drop "siblings" from the three MCP tool description strings agents see every turn.tests/context/working.test.ts— rewrite the test that assertedresult.siblings.length === 1(it ratified the bug) and add a regression-gate test pinning thatrelates_to1-hop neighbors continue to land inresult.edges.Type of change
Testing
bun run devbun run lint)bun run typecheck)Notes for reviewer
bun test→ 458 pass, 0 fail. The rewritten + new tests intests/context/working.test.tscarry the behavioral guarantee — the new third test pins thatrelates_to1-hop neighbors continue to land inresult.edges, which is the basis for removing the Siblings section.grep -rn "siblings|fetchSiblingTasks|SiblingTaskInfo" lib/ tests/ app/returned zero MCP-layer references (UI / unrelated test prose / db raw helper exclusions documented in the plan).components/workspace/detail/DetailView.tsx,BundlePreview.tsx,RelationshipsSection.tsx) uses the words "siblings" / "neighbors" in its own bundle-preview component with a DIFFERENT semantic (it filters torelates_to1-hop only). That vocabulary is the UI's contract and is intentionally untouched.tests/context/working.test.tsrewrite is two changes: the existing first test was renamed and shrunk to focus on the positive RLS ancestor check (its real job — the sibling assertion was bolted on); a new third test pins the relates_to-via-edges guarantee.