Skip to content

Minor cleanups from the #4 parallel-scheduler review #58

Description

@qinhaihong-red

Parent

#4

What to build

A batch of small, individually-below-the-bar follow-ups from the #4 branch review. Each should be resolved or explicitly declined in the PR.

  • Adjacency duplication: the scheduler rebuilds dependents/in-degree from the workflow, duplicating the graph walk the ordering layer already performs (and calls), and its raw len(needs) omits the ordering layer's known-reference filter. Extract one shared adjacency helper so the kernel's graph topology has a single definition.
  • record_node_skipped robustness: it is a bare INSERT with no conflict handling; skip-safety lives entirely in the scheduler's seen-sets. A future resume/retry caller skipping a node that already has a row would raise an unhandled integrity error. Make the store path defensive (or document the precondition).
  • Test cleanups: the peak-concurrency test hand-rolls an O_EXCL mkdir mutex + counter files with a sleep window (timing/portability flake risk) where the barrier-based tests already prove the contract both ways; and two concurrency tests inline raw workflow dicts because the shared shell_workflow helper cannot set concurrency — extend the helper and dedupe.
  • definition_checksum includes concurrency: decide whether a pure scheduling knob belongs in the checksummed definition-of-work (same family as the earlier "checksum is version-internal" finding; no current consumer reads it back). Record the decision.

Acceptance criteria

  • One shared adjacency/in-degree helper used by both the ordering layer and the scheduler
  • record_node_skipped no longer raises on a pre-existing row (or its precondition is documented and enforced by the caller contract) — done in PR feat: failure semantics — retries, timeouts, cancellation, and resume #69 (commit 487de89): the resume re-skip path UPDATEs an existing row guarded by _started, with a regression test.
  • The peak-concurrency test is simplified to the barrier pattern; the concurrency test workflows use the shared helper
  • The concurrency-in-checksum decision is recorded (kept with rationale, or moved out)

Blocked by

None - can start immediately

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions