Skip to content

fix(engine): compare maxIterations and percentComplete in progressChanged - #9332

Closed
philluiz2323 wants to merge 1 commit into
JSONbored:mainfrom
philluiz2323:fix/9323-progress-changed-max-iterations
Closed

fix(engine): compare maxIterations and percentComplete in progressChanged#9332
philluiz2323 wants to merge 1 commit into
JSONbored:mainfrom
philluiz2323:fix/9323-progress-changed-max-iterations

Conversation

@philluiz2323

Copy link
Copy Markdown
Contributor

Problem

Closes #9323.

progressChanged compared phase, status, iteration, and the activity tail — but not maxIterations or percentComplete. When an operator raised the iteration budget mid-run while those other axes stayed the same, the customer-facing progress bar went stale because no push was emitted.

Fix

Include maxIterations and percentComplete in the progressChanged comparison, matching the displayed snapshot axes.

Tests

  • Extend the existing change-detection test to cover maxIterations.
  • Regression: raising maxIterations from 5→10 at the same iteration pushes even when activity is unchanged.

Reverting either comparison fails the regression test. git diff --check clean.

Validation

  • vitest run test/unit/loop-progress.test.ts (14 pass)
  • Engine progress-only; unrelated UI/MCP checks not exercised.

Safety

  • No secrets exposed; no UI changes (N/A evidence)

…nged

progressChanged only compared phase/status/iteration/activity, so raising
maxIterations mid-run changed percentComplete without triggering a customer-facing
push. Compare both displayed budget axes alongside the existing fields.

Closes JSONbored#9323
@philluiz2323
philluiz2323 requested a review from JSONbored as a code owner July 27, 2026 13:12
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.38%. Comparing base (f7dda79) to head (c133ee2).

Files with missing lines Patch % Lines
packages/loopover-engine/src/loop-progress.ts 50.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9332      +/-   ##
==========================================
- Coverage   75.38%   75.38%   -0.01%     
==========================================
  Files         275      275              
  Lines       58023    58026       +3     
  Branches     6181     6181              
==========================================
+ Hits        43739    43740       +1     
- Misses      14014    14016       +2     
  Partials      270      270              
Flag Coverage Δ
engine 65.58% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-engine/src/loop-progress.ts 61.29% <50.00%> (-0.94%) ⬇️

@philluiz2323

Copy link
Copy Markdown
Contributor Author

Closing: engine patch coverage requires packages/loopover-engine tests; re-scoping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

engine: progressChanged ignores maxIterations/percentComplete changes in the loop-progress snapshot diff

1 participant