Repository navigation
Description
Ruling: two levels, or three? #229's depth recipe cannot be run
Parent: #228 follow-up · A ruling, not a defect — the code and the manual agree with each other; the tracker does not agree with either.
Problem
taskDepthLimit = 2 (internal/session/task_run.go, near 169) and depth is one-based — 1 for the conversation's own work, 2 for a part. Config.mayFanOut is c.taskDepth < taskDepthLimit, and it is what takes propose_task and tasks off the belt (tools.go, near 160) and what mayDivide stands on for divide_work (task_divide.go). So a part has neither verb. A part of a part cannot exist.
The constant says why, in its own words:
TWO LEVELS, because the third has nothing left to divide. […] a part of a part is a step, and a step belongs in the hands that are already holding it. A deeper tree also costs what nobody sees: every level adds a worktree, an audit and a wait, so the third level is where fanning out starts being slower than working.
The manual says the same (internal/manual/chat/tasks.md: "Depth: two levels. The conversation proposes a task; that task may propose pieces; a piece may not.").
But #229 was written against a tree one level deeper — its acceptance asks that "a grandchild's writes reach the root ledger and ship", and its recipe step 4 is "Repeat at depth 2 (part divides again)". Neither can be run. #237 landed the fix and said so, pinning the composition law with a third generation put into the graph rather than run (TestAnAcceptedFamilyLandsEveryGenerationsWork, task_nest_test.go near 923, and its comment explaining why). #228's roadmap still carries the line.
So the tracker asks for behaviour the product refuses on purpose, and the next lane that reads it will either write a test that cannot run or quietly raise a constant nobody ruled on.
The ruling
A. Keep the bound at two. Then the only work is words: #228's roadmap line stops asking for a grandchild, and the family documentation says once, where an implementer will hit it, that the third generation is a modelled law and not a runnable path. Nothing in the code moves. This is the writer's recommendation: the constant's argument is a measured one about cost, divide_work's own fan cap of five already gives one ask up to five owners, and nothing in the four defects this audit found needed a third level.
B. Raise it to three. Then these must hold before the constant moves, and each is a real question rather than a formality:
- Ledger composition — already true.
absorbedLedgerislandingFilesFor(node, …).all()and a node absorbs what its parts settled holding, so the fold is recursive by construction (task families: ledger absorption — part writes compose into the parent #237). Asserted byTestAFamilyLedgerFoldsAPartsWholeSubtree. - Isolation at the third level. A part of a repository family is a worktree of its parent's worktree; a part of a mirror family is a worktree of the mirror (task families: folder family tree — parts cut worktrees off the mirror #230/task families: folder family tree — parts cut worktrees off the mirror #239). A part of a part is a worktree of a worktree, and
prepareTaskTreeOn's ladder has never been asked that. Wanted: a run, not an argument. - The nursery law reaching a grandchild.
workTaskNodedefersnode.graph.stopChildren(node.id)so that no part outlives the coordination it was cut out of. That cascades only while every generation's owner is alive; a resumed node has no owner (the agent died with the process,task_store.go), and a three-deep family resumed from a checkpoint is the case where a grandchild can be left running for nobody. - What one ask can become. Five parts of five parts is 125 nodes against one sentence somebody typed. The lane cap holds how many run, not how many exist, and the person's spending rails were never sized for that shape.
- The words.
internal/manual/chat/tasks.md,what-i-can-do.md,prompts/task.mdandprompts/divide.mdall state two levels; the manual law means they change in the same commit as the constant. - Cost, measured. The constant's claim is that the third level is slower than working. If it is raised, that claim is what the raise has to answer with a number.
Acceptance
- A: task families: uniform isolation & landing across git and folder grounds #228's roadmap no longer asks for a grandchild's writes to ship at runtime; a sentence in
internal/session/task_ledger.goortask_nest_test.go(it is half-written there already) states that the third generation is a law the tests model and the runner refuses. No code change, no manual change, no changelog entry beyond the ruling. - B, e2e: a three-deep family runs end to end through the real door — a part hands out a part, its work reaches the root's ledger, and the person's folder or branch holds all three generations' files.
- B, e2e: a three-deep family killed mid-run leaves nothing running: the grandchild settles stopped with its branch kept, and its lane comes back.
- B, Unit: the belt at depth 3 has neither
propose_tasknordivide_work(the floor moved, it did not vanish), and the fan cap composes to a bound somebody wrote down. - B: the four pages above quote the new depth in the same change, and the change entry's
invalidatesnames "two levels" as what people believed.
Notes for whoever rules
- The vocabulary trips people, including task families: ledger absorption — part writes compose into the parent #229:
depthis one-based, so "depth 2" is a part, and what task families: ledger absorption — part writes compose into the parent #229 wanted is a third generation. Whichever way this goes, say it in generations rather than in the constant's units. - Nothing here blocks task families: scope-ownership enforcement at division admission #231, task families: WIP commit at divide time so parts see the parent's on-disk work #232 or task families: uniform part-brief composition — harness composes context, worker authors scope #233; all three are within two levels.
Drafted with CodeAF · reviewed and owned by the author
Activity
docs: the task-family design page says what the code now does
docs: the task-family record — the two laws, nine refusals, and what …
AbirAbbas commentedon Sep 9, 2026
Closing on ruling A: two levels.
#653 (0daa205) restates the bound in
internal/session/task_run.go—taskDepthLimit = 2, with the commentTWO LEVELS IS A CHOSEN BOUND AND NOT A MEASURED FLOOR— and the manual's what-i-can-do page now says a task hands out pieces only below the two-level limit and a leaf at the limit does the remaining work itself.TestAFloorNodeIsToldWhatItIsAndNotWhatItCannotDoinworkerpage_test.gopins that the floor worker gets no fan-out verb.One loose end from acceptance A: if #228's roadmap still asks for a grandchild's writes at runtime, that sentence needs the same ruling. Reopen if the intended ruling is B.