Skip to content

feat(engine): add countPlanReadySteps plan DAG helper - #3749

Closed
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:feat/engine-count-plan-ready-steps
Closed

feat(engine): add countPlanReadySteps plan DAG helper#3749
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:feat/engine-count-plan-ready-steps

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Add countPlanReadySteps(plan) — returns how many steps are runnable now (pending with satisfied dependencies).
  • Mirrors hosted nextReadySteps(plan).length; includes a parity assertion against src/services/plan-dag.
  • Document the helper in the engine README export list.

Conflict avoidance

Touches only packages/gittensory-engine/src/plan-ready.ts, one export line in index.ts, one README bullet, and test/unit/plan-ready-count.test.ts. No overlap with open PRs #3698, #3702, #3704, or #3712.

Test plan

  • test/unit/plan-ready-count.test.ts — counts, edge cases, hosted parity, barrel export
  • npm run typecheck
  • npm run build --workspace @jsonbored/gittensory-engine && npm run build:miner

Made with Cursor

Expose the runnable-step count companion to hasPlanReadySteps with hosted
nextReadySteps parity tests and README documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 6, 2026 07:23
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.38%. Comparing base (51569e4) to head (19750a1).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3749   +/-   ##
=======================================
  Coverage   93.37%   93.38%           
=======================================
  Files         316      316           
  Lines       32296    32297    +1     
  Branches    11841    11841           
=======================================
+ Hits        30158    30159    +1     
  Misses       1507     1507           
  Partials      631      631           
Files with missing lines Coverage Δ
packages/gittensory-engine/src/plan-ready.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 6, 2026
@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - reject/close recommended

Review updated: 2026-07-06 07:30:55 UTC

4 files · 1 AI reviewer · 3 blockers · readiness 73/100 · CI green · clean

🛑 Suggested Action - Reject/Close

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
  • AI reviewers agree on a likely critical defect: No open issue is linked or referenced anywhere in the PR description
  • per this repo's contribution policy, unsolicited new engine exports must close/link an eligible issue before being merge-ready — confirm an issue number or this should be rejected as scope-creep. — Resolve the flagged defect, or override if the AI reviewers are mistaken, then re-run the gate.

Review summary
This adds `countPlanReadySteps(plan)`, a trivial wrapper returning `nextReadySteps(plan).length`, mirroring the existing `hasPlanReadySteps` boolean helper. The implementation is correct and well-tested (empty plan, independent/chained deps, cycles, missing dep ids, all-terminal steps, hosted parity, and barrel-export checks), and the README/barrel updates are consistent with the code. However, the PR description gives no linked issue and reads as an unsolicited addition to the engine's plan-DAG helper surface, which this repo's contribution policy treats as a blocker absent an explicit maintainer-authorized issue.

Blockers

  • No open issue is linked or referenced anywhere in the PR description; per this repo's contribution policy, unsolicited new engine exports must close/link an eligible issue before being merge-ready — confirm an issue number or this should be rejected as scope-creep.
Nits — 6 non-blocking
  • plan-ready.ts: `countPlanReadySteps` and `hasPlanReadySteps` both independently call `nextReadySteps(plan)` and then just check `.length`/`.length > 0` — consider having `hasPlanReadySteps` delegate to `countPlanReadySteps(plan) > 0` to avoid the duplicate filter pass and keep the two helpers trivially consistent.
  • plan-ready.ts: the new JSDoc for `countPlanReadySteps` is a near copy-paste of `hasPlanReadySteps`'s doc with only the return description changed — fine, but worth trimming to reduce duplication if more `plan-ready` variants get added later.
  • plan-ready-count.test.ts imports `../../packages/gittensory-engine/src/plan-ready` without a `.js`/`.ts` extension, unlike the source file's own `.js` extension imports — verify this matches the existing test suite's import convention for consistency.
  • Link or reference the originating issue in the PR description per repo policy.
  • Consider having `hasPlanReadySteps` reuse `countPlanReadySteps` (plan-ready.ts:13-19) to avoid computing `nextReadySteps` twice across the two exports.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

Why this is blocked

  • No open issue is linked or referenced anywhere in the PR description; per this repo's contribution policy, unsolicited new engine exports must close/link an eligible issue before being merge-ready — confirm an issue number or this should be rejected as scope-creep.
  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
Signal Result Evidence
Code review ❌ 3 blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 1493 registered-repo PR(s), 781 merged, 48 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1493 PR(s), 48 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: TypeScript, MDX, C++, HTML, Rust
  • Official Gittensor activity: 1493 PR(s), 48 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (No linked issue detected; Maintainer requires a linked issue; AI reviewers agree on a likely critical defect: No open issue is linked or referenced anywhere in the PR description; per this repo's contribution policy, unsolicited new engine exports must close/link an eligible issue before being merge-ready — confirm an issue number or this should be rejected as scope-creep.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant