Skip to content

fix(pm-stack/aggregator): linear epic-graph blocker traversal + deduped contributingItems (#6371) - #6551

Open
dezren39 wants to merge 1 commit into
mainfrom
queue/10756-6371-epic-graph-visited
Open

dezren39 wants to merge 1 commit into
mainfrom
queue/10756-6371-epic-graph-visited

Conversation

@dezren39

@dezren39 dezren39 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Fixes #6371.

What

  • pm-stack/aggregator/src/epic-graph.ts: the two identical helpers (transitiveOpenEpicDescendants, contributingDownstreamItems) copied the visited set per recursive branch, which is exponential on diamond blockedBy graphs. They are replaced by a single shared-visited traversal, openEpicsReachableFrom, called once per blocker.
  • rankedBlocked[].contributingItems is now deduplicated (first-occurrence order, deterministic).

Why the result set is unchanged

Reachability through open nodes does not depend on the path taken, so a shared visited set yields the same set as per-branch copies; cycles still terminate.

Tests (oracle: the issue #6371 diamond fixture)

  • 20-layer diamond: exact contributing set, each ref once, bounded runtime (was ~1757 ms, now ms).
  • Two blockers sharing a downstream epic: listed once, stable order.
  • blockedBy cycle: terminates with the correct set.
  • Existing epic-graph/epics/epic-conformance suites: 38 pass locally (bun test in pm-stack/aggregator). Full-suite failures seen locally (missing web-push, port 4871, board/registry tests) are unrelated to this change.

Queue task 10756 (OpenChamber scheduled lane).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…uped contributingItems (#6371)

Replace the two identical per-branch-visited helpers with one shared-visited
traversal (openEpicsReachableFrom), so diamond blockedBy graphs no longer
traverse exponentially. Dedupe rankedBlocked[].contributingItems in
first-occurrence order. Adds diamond-fixture, shared-downstream and cycle
regression tests.
@dezren39
dezren39 requested a review from a team as a code owner November 6, 2026 16:04
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c7d4e47f-3c4b-497a-8597-e7a3434eb6e5
Commits

Reviewing files that changed from the base of the PR and between 9c06d0c and f141daf.

Files selected for processing: 2

  • pm-stack/aggregator/src/epic-graph.ts
  • pm-stack/aggregator/test/epic-graph.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T16:06:12.912775Z f141daf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pm-stack(aggregator): epic-graph rankedBlocked traversal is exponential on diamond blockedBy graphs — and contributingItems lists duplicates

1 participant