Skip to content

feat(experimental): Experimental Features window (Help → curated AUTOPTZ_* flags, persisted)#132

Open
TCVinNYC wants to merge 8 commits into
mainfrom
feat/experimental-features-window
Open

feat(experimental): Experimental Features window (Help → curated AUTOPTZ_* flags, persisted)#132
TCVinNYC wants to merge 8 commits into
mainfrom
feat/experimental-features-window

Conversation

@TCVinNYC

Copy link
Copy Markdown
Member

Summary

Adds an Experimental Features dialog (Help menu) exposing the curated experimental AUTOPTZ_* flags + the 4 experimental TrackingConfig fields — each with a plain description, default, and "Restart required" badge — persisted via ConfigStore and applied to os.environ at engine start so they take effect on the next start.

⚠️ Needs your visual sign-off before merge

The dialog look/UX wants your eyes (the dev app isn't screenshottable). Open Help → Experimental Features… and confirm the rows/badges/combos read well. Not merged.

What's included

  • autoptz/engine/runtime/experimental_flags.py — single typed source of truth (EXPERIMENTAL_FLAGS + TRACKING_DEFAULT_FIELDS): unified_pose, async_appearance, ptz_pump, process_per_camera, reid_device, coreml_units (incl. CPUAndNeuralEngine), ndi_color_format, ptz_serial_autoprobe, + the 4 tracking fields.
  • ExperimentalFeaturesDialog (ui/widgets/dialogs/experimental.py): checkbox/combo rows + badges; Apply persists + notes "some changes need a restart"; Restore defaults. Never mutates os.environ or restarts.
  • Supervisor applies the persisted dict to os.environ in _apply_hardware_env before spawning workers — and only manages keys you actually persisted (does not clobber an operator-exported AUTOPTZ_* var).
  • Help → "Experimental Features…" menu action.

Notes

  • This is how you'll toggle process-per-camera (Path A) — it carries a "Restart required" badge.
  • cyndilib/NDI etc. unaffected.

Verification

Gates green locally (.venv, offscreen): ruff, ruff format, mypy (engine/runtime + config — flag module fully typed), --selftest, and 1459 tests pass (run per-file on macOS — a pre-existing environmental offscreen-Qt teardown segfault prevents a single-process full run; it reproduces on main and not on Linux CI; every file passes in isolation).

Plan: docs/superpowers/plans/2026-06-26-experimental-features-window.md

🤖 Generated with Claude Code

TCVinNYC and others added 8 commits June 26, 2026 09:24
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…viron at start

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…on apply)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The supervisor's experimental-env apply previously popped EVERY managed key
when the experimental_features dict lacked it, which clobbered env vars set
directly outside the experimental system (e.g. an operator export, or a test's
monkeypatch.setenv of AUTOPTZ_PROCESS_PER_CAMERA). Now only keys present in the
persisted dict are set/popped; un-persisted keys are left untouched, which is a
stronger 'feature-inactive == unchanged behaviour' guarantee. Fixes a regression
in test_process_worker.py::TestIdentityRelay introduced by the env-apply step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant