Skip to content

Add opt-in convergence-point priority to grow scheduling #93

Description

@markfreeman-dot-dev

v2 migration #100M7-lifecycle (epic #15) · Size S · Architecture

Goal

When enabled, grow schedules convergence-point cells first; off by default, where M4-dbos's level-derived priority applies unchanged.

Context

M4-dbos ships the grow queue with priority_enabled=True and level-derived priority as default; this replaces that ordering when enabled and falls back to it, not FIFO. DBOS accepts a per-enqueue priority; whether it helps throughput is a grow-only question, so ship opt-in.

Scope

In:

  • At the grow fan-out (successor of get_eligible_for_validation, colony.py:212-238), compute EdgeIntelligenceReport once per pass; priority = convergence points by rank, then importance, ties by level.
  • Priority never overrides dependency eligibility (the fan-out predicate enforces it).
  • Opt-in petri.yaml key (scheduling.prioritize_targets, default false).
  • Enqueue-time only, no workflow-code changes, so DBOS code-checksum versioning and in-flight workflows are unaffected.
  • Record assigned priority as an OTel span attribute and in the cell's queued domain event.

Out:

  • No adaptive rate-limit-aware priority (D2, M4-dbos).
  • No starvation protection beyond the tie-break; no eligibility or queue-declaration changes.

Acceptance criteria

  • Flag on, concurrency=1: a convergence-point cell enqueued alongside a same-level leaf executes first (integration, TestModel).
  • Flag off (default): assigned priorities equal M4-dbos's level-derived ordering (regression asserting priority values, not FIFO).
  • Priority never schedules a cell with unvalidated dependencies (eligibility test with priority enabled).
  • Assigned priority appears in the cell's queued domain event and as a span attribute.
  • Docs cover the key and default and state that enabling it replaces M4-dbos's level-derived priority.
  • The diff contains no workflow-code changes (enqueue-time only).

Pointers

  • v2 grow fan-out module (successor of processor.py:1724 find_eligible_cells, colony.py:212-238)
  • v2 config module (new key); tests/integration/test_priority_scheduling.py
  • docs/field-reports.md #11; verify DBOS priority param/range on the installed version

#N in this issue refers to entries in docs/field-reports.md, not issues in this repo.
To claim this issue, leave a comment. Questions welcome — see CONTRIBUTING.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    durable-executionExecutionBackend seam, DBOS, queueslifecycleRe-decomposition, feed, scan, analystmigration-v2Part of the v2 migration backlogsize:SRough effort: hours

    Type

    No type

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions