FCL-M2 Batch A local coach - #3
Draft
PNHD wants to merge 18 commits into
Draft
Conversation
Adds the balanced 24 MP tier (default for clean installs), preserves every meaningful supported dimension, enables AVCapturePhotoOutput automatic deferred photo delivery before session start/reconfiguration, saves deferred proxies via PHAssetResourceType.photoProxy, and keeps requested / capture-resolved / proxy-resolved / final Photos dimensions distinct until Photos confirms the fused asset. Camera switching recomputes 12/24/48 availability. A filter or non-4:3 crop truthfully falls back to the immediate 12 MP path because the deferred proxy cannot honor in-app post-processing.
PlanSession snapshots zoom/exposure baselines and never mutates the camera; Apply uses absolute values, Undo restores the exact baseline, and a capability-generation change invalidates the session. OnDeviceAnalyzer now emits a privacy-safe SceneDescriptor (pose/face landmarks, lighting, blur proxy, cached classifications, availability-gated low-cadence 3D pose) with SubjectIdentityTracker association that never jumps to an unrelated object. coachV2Enabled and aestheticsEnabled default OFF.
Versioned owned-synthetic template schema with deterministic generation from 14 canonical seeds to 92 validated variants (mirroring, framing scale, camera height, lean, multi-subject spacing). Validation covers joint angles, limb ratios, crop-safe face zones and ground placement; deduplication uses canonical rounding, mirror equivalence and a distance threshold. Regenerate with scripts/generate_pose_templates.py; output is byte-deterministic.
LocalPlanner runs hard rejection before scoring and returns Primary/Safe/Creative plans with deterministic weights and greedy max-min diversity. CameraSession snapshots PlanSession on Analyze, applies absolute zoom/exposure on Apply, restores the exact baseline on Undo, and invalidates on camera/capability change. The beta Settings toggle (default OFF) routes Analyze through the local planner; plan titles, selection, Apply and Undo render in the existing guidance overlay. Aesthetics remain protocol-only with zero weight. Adds locked architecture doc and project wiring.
High-value tests: Analyze never mutates zoom/exposure, absolute Apply, exact-baseline Undo, ten-cycle no-drift, capability-generation invalidation, stale SceneDescriptor rejection, deterministic stabilization, no subject jump after tracking loss, bundle schema validation, deterministic/mirror dedup, implausible and crop-unsafe rejection, hard constraints before scoring, feasible diverse Primary/Safe/Creative plans, and default-OFF persisted feature flags. 12/48 MP and manual shutter behavior remains covered by the existing resolution tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FCL-M2 Batch A integration candidate.\n\n- Source SHA: dc72e04\n- CI validation pending\n- No merge requested.