remove-graph-depth-guard

Remove graph depth guard and support deep archived subgraphs

Metadata

Statusdone
Assignedagent-732
Created2026-07-23T08:39:09.582813108+00:00
Started2026-07-25T13:00:49.403573642+00:00
Completed2026-07-25T13:32:32.601319802+00:00
Tokens66686351 in / 97339 out

Description

Objective

Remove the bogus maximum task dependency-depth guard. The graph model must permit chains/subgraphs as deep as users need. A visualization or prompt concern must never reject valid graph structure. When historical depth becomes visually noisy, users can archive completed/old tasks and inspect the remaining induced subgraph(s).

Required behavior

  • Remove guardrails.max_task_depth as an enforced task-creation constraint from add/edit/insert/rescue/import/federation and all other graph mutation paths. There is no semantic depth maximum.
  • Remove the depth ceiling from agent prompts and user-facing setup/config/TUI settings. Migrate existing config safely: accept and ignore the obsolete key with a clear one-time/read-only lint notice or migration, without breaking old projects.
  • Keep cycle validation and resource safety, but express them as bounded/iterative algorithms, total-size/work budgets, cancellation, and asynchronous visualization—not as a limit on valid graph depth.
  • Ensure graph algorithms that can encounter deep chains are iterative or otherwise stack-safe: load/save, readiness, critical path, dependency closure, placement, archive, reset, why-blocked, impact, federation, HTML/viz derivation, and TUI navigation.
  • Visualization must handle arbitrarily deep graphs through scroll/virtualization, collapse/filter, and asynchronous bounded derivation. It may simplify presentation under load but may not hide/reject legitimate active tasks.
  • Archiving old/completed tasks must yield a clear view of the remaining induced subgraph or multiple resulting connected components. Preserve dependency/history integrity and provide honest boundary markers where archived predecessors/successors were removed from the active view; never rewrite history merely to make layout shallow.
  • Existing archived-task recovery, search, exact IDs, task logs, retries/evaluation, and graph commands remain correct.

Validation

  • Construct and mutate visible chains substantially deeper than 8 (including at least 1,000 nodes) without configuration overrides, rejection, recursion overflow, or quadratic UI blocking.
  • Deep-chain readiness, critical path, why-blocked, impact, reset/archive, serialization/reload, service dispatch, and TUI/HTML derivation are correct and bounded; inserting a deep active task updates a running TUI promptly rather than taking tens of seconds or remaining offscreen without a discoverable pulse/jump.
  • Archive an old middle/prefix region and show the remaining induced component(s) clearly with honest archived-boundary context; unarchive/recovery preserves exact edges/history.
  • Cycles and malformed graphs still fail or render safely for their own reasons, never because of depth.
  • Legacy max_task_depth config migrates/ignores safely and disappears from prompts, config UX, and Settings.
  • Run fmt, clippy, full tests and large/deep graph performance smokes under bounded disk/CPU; never globally install an unmerged candidate.

Depends on

Required by

Log