Skip to content

Aggressive PRUNE_ALPHA under visual_guard (still JPEG Alpha unlink) - #2

Open
liminallyspaced wants to merge 2 commits into
mainfrom
plugwalk/prune-alpha-aggressive
Open

Aggressive PRUNE_ALPHA under visual_guard (still JPEG Alpha unlink)#2
liminallyspaced wants to merge 2 commits into
mainfrom
plugwalk/prune-alpha-aggressive

Conversation

@liminallyspaced

Copy link
Copy Markdown
Owner

Summary

  • Wire already-coded L1 DEAD_CLOSURE_PRUNE into Aggressive Make it Fast for PRUNE_ALPHA only (JPEG / no-alpha / IGNORE / Value=1.0 Alpha unlink). No new Cycles RNA. time_factor 1.0. Auto label is not "manual". Auto tier is 1 so it clears DEFAULT_TIER_MAX.
  • Preserve Look default, Balanced (BALANCED_BLOCKED_KINDS), and Video (VIDEO_BLOCKED_KINDS + Aggressive+VIDEO special-case) withhold it. Other PRUNE_* stay Manual-later at tier 2.
  • Register _HANDLERS["DEAD_CLOSURE_PRUNE"]; apply uses payload records; revert is existing NODE_UNLINK. 0.3.5 visual_guard isolates the kind in its own group and fail-closes.
  • Manifest stays 0.3.5. No zip. No store % change (Classroom 41% / loft 52%). Prior inventory, not a measured cut: loft DNA FIRED=7 JPEG / Classroom FIRED=0.

This PR starts from plugwalk/distance-cull-aggressive (PR #1, CAMERA_CULL disjoint-set AND-on-same-object fix). That commit is included; leave PR 1 open.

Test plan

  • python3 tests/test_dead_closures.py — ALL TESTS PASSED (216 ok)
  • python3 tests/test_speed_solver.py — ALL TESTS PASSED (260 ok)
  • python3 tests/test_visual_guard.py — ALL TESTS PASSED (15 ok)
  • python3 tests/test_portal_meshes.py — ALL TESTS PASSED (98 ok)
  • tests/test_preserve_look.py needs Blender (bpy); not run in this environment
  • Official loft GPU pair when the 2080 is free — warn Nick first. Do not replace loft 52% unless the cut jumps.

ScreenQuantDEV added 2 commits August 30, 2026 18:25
Cycles object_cull.cpp ANDs when both object cull flags are set on the
same name (keeps nearby off-frustum for reflections). Dual flags on the
CAMERA_CULL scatter list would regress the Classroom cull slice of the
41% plate.
Split into disjoint sets: payload objects get use_camera_cull only;
distance_objects (far tiny via min_camera_distance) get use_distance_cull
only. Scene may enable both flags; missing distance RNA stays camera-only.
Manifest stays 0.3.5; no store % change.
JPEG Alpha unlink only; Preserve Look/Balanced/Video withhold; visual_guard own group fail-closed; time_factor 1.0; manifest 0.3.5; no store %.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ada533cdc4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if distance_enabled:
# Prefer scene distance on whenever RNA exists (Manual path / later
# objects). Object flags still drive which objects actually cull.
jrnl.set_prop(scene, "cycles.use_distance_cull", True, SPEED_TAG)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not enable distance cull outside the planned set

When a scene already has objects with object.cycles.use_distance_cull=True while the scene-level distance switch is off, any CAMERA_CULL action now turns scene.cycles.use_distance_cull on even if payload["distance_objects"] is empty or unrelated. That activates pre-existing per-object distance-cull flags outside the analyzed payload, so Aggressive Make it Fast can unexpectedly cull far objects that the planner did not select; only enable this scene flag when the selected distance set is intended and safe.

Useful? React with 👍 / 👎.

Comment on lines +2095 to +2099
return [SpeedAction(
"DEAD_CLOSURE_PRUNE",
"%d JPEG / opaque-constant Alpha socket(s) -> unlink (PRUNE_ALPHA)"
% n,
"dead", 1, 1.0, 1,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run the visual guard before auto-unlinking Alpha

This adds DEAD_CLOSURE_PRUNE to the auto plan only for Aggressive stills, but the UI apply path calls run_guarded_speed_plan only when plan.profile == "PRESERVE_LOOK" (scenequant/ui/operators.py lines 1533-1544), and _allowed_by_policy excludes this kind from Preserve Look. As a result the newly automated Alpha unlink never reaches the visual-guard group added in this commit and is applied directly with no render/rollback check; include this kind/profile in guarded execution before putting it in the default plan if the intended behavior is fail-closed.

Useful? React with 👍 / 👎.

Sign up for freeto 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.

1 participant

@liminallyspaced