Skip to content

feat(engine): add isPlanEmpty - #3447

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/engine-is-plan-empty
Jul 5, 2026
Merged

feat(engine): add isPlanEmpty#3447
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/engine-is-plan-empty

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Add isPlanEmpty in @jsonbored/gittensory-engine — returns whether a plan DAG has no steps.
  • Pure helper alongside countPlanSteps and isPlanFullyCompleted for miner and dashboard gating.
  • Vitest coverage at 100% patch on the new helper.

Test plan

  • COVERAGE_NO_THRESHOLDS=1 npx vitest run test/unit/plan-empty.test.ts --coverage
  • npx diff-cover coverage/lcov.info --compare-branch=main --fail-under=99 → 100%
  • npm run build --workspace @jsonbored/gittensory-engine && npm run build:miner

Made with Cursor

Expose a pure plan-DAG emptiness check for miner and dashboard flows that gate on whether a plan has steps.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 5, 2026 07:19
@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 07:24:12 UTC

3 files · 1 AI reviewer · no blockers · readiness 55/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This adds a small pure `isPlanEmpty` helper, exports it from the engine barrel, and covers both empty and non-empty DAGs plus the barrel export. The implementation is correct for the visible `PlanDag` contract because emptiness is exactly `steps.length === 0`, and CI has already verified the build and tests on this commit.

Nits — 3 non-blocking
  • nit: `test/unit/plan-empty.test.ts` builds full `PlanStep` fixtures even though `isPlanEmpty` only depends on array cardinality, so the test has more fixture surface than the helper needs.
  • `test/unit/plan-empty.test.ts`: consider reusing an existing plan-step fixture helper if the test suite already has one for the neighboring plan helpers, or keep this local helper only if duplication is intentional.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High 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: 1362 registered-repo PR(s), 668 merged, 49 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1362 PR(s), 49 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: not available
  • Official Gittensor activity: 1362 PR(s), 49 issue(s).
  • Related work: Titles/paths share 9 meaningful terms. (issue #2038, issue #2059)
  • Related work: Titles/paths share 10 meaningful terms. (issue #2038, issue #2040)
  • Related work: Titles/paths share 10 meaningful terms. (issue #2059, issue #2063)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Explain no-issue PR.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • 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.
  • Check active issues and PRs before submitting.
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 92.99%. Comparing base (f6b9872) to head (3b61583).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3447   +/-   ##
=======================================
  Coverage   92.99%   92.99%           
=======================================
  Files         295      296    +1     
  Lines       30970    30971    +1     
  Branches    11293    11293           
=======================================
+ Hits        28801    28802    +1     
  Misses       1514     1514           
  Partials      655      655           
Files with missing lines Coverage Δ
packages/gittensory-engine/src/plan-empty.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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit f96e067 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant