Skip to content

Fixes from the code review: connection state, bake, hardening - #33

Merged
robDL89 merged 4 commits into
mainfrom
fix/review-findings
Nov 11, 2026
Merged

robDL89 merged 4 commits into
mainfrom
fix/review-findings

Conversation

@robDL89

@robDL89 robDL89 commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Findings from a read-only review of the bake and of the threading/protocol/preview code, verified and fixed.

Connection state (Blender)

  • Nothing but the hello is sent until hello_ack arrives: a second Blender waiting in the listener backlog no longer looks connected, and an error before hello_ack (protocol mismatch) disconnects.
  • The drain notices a dropped connection: the panel redraws, and a bake or proxy still waiting is marked as lost.
  • Connect and Disconnect are enabled one at a time; a failed Connect reports an error.
  • Both timers catch their own exceptions instead of being switched off.

Revit hardening

  • A failed Send closes the client only if it is still the current one.
  • SendTimeout of 10 s on the client: a Blender that stops reading cannot freeze Revit.
  • Preview: per-object try/catch; GpuChunk.IsValid also checks formats and effects.

Bake

  • Bake together: a member announced but never arrived keeps its FreeFormElement.
  • A mesh that becomes more than one solid is refused instead of losing the rest silently.
  • The Status Note travels at the end of bake_result.message.
  • A BL_ parameter with its own formula is no longer removed.
  • Cleanup and DESIGN.md alignment.

Tests: pytest (584), dotnet test net48 + net8.0 (719 each), add-in build for Revit 2024 and 2025, Blender 5.2 smoke_bake and smoke_pull: all green. Not yet tried against a live Revit.

🤖 Generated with Claude Code

rdarch-admin and others added 4 commits November 11, 2026 16:45
Blender now sends nothing but the hello until Revit answers with
hello_ack: a second Blender sitting in the listener backlog no longer
looks connected, and an error before hello_ack (protocol mismatch)
disconnects. The drain notices a dropped connection: it redraws the
panel and marks a bake or proxy still waiting as lost. Connect and
Disconnect are enabled one at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A failed Send closes the client only if it is still the current one:
  a Blender that reconnected meanwhile is no longer dropped.
- SendTimeout on the accepted client: a Blender that stops reading can
  no longer freeze Revit inside a write.
- The preview draws each object in its own try/catch: one bad object no
  longer hides the others or skips the transform reset.
- GpuChunk.IsValid also checks vertex formats and effect instances.
- The two Blender timers catch their own exceptions instead of being
  switched off by Blender.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bake together: a member announced but never arrived keeps its
  FreeFormElement instead of being deleted as "no longer selected".
- A mesh that Revit turns into more than one solid is refused with a
  reason instead of keeping only the first solid.
- The Note of the Status now travels at the end of bake_result message,
  so Blender shows it.
- A BL_ parameter with a formula of its own is no longer removed.
- Cleanup: dead members, stale comments, the unused limit argument of
  _normalize_object_ids; DESIGN.md aligned (template, temp save, the
  non-host member baked alone).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tried in Revit 2025: two cubes joined with Ctrl+J become one solid with
two volumes, so the check never fired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robDL89
robDL89 merged commit f1efd6e into main Nov 11, 2026
7 checks passed
@robDL89
robDL89 deleted the fix/review-findings branch November 11, 2026 16:27
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.

2 participants