Skip to content

fix: drop unused siblings section from mymir_context working depth#84

Merged
FrkAk merged 7 commits into
mainfrom
fix/drop-working-context-siblings
May 17, 2026
Merged

fix: drop unused siblings section from mymir_context working depth#84
FrkAk merged 7 commits into
mainfrom
fix/drop-working-context-siblings

Conversation

@FrkAk
Copy link
Copy Markdown
Owner

@FrkAk FrkAk commented May 17, 2026

Summary

mymir_context depth='working' had a ## Siblings section that called fetchSiblingTasks(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 Tasks already renders all 1-hop neighbors (both depends_on and relates_to, both directions, with edge notes) via getTaskEdgesDetailedTx.

This PR drops the section and its supporting code. ## Connected Tasks is 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 — drop siblings from WorkingContext, drop the fetchSiblingTasks call, drop formatSiblingsSection and its caller, update JSDoc.
  • lib/data/task.ts — delete fetchSiblingTasks + 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 asserted result.siblings.length === 1 (it ratified the bug) and add a regression-gate test pinning that relates_to 1-hop neighbors continue to land in result.edges.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation

Testing

  • Tested locally with bun run dev
  • Linting passes (bun run lint)
  • Typecheck passes (bun run typecheck)

Notes for reviewer

  • Test suite: bun test → 458 pass, 0 fail. The rewritten + new tests in tests/context/working.test.ts carry the behavioral guarantee — the new third test pins that relates_to 1-hop neighbors continue to land in result.edges, which is the basis for removing the Siblings section.
  • Final grep sweep run: 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).
  • The UI (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 to relates_to 1-hop only). That vocabulary is the UI's contract and is intentionally untouched.
  • The tests/context/working.test.ts rewrite 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.
  • No schema changes. No migration. No data-layer behavior change beyond deleting an unused function.

@FrkAk FrkAk requested review from ZeyNor and ulascanzorer as code owners May 17, 2026 17:57
@FrkAk FrkAk self-assigned this May 17, 2026
@FrkAk FrkAk merged commit 5318dbf into main May 17, 2026
4 checks passed
@FrkAk FrkAk deleted the fix/drop-working-context-siblings branch May 17, 2026 20:17
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