Issue link roll-up skips grandchildren under deleted threads #182
Copy link
Copy link
Closed
Description
What: The Issue links roll-up on a thread includes an active grandchild even when the child between them was deleted.
Why: #168's reviewer found that Issue link descendant rows skip deleted intermediate threads, so an active grandchild under a deleted child is missing from the parent's roll-up (#171 behavior, unchanged by #168).
So what: An agent fixes it after the v2 port lands; low priority.
Contribution to the Objective
Keeps Issue status accurate for Drafter trees in Chromeria.
Acceptance criteria
- The Issue links descendant query walks through deleted intermediate threads the same way Port child threads onto upstream lineage and delegation #168's Stop traversal does, without listing the deleted thread itself.
- A focused test: parent, deleted child, active grandchild with a linked Issue; the parent's roll-up shows the grandchild's Issue.
Non-goals
- Changing Stop or retirement behavior.
Blockers
- Port child threads onto upstream lineage and delegation #168 merged into
fork/v2(its traversal helper is reused).
Proof
Focused test output on the PR.
Elon record
- Requirements and who asked: Port child threads onto upstream lineage and delegation #168 independent review finding, relayed to the planner (Absorb upstream main through 8d11fe1261 #166).
- Deleted: A separate traversal: reuse Port child threads onto upstream lineage and delegation #168's helper.
- Bottleneck: Port child threads onto upstream lineage and delegation #168 landing.
- Checked myself: Reviewer's finding as relayed by Port child threads onto upstream lineage and delegation #168's dispatcher; not reproduced yet.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
lukemaj commentedon Oct 19, 2026
What: Not built tonight; the backlog-clearing worker for this Issue failed four times on host-side transport errors (Codex app-server OOM-killed at 00:07, then command timeouts under load average 44 on bestia), before any edit.
Why: Machine load, not the Issue: it remains ready (#241's identity fix, PR #481, has merged in the same module, so this can build on main).
So what: It stays open and ready for the next agent; no partial branch was pushed.
🤖 Generated with Claude Code
lukemaj commentedon Oct 19, 2026
What: Reproduced #182 on current main (
5f6b55e7d5569878f6b209f2134640cca1dfd8c2) with a failing service test.Why: The SQL query removes deleted intermediate threads before descendant traversal, disconnecting the active grandchild.
So what: The fix keeps deleted rows available for traversal and excludes them from returned descendants; focused proof follows.
Upstream-first: searched
pingdotgg/t3codeIssues and PRs for"issue links"andgrandchild deleted. No matching deleted-intermediate roll-up fix was found. Upstream main resolved tof36dadb782b8c167724801221a2b196d5ef4c0db; itsapps/server/src/issueLinkspath is absent (contents API 404). Related open PRs #19259 and #19270 introduce a different Issue service and thread-link storage, not this traversal fix. This module is fork-owned and already registered indocs/fork-features.md.The Stop helper (
childThreads/stopDescendants.ts) repairs a visible-shell graph by loading missing ancestors. Issue-links already reads projection rows in a batch, so retaining deleted rows in that existing walk gives the same traversal behavior without per-ancestor reads or changing Stop.Failing-before command:
npx pnpm@11.10.0 exec vp test run apps/server/src/issueLinks/IssueLinks.test.ts -t 'rolls up active grandchildren' --maxWorkers=1 --no-file-parallelism. Result: 1 failed, 24 skipped; expectedacme/api#40andacme/api#7from the active grandchild, received only the parent'sacme/web#28.Contribution to the Objective: accurate Issue roll-ups for Drafter trees.
Requirements and who asked: #182 and the backlog coordinator require active grandchildren to remain visible through deleted children, while deleted children's links remain hidden.
Deleted: No new traversal service, per-ancestor projection reads, Stop changes, version bump, or feature-map edits.
Bottleneck: Filtering deleted rows before walking lineage disconnects the grandchild.
Checked myself: Read the Issue, PR #481 merge state, Stop traversal and Issue-links query, and observed the targeted regression fail for the intended cause.
lukemaj commentedon Oct 19, 2026
What: Implemented #182 in PR #517, targeting
main.Why: Deleted child rows must remain in the traversal graph to connect active grandchildren, while their own links stay hidden.
So what: Luna review and CI, then the backlog coordinator merges; no review requested or merge performed by this worker.
Branch:
fix/182-rollup-deleted-intermediateHead:
87100d5e87b00a77f9941cdc35a9851ac5e1be8eBase at implementation:
5f6b55e7d5569878f6b209f2134640cca1dfd8c2, including merged PR #481.Files changed:
apps/server/src/issueLinks/IssueLinks.tsandapps/server/src/issueLinks/IssueLinks.test.ts. Nodocs/map.mdedit or version bump.Proof:
npx pnpm@11.10.0 exec vp test run apps/server/src/issueLinks/IssueLinks.test.ts apps/server/src/issueLinks/IssueLinks.carryover.test.ts apps/server/src/issueLinks/closingReferences.test.ts --maxWorkers=1 --no-file-parallelism: 3 files passed, 27 tests passed, 1 skipped, one worker sequentially.vp lintandvp fmt --checkon both changed files: passed.npx pnpm@11.10.0 --dir apps/server run typecheck: passed with Effect suggestions only.bash scripts/fork-check.sh: passed, 51 registered features validated.git diff --check: passed; worktree clean after commit and push.Upstream-first search and failing-before evidence: #182 (comment). No matching upstream fix found; the module is fork-owned and already registered. Full commands and environment limitation (Node 26.8.2 versus root ^24.13.1) are in the PR. Independent review and CI remain unverified here.
Requirements and who asked: #182 and the backlog coordinator require grandchild roll-up through deleted children without exposing deleted children's links.
Deleted: No new service, per-ancestor loads, Stop changes, feature-map edits, or version bump.
Bottleneck: The live-only SQL filter disconnected descendants before traversal.
Checked myself: Inspected the relevant queries and Stop helper; reproduced failure before the fix and observed focused tests and checks pass after it.