Skip to content

Phase A2: world-model auto-default calibration (fix silent no-op) - #6

Closed
mandarwagh9 wants to merge 1 commit into
feat/phaseA-1-honest-docsfrom
feat/phaseA-2-worldmodel-fix
Closed

mandarwagh9 wants to merge 1 commit into
feat/phaseA-1-honest-docsfrom
feat/phaseA-2-worldmodel-fix

Conversation

@mandarwagh9

Copy link
Copy Markdown
Owner

What & why

Phase A2 of the 10× roadmap — the highest-impact correctness fix in Phase A.

The bug: with no CAMERA_POSITIONS configured, pixel_to_world() returned None for every camera, so the world model produced zero world objects and zero predictions. The entire fusion layer silently no-opped — viewers saw only raw detections and per-camera tracks.

⚠️ Stacked on #5 → #4. Auto-retargets as the chain merges.

Changes

  • WorldModelRepositoryImpl._ensure_calibration() — lazily synthesizes a default calibration (cameras spread along x-axis, height 2.5 m, focal 800) when a camera has none, with a one-time warning. Explicit CAMERA_POSITIONS still take precedence.
  • Wired into _process_track and generate_predictions, so both track fusion and view-only prediction cameras work out of the box.
  • backend/ARCHITECTURE.md: CAMERA_POSITIONS is now documented as recommended (auto-defaulted), not required.

Tests (TDD — written first, watched fail, then implemented)

4 new tests in test_world_model_auto_calibration.py:

  • world objects are created without CAMERA_POSITIONS
  • default calibration is created lazily for an unseen camera id
  • explicit CAMERA_POSITIONS take precedence over the default
  • generate_predictions for a second camera doesn't raise

Verification

  • ruff clean · mypy clean (16 files) · 61 tests pass (was 57).

🤖 Generated with Claude Code

…AMERA_POSITIONS

Phase A2 of the 10x roadmap. Previously, with no CAMERA_POSITIONS configured,
pixel_to_world() returned None for every camera, so the world model produced
ZERO world objects and ZERO predictions — viewers saw only raw detections and
per-camera tracks, and the "fusion" layer silently no-opped.

- Add WorldModelRepositoryImpl._ensure_calibration(): lazily synthesize a default
  calibration (cameras spread along x-axis, height 2.5 m, focal 800) when a camera
  has none, with a one-time warning. Explicit CAMERA_POSITIONS still take precedence.
- Wire it into _process_track and generate_predictions so both track fusion and
  view-only prediction cameras work out of the box.
- Tests: 4 new (objects created without config; lazy creation for unseen camera;
  explicit positions win; predictions don't raise for a second camera).
- Docs: backend/ARCHITECTURE.md no longer claims CAMERA_POSITIONS is required.

Backend gate green: ruff + mypy clean, 61 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mandarwagh9

Copy link
Copy Markdown
Owner Author

Superseded — all commits from this phase landed on main via the merge of #13 (the top of the stack, which contains every phase commit). Closing to tidy up; the work is fully merged.

@mandarwagh9
mandarwagh9 deleted the feat/phaseA-2-worldmodel-fix branch June 19, 2026 15:49
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