Skip to content

Sync: recursive updateApiObjectsNoChild ↔ updateApiMarkedBoards has no depth bound or cycle detection #2202

@RodriSanchez1

Description

@RodriSanchez1

Part of #2195.

Problem

updateApiObjectsNoChild calls updateApiMarkedBoards (src/components/Board/Board.actions.js:1036), which in turn calls updateApiObjectsNoChild recursively when it finds shouldCreateBoard flags (:1086). Termination relies on the assumption that each recursion clears at least one flag, so the set of pending boards monotonically shrinks.

That assumption is informal:

  • No explicit depth bound — a malformed graph (cyclic loadBoard references) could in principle keep marking boards.
  • No telemetry to detect runaway cascades.
  • The doc notes this in §14 with "Assumes finite board hierarchy depth."

In practice, the data model probably prevents cycles, so this is the lowest-priority item in the epic. But it's worth bounding defensively because the cost of a runaway loop is high (many API calls, possible stack overflow on deeply nested trees).

Proposed direction

Acceptance criteria

  • A pathological input does not produce unbounded recursion.
  • Depth/iteration count is observable in logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions