Skip to content

#835 Complete advanced source grading workspace with native GPU scopes - #837

Merged
iamfatness merged 16 commits into
mainfrom
codex/source-grading-native-preview-835
Oct 10, 2026
Merged

iamfatness merged 16 commits into
mainfrom
codex/source-grading-native-preview-835

Conversation

@iamfatness

@iamfatness iamfatness commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

#835

Complete the optional advanced source grading workspace for Zoom/capture sources. Expand Grade retains Basic adjustments and opens private drafts with a large native GPU preview, simultaneous histogram/waveform/vectorscope, independent scope taps and scope expansion. Add numeric primaries, master/R/G/B curves, ordered enabled/intensity adjustment stacks, real .cube import, duplicate/reorder/remove, presets, copy/paste and full-grade undo/redo.

One versioned native document drives actual source composition, including Tiles. Apply uses source epochs and revision checks; rejected edits remain drafts. Stable source grades persist and restore for explicit confirmation. Compare is monitor-only and raw ISO behavior is unchanged. Document transport, GPU resources and optional private analysis are bounded. Scope failures/staleness are reported from actual exports; GPU scope bins and rendering never copy source pixels into WinUI. The private workspace/scopes backend currently targets Windows D3D11; Metal composition implements the same grade math.

Validation: Release native/WinUI builds; 2,359 MediaCore and 1,617 shell tests; contract checks; actual BGRA/I420 native pixel parity across source ranges/color matrices; independent grade math checks; six preview pixel tests including known-color histogram/waveform/vectorscope; real bound offscreen WinUI probe with both GPU surface hosts active. Final local native regression passes all 1,554 tests; the earlier 1,550-test checkpoint and failures are retained separately. Metal runtime shader compilation failed initially, was repaired, and its pixel tests now reject pipeline failures rather than silently skipping them. Current-head Metal compositor pixel tests, the full Metal native regression and the macOS show drill pass. The final bound WinUI probe also passes with the final native binary. All current-head hosted CI and CodeQL checks pass, including Windows production native compilation, Windows managed/meter checks, TSan, full Metal native regression and the macOS show drill.

Two pairs of 60-second mixed-source 1080p60/recording trials per workspace setting: all four isolated-monitoring trials had zero measured Program/recording losses with scopes closed or three workspaces open. Actual scope exports advanced with no invalid/unavailable observations. One inline trial in each setting lost two frames; both fail. These pinned implementation-stage trials do not establish final-head release acceptance or attribute the inline failures to grading. #517 remains open.

Owner review: inspect Basic/Advanced preservation; create/reorder a primary, curve and imported LUT; compare the monitor; change scope taps/formats/expansion; apply; undo/reload a preset; confirm saved grades restore as drafts. The offscreen screenshot proves layout, excluding SwapChainPanel pixels; physical display acceptance remains unverified.

Keep draft for owner review. Actual Zoom, webcam/stream receivers, decoded final-file A/V, device-loss/allocation rollback, physical display and sustained hardware coverage remain qualification limits. Native apply acknowledgement means control-state acceptance, not first GPU-frame completion. No merge, release or installation in this change.

As-built specification · Advanced validation evidence

Fixes #838: qualification respects its declared 250 ms sampling interval without relaxing source advancement checks.

Owner scope-quality correction (2026-10-09): waveform/vector bins now 256×256, exported GPU scope texture 1536×512, native scope host 300 px high, both managed texture validators updated. Source sampling remains bounded at 256×144. Review canvas backing buffers now follow display size/DPR and the waveform has more width/height. Final local Release builds, six native preview pixel tests, six scope protocol tests, eleven editor tests and the real-XAML/native probe pass. Two failed probes are retained; they exposed both obsolete managed size checks. Sustained final-head performance and physical-display acceptance remain unverified. Scope-quality evidence.

@iamfatness iamfatness changed the title #835 Replace CPU grade preview with isolated native GPU surfaces #835 Complete advanced source grading workspace with native GPU scopes Oct 9, 2026
@iamfatness
iamfatness marked this pull request as ready for review October 10, 2026 04:07
@iamfatness
iamfatness merged commit 5ea107f into main Oct 10, 2026
17 checks passed
iamfatness added a commit that referenced this pull request Oct 10, 2026
…ead them (#852)

* docs(plan): mac parity batch implementation plan

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs(parity): correct the audit — the Mac is fenced BELOW parity, not over budget

The unmerged 2026-09-27 re-audit (888c45c) never landed, so origin/main
still carried the 2026-08-07 doc describing a product ~940 commits stale.
Worse, two of the re-audit's own claims had since gone wrong: §5.1 read the
Zoom-source ceiling as a missing guard a Mac operator could exceed, when the
core-side 1080P cap (ZoomSubscriptionResolutionPolicy.h:94) already reaches
Mac and the core deliberately fences Mac OUT of that tier (h:71-72) — the gap
runs under-parity, not over-budget. §5.2 (recording-folder resolution) was
left an open question; checked now, AppModel.swift:2334 computes it
absolutely at send time, so the Windows T2.8 bug class cannot occur and it
closes as a non-gap.

Starts from the 888c45c text, applies both corrections with file:line
evidence, reclassifies T3.5 (tiles colour pickers) as N/A-until-Tiles (Mac
has no Tiles wall surface to put pickers on), adds §8 covering the
2026-09-27 -> 10-09 window (150 commits; mac-shell untouched save for #823
diagnostics; 7 open feature PRs touch zero mac-shell files), and replaces §7
with this batch's task list so Tasks 2-5 have a correct spec to cite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(mac): budget-ordered, camera-on, capped spine subscriptions

The wire kind stays 'video' (the core's 720P fence) and the wire purpose
stays 'program' (purpose is subscription identity for kind 'video'); this
lands the ordering/filter/cap machinery the 1080P flip needs. Camera-off
sources no longer hold video subscriptions, so a hasVideo flip now re-pushes
the spine — without that, a camera turned on after assignment never
re-subscribes (the Windows 2026-08-09 frozen-tile defect, mirrored).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(mac): flip spine wire to kind participant-video, real purposes

Completes the 1080P flip on the Mac spine wire, built atop Task 2's
budget-ordered subscriptions (ZoomSourceBudget). spineSubscriptionPayloads
now emits kind "participant-video" (the tiered kind the core already fences
at 720P for the legacy "video" kind) and entry.purpose instead of the
fenced "video"/"program" pair.

Why this is safe to flip now:
- E3: the core's 1080P concurrency cap (kMaxConcurrentFullResolutionCameras
  = 8) already reaches Mac and is granted in payload (budget) order — this
  task activates it for Mac cameras instead of leaving them fenced below
  parity.
- E4: the core deliberately fenced Mac at 720P via kind "video"; moving to
  "participant-video" is the documented unfence path, not a bypass of any
  rule.
- E5/camera-on filter: ZoomSourceBudget (Task 2) already orders/caps/filters
  to camera-on sources before this payload is built, so participant-video's
  "no videoOn check" engine behavior is covered upstream.
- E6: participant-video's engine identity ("participant-video-<pid>-camera")
  excludes purpose, so varying purpose per entry no longer churns warmed
  subscriptions — this is what makes entry.purpose safe to send verbatim.

Native header touch is comments-only (two blocks, ~L71-74 and ~L100-102)
describing the new Mac wire shape; no constant or logic changed
(kMaxConcurrentFullResolutionCameras, wantsFullResolution, and
requestedResolution are untouched).

TDD: edited testSpineSubscriptionWireShape to the new contract first (RED:
2 failures on kind/purpose), flipped the two literals in
spineSubscriptionPayloads (GREEN: 2272/2272 shell checks, self-check PASS).
Native stub build (cmake+ninja, mirroring CI's native-stub-macos job):
1412/1412 tests, ContractParity 11/11, ctest 100%. Mutation testing (revert
kind; hardcode purpose) each reds exactly the targeted assertion and both
were reverted before this commit.

Step 6 (LIVE ACCEPTANCE — owner meeting, >=3 cameras, Diagnostics/churn/
toggle/soak checks) is PENDING, deferred to the controller/owner per this
batch's task split. This commit does not claim it.

Full evidence: .superpowers/sdd/2026-10-09-mac-parity-batch/task-3-report.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(mac): per-source dropout policy — surface, persistence, wire

The §4.1 core half of dropout policy (set-source-policy, #535 slice 4a)
shipped and already reaches the Mac spine sync, but the Mac shell had no
operator control and nothing persisted it. Windows is moving the same
control into its input rows right now (PR #844); this adds the matching
SlotRow control on Mac.

AppModel.ShowInputSlot gains dropoutPolicy (""=unset, core default "hold"
applies). AppModel.sourcePolicyCommands(slots:) is zoom-only (a non-zoom
sourceId pushes a sticky scene-validation warning on every sync — the
expensive regression the test guards), ordinal-sorted by sourceId for
determinism, and keep-first deduped so two slots holding the same
participant can't race the core. An explicit "hold" is always sent
(PRESENT-OR-KEEP: only an explicit value can overwrite a stored "black").
appendSourcePolicies appends after the scene commands already in a batch,
since load-scene-graph clears the core's scene-validation warnings and a
policy sent before it would have any refusal silently wiped.

Persistence mirrors chromaKeys/capturePairings: PersistedSlotPolicy is
keyed by slot (zoom pids churn across meetings; the slot is the stable
operator concept), with all four ShellPrefs additive-safety touch points
(property, CodingKeys case via synthesis, decodeIfPresent, and a populated
roundTripSelfCheck value) so an older prefs file still loads cleanly.

SlotRow gets a borderless Menu (Hold last frame / Black) on zoom-assigned
slots only, styled with the existing Studio.field/Studio.border/.grotesk(11)
row idiom used by the capture audio-pairing menu beside it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(mac): ISO-armed-with-capture-off loud warning (T5)

ISO writers open lazily at their first frame, so a never-fed source
leaves no downstream warning. Warn when ISOs are armed and capture
is OFF (observed or intent). Intent OFF is itself a fact the shell
owns; nil observation with intent ON is unobserved and does not warn.
Parity with Windows T3.7 (E11).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs(parity): mark Tasks 2-5 SHIPPED with commit SHAs

Mark §5.1 (budget-ordered capped spine subscriptions, 1080P flip) and §4.1
(dropout policy) and T3.7 (ISO-armed-with-capture-off warning) as SHIPPED in
the task list, with branch commit SHAs and pending PR status. Record Task 3's
live-acceptance pending status plainly.

Gate: mac-shell release build, 2290 shell checks passed, self-check and design
lint green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(mac): close out final whole-branch review findings (F1-F9)

Doc layer still described the pre-branch product after Tasks 2-5 shipped.
Fixes the final review's full findings list:

- F1: docs/mac-parity-plan.md §4.1/§4.2/§5.1/§6 — add CLOSED-on-this-branch
  banners with commit SHAs, convert CURRENT-tense gap claims to past tense,
  mark the ZoomSubscriptionResolutionPolicy.h header quote as superseded by
  deb2689e, and split §6's "Verified directly" so the dropout-policy absence
  and 1080P kind fence read as verified-then-closed rather than still-current.
- F2: ZoomSourceBudget.swift header — drop the stale "fenced at kind video /
  until the flip task" framing (the flip shipped in deb2689e); state the
  current wire (participant-video + real purpose, budget order) and cite
  ZoomSourceSetPolicy.cs + ZoomEngineRuntime.cpp:435-470.
- F3: add a docs/BACKLOG.md row for the 1080P flip's live acceptance soak
  (plan Task 3 Step 6), and reference it from §7's PENDING line.
- F4: restore the dropped index-1 priority assertion in
  testSpineSubscriptionWireShape.
- F5/F7: give the intent-ON/observed-OFF ISO preflight branch its own copy
  ("re-arm Capture" instead of the wrong "Turn Capture on"), and move the
  IsoCapturePreflight enum below RecordingCommandPolicy so the file's header
  comment documents the right declaration again.
- F6: guard the slotDropoutPolicies prefs restore on slot kind == "zoom".
- F8: wrap the AppModel.swift:2446 call site to the file's column style.
- F9: reword the displayName follow-up note to point at the real blocker
  (Metal slate text, TODO(4a-metal-text) in MetalCompositorAdapter.mm:1209).

Verified: swift build -c release clean; COREVIDEO_SHELL_TESTS=1 2292/0;
COREVIDEO_SHELL_SELFCHECK=1 PASS; scripts/lint-mac-design.sh clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs(parity): note the #837-#849 queue merged post-audit; rebase verified no contract drift

The audit's §8 described the Windows feature queue as open; it merged to
main overnight. The rebase over it hit zero conflicts, touched no mac-shell
file, and left the three core contracts this branch's wire depends on
unchanged (verified by diff: set-source-policy, participant-video tiering,
subscribedVideoFeeds).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: John Wallace <jwallace@Johns-MacBook-Pro.local>
Co-authored-by: Claude Fable 5 <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.

Mixed-source qualification duplicates observations before preparation can advance

1 participant