Skip to content

feat(engine): add hasPlanReadySteps plan DAG helper#3578

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/plan-ready
Jul 5, 2026
Merged

feat(engine): add hasPlanReadySteps plan DAG helper#3578
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/plan-ready

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Add hasPlanReadySteps(plan) — returns true when any step is runnable (pending with satisfied dependencies)
  • Mirrors hosted nextReadySteps(plan).length > 0
  • Unit tests cover ready chains, cyclic deadlock, and dangling dependency ids

Closes #2298

Test plan

  • npx vitest run test/unit/plan-ready.test.ts --coverage (100% patch via diff-cover)
  • npm run build --workspace @jsonbored/gittensory-engine && npm run build:miner

Made with Cursor

Closes JSONbored#2298

Mirrors nextReadySteps length check for runnable pending steps.

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

Copy link
Copy Markdown
Contributor

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

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

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 17:41:50 UTC

4 files · 1 AI reviewer · no blockers · readiness 80/100 · CI pending · blocked

⏸️ Suggested Action - Manual Review

Review summary
This adds a small pure helper `hasPlanReadySteps(plan)` that mirrors the existing `nextReadySteps(plan).length > 0` pattern already used by sibling helpers like `isPlanBlocked`/`hasPlanPendingSteps` in this file family. The logic correctly handles the pending+all-deps-done case, treats a missing dependency id as unsatisfied (defaults to "pending"), and correctly returns false for cyclic deadlocks since neither step in the cycle is ever marked completed/skipped. Tests cover the ready-chain, cyclic-deadlock, dangling-dependency, and barrel-export cases described in the PR, and the change is wired into the barrel export and README consistent with existing conventions.

Nits — 3 non-blocking
  • test/unit/plan-ready.test.ts imports from "../../packages/gittensory-engine/src/plan-ready" and "...plan-export" without the `.js` extension used elsewhere in the source (`plan-ready.ts` itself imports `./plan-export.js`) — confirm this matches the repo's existing test import convention rather than mixing styles.
  • packages/gittensory-engine/README.md is flagged as a long file (~545 lines) by repo tooling; consider whether per-helper doc entries should eventually move to a generated/reference doc rather than growing this file linearly with each new helper.
  • Nothing functional to change; if the team wants stricter dead-code guarantees, consider exporting `nextReadySteps` itself (already useful elsewhere) instead of only the boolean wrapper, but that's a scope decision, not a defect.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2298
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 (1 linked issue).
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: 1433 registered-repo PR(s), 732 merged, 48 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1433 PR(s), 48 issue(s).
Gate result ✅ Passing No configured 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: 1433 PR(s), 48 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
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

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.15%. Comparing base (626b580) to head (9c50343).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3578   +/-   ##
=======================================
  Coverage   93.15%   93.15%           
=======================================
  Files         311      312    +1     
  Lines       31702    31707    +5     
  Branches    11579    11579           
=======================================
+ Hits        29533    29538    +5     
  Misses       1517     1517           
  Partials      652      652           
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.

@JSONbored
JSONbored merged commit 1badf91 into JSONbored:main Jul 5, 2026
9 checks passed
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.

Development

Successfully merging this pull request may close these issues.

docs(miner-foundation): gittensory-miner and gittensory-engine README + package docs

2 participants