← Back to Pull requests

fix: address Scene3D inspector and bounds follow-up fixes #5246

Open
unknown opened this pull request with 564 lines diff across 7 files
View on GitHub
unknown unknown commented on Dec 03, 2026 05:50 UTC
Author

!1. What changes & why
!2. What to check

Fixed issues / References


  • Follow-up to #5238 (addresses the final 8 review threads resolved just before #5238 auto-merged)

  • Related to #4780
  • <details><summary>Full description</summary>

    Description


    Follow-up fixes for the last round of review feedback on #5238 in Beutl.AgentToolkit:

  • Time-remapped nested Scene3D transform details: Carry evaluated AlignmentX, AlignmentY, and UserTransform on Scene3DInspector.Scene3DPlacement so MeasureNestedScene3D reports transform metadata from the same evaluated Scene3D.Resource (e.g., when wrapped in DrawableTimeController) rather than re-evaluating at the outer scene clock.

  • Clip transition traversal: Traverse ClipTransitionPresenter.Resource.From and .To in ContainsScene3D and CollectEvaluatedScene3Ds so active Scene3D instances inside clip transitions are recognized and evaluated with their portal inputs.

  • Indirect multi-hop portal chains: Relax CanElementFeedScene3D conservatively when a Scene3D's element has an enabled PortalObject, allowing IsObject3DConsumedAtTime to probe multi-hop chains (such as Z10 -> Z11 -> Z12) when timeSeconds is omitted.

  • Sub-epsilon frustum clipping: Retain finite nonzero plane crossings (denom != 0f && float.IsFinite(denom)) in ClipPolygonAgainstPlane so tiny orthographic triangles straddling a frustum plane are not misclassified as outside-frustum.

  • Absolute time overflow validation: Validate relative + sceneStart inside Scene3DTools.ParseTime and QueryTools.ParseMeasurementTime so near-max timeSeconds values with nonzero scene.Start return ValidationRejected instead of internal_error.

  • Test fidelity: Fix Model3D scale (Vector3(1)) and OBJ Y-flip in the corner-triangle test with explicit projected-bounds overlap assertions, set a non-zero backing Count.Value = 6 in the expression-portal test, and add regression tests for remapped nested Scene3D transforms, multi-hop portals, and absolute time overflow.
  • Screenshots / Render output


    None

    Affected areas


  • Beutl.Engine (rendering / scene / track)

  • Beutl.ProjectSystem (project / document persistence)

  • UI (Beutl.Editor, Beutl.Editor.Components, Beutl.Controls)

  • Beutl.Extensibility (plugin abstractions)

  • Beutl.NodeGraph (node editor)

  • Beutl.FFmpegIpc / Beutl.FFmpegWorker (media IPC boundary)

  • Beutl.Api (server API client)

  • Build / CI / docs only
  • (Scoped to Beutl.AgentToolkit and Beutl.AgentToolkit.Tests.)

    Breaking changes


    None

    Raises the format floor?


    No

    Test plan


  • Updated and added NUnit regression tests in tests/Beutl.AgentToolkit.Tests/Tools/Scene3DToolsTests.cs:

  • - MeasureObjectBounds_skips_empty_expression_portal_and_pre_scene_start_overlaps (non-zero backing Count.Value = 6 overridden by expression "0")
    - ReadScene3D_classifies_diagonal_triangle_outside_viewport_corner_as_outside_frustum (Scale = (1,1,1), OBJ Y-flip, and projected viewport overlap assertion)
    - MeasureObjectBounds_reports_evaluated_transform_for_time_remapped_nested_scene3d
    - MeasureObjectBounds_probes_indirect_multi_hop_portal_chain
    - Scene3D_and_bounds_tools_reject_absolute_time_overflow_with_nonzero_scene_start
  • Executed dotnet format on Beutl.AgentToolkit and Beutl.AgentToolkit.Tests (0 changes).

  • Executed dotnet test tests/Beutl.AgentToolkit.Tests/Beutl.AgentToolkit.Tests.csproj --no-restore --filter "FullyQualifiedName~Scene3DToolsTests|FullyQualifiedName~SchemaGenerationTests|FullyQualifiedName~ToolSurfaceTests|FullyQualifiedName~MeasureObjectBounds": 75 passed, 0 failed.
  • </details>

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Bug Fixes
    Scene measurements now use the scene’s start time when no time is specified and reject times that exceed the supported timeline range.
    Bounds for nested scenes now reflect evaluated transforms, alignment, and enabled state.
    Scene bounds account for Push, Slide, and Zoom transitions, and measurements can follow indirect portal chains.
    * Improved clipping calculations for projected scene bounds.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 564 lines (+423 / -141) across 7 files Reviewer: greptile-apps[bot] Review duration: 18m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.50) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 564 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.379
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #5246"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.7% (MEDIUM) · Higher = larger blast radius
    49.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.3% · Safe to merge
    28.3%
    Repository