feat(miner-portfolio): add pure non-convergence detector to gittensory-engine - #4344
Conversation
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…y-engine
New packages/gittensory-engine/src/portfolio/non-convergence.ts: a pure classifier over
one queue item's attempt/outcome counts, returning { status, reasons } where status is
converging | stalled | non_convergent. Zero attempts and a reached-done item read
converging; a single failure/re-enqueue reads stalled; only a sustained streak past
threshold reads non_convergent. No IO, no Date.now, no randomness.
DETECTOR only — no enforcement; the fail-closed Governor chokepoint that composes it is
separate maintainer-owned work (JSONbored#2340). Mirrors the pure-classifier discipline of
contributor-fit.ts; re-exported from the package entrypoint.
Closes JSONbored#4286
418090d to
883c333
Compare
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 17:20:14 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Flagged checks (non-blocking)
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 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.
|
|
Gittensory is closing this pull request on the maintainer's behalf (CI is failing (Contributor trust)). 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. |
Adds a pure non-convergence DETECTOR to the engine (Closes #4286).
New
packages/gittensory-engine/src/portfolio/non-convergence.ts: a pure classifier over one portfolio-queue item's attempt/outcome counts —classifyPortfolioConvergence(input, thresholds)returning{ status, reasons }wherestatusisconverging | stalled | non_convergent.Rules (mirroring the pure-classifier discipline of
contributor-fit.ts):converging— a first attempt is not evidence of a stuck loop (the same non-judgment-on-absence rulecontributor-fit.tsuses).convergingby definition.stalled, never non-convergent.consecutiveFailuresorreenqueuesat/above its threshold ⇒non_convergent(the observable "cycling queued→in_progress→queued without reaching done" fromportfolio-queue.js:108-115).DETECTOR only — no IO, no
Date.now(), no randomness, no enforcement, no write-blocking. It produces one input signal; the fail-closed Governor chokepoint that composes it (rate-limit + budget caps + this) is separate, maintainer-owned work tracked in #2340. Re-exported fromsrc/index.tsalongside./portfolio/queue.js.Test
test/portfolio-non-convergence.test.ts— zero history, one failure (stalled), single re-enqueue (stalled), a converging/improving streak, reached-done, a consecutive-failure streak past threshold, a re-enqueue streak past threshold, both streaks (two reasons), and configurable thresholds. Full engine suite: 284 pass;test:engine-paritygreen.site//CNAME/**/lovable/**; noCHANGELOG.md. New engine module + test + one entrypoint re-export.