fix(engine): detect maxIterations/percentComplete changes in progressChanged (#9323) - #9408
fix(engine): detect maxIterations/percentComplete changes in progressChanged (#9323)#9408Yurii214 wants to merge 1 commit into
Conversation
…Changed (JSONbored#9323) progressChanged compared only phase, status, iteration, and the activity tail, so raising the iteration budget mid-run (maxIterations, and the derived percentComplete = iteration / maxIterations) moved a displayed number while the customer surface never pushed — the progress bar showed a stale percent. Add both budget axes to the change diff so any shown-number change streams on change. Closes JSONbored#9323
|
Superagent did not find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-27 16:51:00 UTC
Review summary Nits — 3 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Decision record
🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9408 +/- ##
==========================================
- Coverage 89.49% 89.48% -0.01%
==========================================
Files 838 838
Lines 109676 109684 +8
Branches 26116 26116
==========================================
+ Hits 98154 98156 +2
- Misses 10259 10261 +2
- Partials 1263 1267 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch); conflicts with the base branch — resolve and open a fresh PR; No linked issue detected). 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. |
Summary
progressChanged(packages/loopover-engine/src/loop-progress.ts) decides when a newProgressSnapshotdiffers from the previous one enough to push to the customer's streaming surface — the on-change-not-polling design from #4800. Its doc comment says it compares the displayed axes, but it only checkedphase,status,iteration, and the activity tail; it never comparedmaxIterationsor the derivedpercentComplete.So when an operator raises the iteration budget mid-run (
maxIterationschanges) whileiteration/phase/status/recentActivityall stay the same,percentComplete(=iteration / maxIterations, #6773) silently changes value butprogressChangedreturnedfalse— the surface never pushed the update, and the customer's progress bar went stale on a real, displayed number.This adds both
maxIterationsandpercentCompleteto the existing OR-chain, so any change to a shown number streams on change. It is a pure diff function:buildProgressSnapshotis unchanged and no other behavior is touched.progressChanged's only real consumer is the streaming surface, which benefits directly.Closes #9323
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #9323).Validation
git diff --check— cleannpm run actionlint— passnpm run typecheck— pass (whole repo)npm run test:coverage— measured on the changed file: 100% of changed lines AND branches (23/23 branches), no uncovered lines. Also rannpm run test:changed(every test whose import graph the diff touches): 237 files / 3427 tests pass.npm run test:workers— not run; the diff touches no worker-runtime code.npm run build:mcp— pass (also built@loopover/engine,@loopover/miner)npm run test:mcp-pack— not run; no MCP packaging surface change.npm run ui:openapi:check— n/a; no API / OpenAPI schema change.npm run ui:lint/ui:typecheck/ui:build— n/a; no UI (apps/loopover-ui) change.npm audit --audit-level=moderate— see note below.percentComplete-only change pushes, and all-six-axes-identical does not push (over-trigger guard).If any required check was skipped, explain why:
packages/loopover-engine/src/loop-progress.ts, with no API/OpenAPI, UI (apps/loopover-ui), Cloudflare-worker,wranglerbinding, migration, or MCP-surface change — sotest:workers,test:mcp-pack,ui:*, andui:openapi:checkcover subsystems this diff does not touch. Verified locally:git diff --check,actionlint, whole-repotypecheck, patch coverage 100% on the changed file (23/23 branches),test:changed(237 files / 3427 tests green),@loopover/enginebuild +engine-parity(drift-check and contract test, both pass).npm auditflags only pre-existing advisories already present in the dependency tree; this PR changes no dependency (nopackage.json/package-lock.jsondiff), so it introduces none.Safety
@loopover/enginelogic).UI Evidence
Not applicable — this is a pure
@loopover/enginediff-logic change with no visible UI, frontend, or docs surface.Notes
percentCompleteis derived fromiteration/maxIterations, so in normal data it moves only when one of those does. It is compared as its own displayed axis defensively (and per the issue's requirement); the third regression test isolates that axis by constructing theProgressSnapshotdirectly, sincebuildProgressSnapshotcannot produce apercentCompletechange withiterationandmaxIterationsheld equal.