Skip to content

Drain GUI recompute follow-up after /v1/run recompute:true - #6

Closed
jkbennitt wants to merge 7 commits into
mainfrom
cursor/recompute-drain-2105
Closed

jkbennitt wants to merge 7 commits into
mainfrom
cursor/recompute-drain-2105

Conversation

@jkbennitt

@jkbennitt jkbennitt commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

When /v1/run asks for recompute:true, run_script stays on the document thread until rebuild is actually finished (or hard-fails). Default is still recompute:true. recompute:false is unchanged.

What changed

After the host document.recompute():

  1. Pump Qt so GUI follow-up can run; wait while cooperative / pending / presentation gates block; re-issue if anything is still Touched.
  2. That is not enough for PolarPattern after openDocument. Live probes: idle recompute:true, in-script doc.recompute() twice, and polling Shape.Volume do not change a wrong solid. pad.touch()+tip.touch() or re-assigning the same Length, then recompute, does.
  3. For PartDesign Body/pattern tips, drain now dirties Tip, Body, pattern Originals/BaseFeature, and objects that were Touched at the start of the call, then rebuilds.
  4. Repeat that dirty pass until Volume is stable across it (or ~30s RECOMPUTE_DRAIN_TIMEOUT).
  5. Docs without those tips keep the original one-recompute drain.

document.recompute(..., True) is not used as the extra pass: force only bypasses SkipRecompute; it does not execute Up-to-date features.

Verify

python3 -m pytest -q src/Mod/VibeCAD/vibecad_tests/test_agent_control_recompute_drain.py src/Mod/VibeCAD/vibecad_tests/test_agent_control.py src/Mod/VibeCAD/vibecad_tests/test_agent_control_grok_bot.py

Result: 140 passed, 1 skipped in 4.68s

python3 -m pytest -q src/Mod/VibeCAD/vibecad_tests/test_agent_control_recompute_drain.py

Result: 22 passed in 0.16s

Live propeller first-after-open remains a manual check on the Windows GUI host.

Remaining risk

  • PartDesign Body/pattern docs pay one extra dirty rebuild when already correct (~+1s); a wrong first solid pays two (fix + confirm).
  • A settled-wrong solid that is not a Body/pattern tip is not dirtied.
  • This PR does not claim live ShawnHymel propeller proof.

Compatibility

  • Existing public functions/APIs still present and behaviorally compatible.
  • No preference keys, tool names, or schema fields renamed/removed.
  • Defaults preserve previous behavior (recompute still defaults to true).
  • No deprecations.
  • No breaking changes.

Refs #5

Open in Web Open in Cursor 

10-X-eng and others added 4 commits September 17, 2026 14:07
Fix macOS runtime packaging and ship Codex 0.154.0 in build6
Host recompute can early-return and queue a GUI follow-up while
cooperative/pending/presentation gates are active. Stay on the
document thread, pump Qt, and hard-fail with RECOMPUTE_DRAIN_TIMEOUT
instead of returning stale geometry as success.

Co-authored-by: Jason <[email protected]>
@jkbennitt

Copy link
Copy Markdown
Member Author

Live Windows retest passed on this branch: fem_bracket HTTP false-burst then recompute:true now returns Body volume 4844.6 in the same response (~1213 ms / recompute_drain_ms ~1204), vs ~8 ms + stale 3625.9 before. Details on #5.

cursoragent and others added 3 commits September 18, 2026 20:23
Gates-clear plus Up-to-date is not enough after open: patterned
PartDesign tips can hold a stable but incomplete solid, and a later
idle recompute is a no-op. After flags go idle, sample Tip/Body Shape
signatures, re-issue if volume is still moving or Tip disagrees with
Body, and force one rebuild for patterned tips.

Co-authored-by: Jason <[email protected]>
Live propeller probes: idle recompute and document.recompute(force)
are no-ops on an Up-to-date PolarPattern. touch(Tip)+touch(Pad) (or
re-assigning the same Length) then recompute repairs the incomplete
solid. After the primary drain, dirty those features and rebuild
until Volume is stable across that pass.

Co-authored-by: Jason <[email protected]>
@jkbennitt

Copy link
Copy Markdown
Member Author

Closing as superseded by the upstream PR into 10-X-eng main: 10-X-eng#246 (Fixes 10-X-eng#245).

Same branch lineage (cursor/recompute-drain-2105). Not merging this fork-to-fork PR into AppSprout main separately. Private research tracker remains #5.

@jkbennitt jkbennitt closed this Sep 18, 2026
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.

3 participants