Skip to content

feat(engine): extract isFailingCheckSummary to gittensory-engine (#4256) - #4377

Merged
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
andriypolanski:feat/extract-is-failing-check-summary-4256
Jul 9, 2026
Merged

feat(engine): extract isFailingCheckSummary to gittensory-engine (#4256)#4377
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
andriypolanski:feat/extract-is-failing-check-summary-4256

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Summary

First deliverable from the #4256 tracking issue (engine.ts builder extraction). Extracts isFailingCheckSummary — the smallest dependency blocking reward-risk from dropping its local-branch.ts import — into @jsonbored/gittensory-engine, mirroring the test-evidence.ts extraction pattern.

  • Add packages/gittensory-engine/src/signals/check-summary.ts: canonical failing-check predicate + FAILING_CHECK_STATES list (moved from src/signals/local-branch.ts:754-764).
  • Add src/signals/check-summary.ts: thin re-export shim (same relative-source-path convention as src/signals/test-evidence.ts).
  • Wire callers to the shim: engine.ts, local-branch.ts (re-export kept for backward compat), contributor-open-pr-monitor.ts, github/commands.ts.
  • Drop isFailingCheckSummary from RewardRiskEngineDeps — engine reward-risk.ts imports it directly now (feat(engine): extract src/signals/engine.ts's 7 blocked builder functions (tracking issue) #4256 step 1 complete for the injection seam).
  • Publish ./signals/check-summary subpath export on @jsonbored/gittensory-engine.

Part of #4256 (tracking). Remaining extractions (buildRoleContext, buildLaneAdvice, buildCollisionReport, buildQueueHealth, buildRepoFitRecommendation, buildContributorIntakeHealth, buildPullRequestReviewIntelligence) are follow-up PRs on the same issue.

Closes #4256

Scope

  • Move isFailingCheckSummary implementation to engine package
  • Add Worker shim re-export (src/signals/check-summary.ts)
  • Update all direct importers (engine, local-branch, contributor-open-pr-monitor, github/commands)
  • Remove isFailingCheckSummary from RewardRiskEngineDeps injection
  • Package subpath export + unit tests (all failing states, success paths, status fallback, case folding)

Changed files

File Change
packages/gittensory-engine/src/signals/check-summary.ts New: extracted predicate
packages/gittensory-engine/test/check-summary.test.ts New: branch coverage for all failing states + fallbacks
packages/gittensory-engine/package.json Add ./signals/check-summary export
packages/gittensory-engine/src/reward-risk.ts Import directly; drop from RewardRiskEngineDeps
src/signals/check-summary.ts New: shim re-export
src/signals/local-branch.ts Delegate to shim; keep re-export
src/signals/engine.ts Import from ./check-summary
src/signals/contributor-open-pr-monitor.ts Import from ./check-summary
src/signals/reward-risk.ts Drop isFailingCheckSummary from deps binding
src/github/commands.ts Import from ../signals/check-summary

Validation

Ran locally (green):

npm run typecheck
npx vitest run test/unit/local-branch.test.ts test/unit/reward-risk-reports.test.ts
cd packages/gittensory-engine && npm run build && npx tsc -p tsconfig.test.json && node --test dist-test/check-summary.test.js

Not run before push (recommend):

npm run test:ci
npm audit --audit-level=moderate

Test plan

  • packages/gittensory-engine/test/check-summary.test.ts — all failing states, success, status fallback, case folding
  • test/unit/local-branch.test.ts — failing-check branch status via shim
  • test/unit/reward-risk-reports.test.ts — reviewability with failing checks
  • npm run test:ci green before push

@andriypolanski
andriypolanski requested a review from JSONbored as a code owner July 9, 2026 05:50
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.95%. Comparing base (084cb38) to head (2287c0a).
⚠️ Report is 42 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4377   +/-   ##
=======================================
  Coverage   93.95%   93.95%           
=======================================
  Files         400      401    +1     
  Lines       36820    36820           
  Branches    13452    13452           
=======================================
  Hits        34595    34595           
  Misses       1569     1569           
  Partials      656      656           
Files with missing lines Coverage Δ
packages/gittensory-engine/src/reward-risk.ts 100.00% <100.00%> (ø)
...ges/gittensory-engine/src/signals/check-summary.ts 100.00% <100.00%> (ø)
src/github/commands.ts 98.16% <ø> (ø)
src/signals/contributor-open-pr-monitor.ts 96.22% <ø> (ø)
src/signals/engine.ts 97.45% <ø> (ø)
src/signals/local-branch.ts 97.16% <ø> (-0.02%) ⬇️
src/signals/reward-risk.ts 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 9, 2026
@loopover-orb

loopover-orb Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-09 17:18:20 UTC

10 files · 1 AI reviewer · no blockers · readiness 82/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 5 non-blocking
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4256
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 141 registered-repo PR(s), 84 merged, 25 issue(s).
Contributor context ✅ Confirmed Gittensor contributor andriypolanski; Gittensor profile; 141 PR(s), 25 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: andriypolanski
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Rust, Cuda, Kotlin, MDX, Scala
  • Official Gittensor activity: 141 PR(s), 25 issue(s).
  • Related work: Titles/paths share 6 meaningful terms. (issue #4307, issue #4295)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • 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

@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 1eeef60 into JSONbored:main Jul 9, 2026
10 checks passed
@loopover-orb loopover-orb Bot added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. and removed gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jul 9, 2026
@JSONbored JSONbored added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 9, 2026
@andriypolanski
andriypolanski deleted the feat/extract-is-failing-check-summary-4256 branch July 16, 2026 15:12
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.

feat(engine): extract src/signals/engine.ts's 7 blocked builder functions (tracking issue)

2 participants