12 KiB
Task F4: Scope Fidelity Check — Issues (2026-02-27)
Non-compliance / drift items
opengait/demo/sconet_demo.pyforward return contract drift: returns tensorlabeland tensorconfidenceinstead of scalar int/float payload shape described in plan.opengait/demo/window.pyfill_leveldrift: implemented as integer count, while plan specifies len/window float ratio.opengait/demo/output.pyresult schema drift:windowserialized as list (create_result), but plan DoD schema states integer field.opengait/demo/pipeline.pyCLI drift:--sourceconfigured with default instead of required flag.opengait/demo/pipeline.pybehavior drift: no FPS logging loop (every 100 frames) found.tests/demo/test_pipeline.pymissing planned FPS benchmark scenario.tests/demo/test_nats.pyhardcodesNATS_PORT = 4222, conflicting with plan guidance to avoid hardcoded port in tests.
Scope creep / unexplained files
- Root-level unexplained artifacts present:
EOF,LEOF,ENDOFFILE.
Must NOT Have guardrail status
- Guardrails mostly satisfied (no
torch.distributed, no BaseModel in demo, no TensorRT/DeepStream, no GUI/multi-person logic); however overall scope verdict remains REJECT due to 7 functional/spec drifts above.
Blocker Fix: ScoNet checkpoint load mismatch (2026-02-27)
- Reproduced blocker with required smoke command: strict load failed with missing
backbone.*/ unexpectedBackbone.forward_block.*(plusFCs.*,BNNecks.*). - Root cause: naming convention drift between historical ScoNet checkpoint serialization and current
ScoNetDemomodule attribute names. - Resolution: deterministic key normalization for known legacy prefixes while preserving strict load behavior and clear runtime error wrapping when incompatibility remains.
2026-02-27: Scope-Fidelity Drift Fix (F4) - Task 1 - FIXED
Issues Identified and Fixed
-
CLI --source not required (FIXED)
- Location: Line 261 in
opengait/demo/pipeline.py - Issue:
--sourcehaddefault="0"instead of being required - Fix: Changed to
required=True - Impact: Users must now explicitly provide --source argument
- Location: Line 261 in
-
Missing FPS logging (FIXED)
- Location:
run()method inopengait/demo/pipeline.py - Issue: No FPS logging in the main processing loop
- Fix: Added frame counter and FPS logging every 100 frames
- Impact: Users can now monitor processing performance
- Location:
No Other Issues
- No type errors introduced
- No runtime regressions
- Error handling semantics preserved
- JSON output schema unchanged
- Window/predict logic unchanged [2026-02-27T00:44:25+08:00] Removed unexplained root files: EOF, LEOF, ENDOFFILE (scope-fidelity fix)
2026-02-27: NATS Port Fix - Type Narrowing Issue (FIXED)
Issue
sock.getsockname()returnsAnytype causing basedpyright warning- Previous fix with
int()cast still leaked Any in argument position
Fix Applied
- Used
typing.cast(tuple[str, int], sock.getsockname())for explicit type narrowing - Added intermediate variable with explicit type annotation
Verification
uv run basedpyright tests/demo/test_nats.py: 0 errors, 0 warnings, 0 notesuv run pytest tests/demo/test_nats.py -q: 9 passed, 2 skipped
Files Modified
tests/demo/test_nats.pyonly (line 29-30 in_find_open_port())
2026-02-27: Test Expectations Mismatch After fill_level Fix
After changing fill_level to return float ratio instead of integer count,
5 tests in tests/demo/test_window.py now fail due to hardcoded integer expectations:
test_window_fill_and_ready_behavior- expectsfill_level == i + 1(should be(i+1)/5)test_underfilled_not_ready- expectsfill_level == 9(should be0.9)test_track_id_change_resets_buffer- expectsfill_level == 5(should be1.0)test_frame_gap_reset_behavior- expectsfill_level == 5(should be1.0)test_reset_clears_all_state- expectsfill_level == 0(should be0.0)
These tests need updating to expect float ratios instead of integer counts.
2026-02-27: Test Assertions Updated for fill_level Ratio Contract
Status: Test file updated, pending runtime fix
Changes Made
Updated tests/demo/test_window.py assertions to expect float ratios (0.0..1.0) instead of integer frame counts:
| Test | Old Assertion | New Assertion |
|---|---|---|
test_window_fill_and_ready_behavior |
== i + 1 |
== (i + 1) / 5 |
test_window_fill_and_ready_behavior |
== 5 |
== 1.0 |
test_underfilled_not_ready |
== 9 |
== 0.9 |
test_track_id_change_resets_buffer |
== 5 |
== 1.0 |
test_track_id_change_resets_buffer |
== 1 |
== 0.2 |
test_frame_gap_reset_behavior |
== 5 |
== 1.0 |
test_frame_gap_reset_behavior |
== 1 |
== 0.2 |
test_reset_clears_all_state |
== 0 |
== 0.0 |
Blocker
Tests cannot pass until opengait/demo/window.py duplicate fill_level definition is removed (lines 208-210).
Verification Results
- basedpyright: 0 errors (18 pre-existing warnings unrelated to this change)
- pytest: 5 failed, 14 passed (failures due to window.py bug, not test assertions)
Task F4 Re-Audit: Remaining Issues (2026-02-27)
Status update for previous F4 drifts
Fixed:
opengait/demo/pipeline.pysource flag now required (line 268)opengait/demo/pipeline.pyFPS logging present (lines 213-232)opengait/demo/window.pyfill_levelnow ratio float (lines 205-207)tests/demo/test_nats.pydynamic port allocation via_find_open_port()(lines 24-31) and fixture-propagated port- Root artifact files
EOF,LEOF,ENDOFFILEremoved (not found)
Still open:
- Schema mismatch:
opengait/demo/output.py:363emits"window": list(window); plan DoD expects integerwindowfield. - Missing planned FPS benchmark test:
tests/demo/test_pipeline.pycontains no FPS benchmark scenario from Task 12 plan section. - ScoNetDemo sequence contract drift in tests:
tests/demo/test_sconet_demo.py:42,48uses seq=16 fixtures, not the 30-frame window contract emphasized by plan.
Current re-audit verdict basis
- Remaining blockers: 3
- Scope state: not clean
- Verdict remains REJECT until these 3 are resolved or plan is amended by orchestrator.
2026-02-27T01:11:58+08:00 - Fixed: Sequence Length Drift in Test Fixtures
File: tests/demo/test_sconet_demo.py Issue: Fixtures used seq=16 but config specifies frames_num_fixed: 30 Fix: Updated dummy_sils_batch and dummy_sils_single fixtures to use seq=30 Status: ✅ Resolved - pytest passes (21/21), basedpyright clean (0 errors)
2026-02-27: Window Schema Fix - output.py (F4 Blocker) - FIXED
Issue: opengait/demo/output.py:363 emitted "window": list(window), conflicting with plan DoD schema expecting integer field.
Fix Applied:
- Type hint:
window: int | tuple[int, int](backward compatible input) - Serialization:
"window": window if isinstance(window, int) else window[1] - Docstring examples updated to show integer format
Status: ✅ Resolved
- basedpyright: 0 errors
- pytest: 9 passed, 2 skipped
2026-02-27: Task 12 Pipeline Test Alignment - Issues
Initial Failure (expected RED phase)
uv run pytest tests/demo/test_pipeline.py -qfailed in happy-path and max-frames tests because_assert_prediction_schemastill expectedwindowaslist[int, int]while runtime emits integer end-frame.- Evidence: assertion failure
assert isinstance(window_obj, list)with observed payload values like"window": 12.
Resolution
- Updated only
tests/demo/test_pipeline.pyschema assertion to requirewindowas non-negativeint. - Added explicit FPS benchmark scenario with conservative threshold and CI stability guards.
Verification
uv run pytest tests/demo/test_pipeline.py -q: 5 passeduv run basedpyright tests/demo/test_pipeline.py: 0 errors, 0 warnings, 0 notes
Task F4 Final Re-Audit: Issues Update (2026-02-27)
Previously open blockers now closed
opengait/demo/output.pywindow schema mismatch — CLOSED (line 364now emits integer window).tests/demo/test_pipeline.pymissing FPS benchmark test — CLOSED (test_pipeline_cli_fps_benchmark_smoke, lines109-167).tests/demo/test_sconet_demo.pyseq=16 fixtures — CLOSED (fixtures now seq=30 at lines42,48).
Guardrail status
opengait/demo/has notorch.distributedusage and noBaseModelusage.- Root artifact files
EOF/LEOF/ENDOFFILEare absent.
Current issue count
- Remaining blockers: 0
- Scope issues: 0
- F4 verdict: APPROVE
Task: Fix NATS Test Schema and Port Mapping (2026-02-27)
Oracle-Reported Issues
-
Schema Validator Expected List, Runtime Emits Int
- Location:
_validate_result_schemaintests/demo/test_nats.py - Problem: Validator checked
windowaslist[int]with length 2 - Runtime:
create_resultinopengait/demo/output.pyemitswindowasint - Root Cause: Test schema drifted from runtime contract
- Fix: Updated validator to check
isinstance(window, int)andwindow >= 0
- Location:
-
Docker Port Mapping Incorrect
- Location:
_start_nats_containerintests/demo/test_nats.py(line 94) - Problem: Used
-p {port}:{port}which mapped host port to same container port - NATS Container: Listens on port 4222 internally
- Fix: Changed to
-p {port}:4222to map host dynamic port to container port 4222
- Location:
Resolution
Both issues fixed in tests/demo/test_nats.py only. No runtime changes required.
Verification:
- basedpyright: 0 errors, 0 warnings
- pytest: 9 passed, 2 skipped (Docker unavailable)
Fix: Remove Stale Port Mapping (2026-02-27)
Bug: Duplicate port mappings in _start_nats_container caused Docker to receive invalid arguments.
Resolution: Removed stale f"{port}:{port}" line, keeping only f"{port}:4222".
Status: Fixed and verified.
Fix: Remove Duplicate Image Arg (2026-02-27)
Bug: Docker command had "nats:latest", "nats:latest" (duplicate).
Resolution: Kept exactly one "nats:latest".
Status: Fixed and verified.
Oracle Review #2 (2026-02-27): Residual Non-Blocking Issues
M1: Pending asyncio task warning (Minor)
- Location:
opengait/demo/output.py:196 - Symptom: "Task was destroyed but it is pending!" on NATS connection failure
- Fix: Cancel in-flight coroutine in
_stop_background_loop()before stopping event loop - Impact: Cosmetic only
M2: Duplicate docstring line in create_result (Trivial)
- Location:
opengait/demo/output.py:349-350 - Fix: Remove duplicate "Frame window [start, end]" line
M3: Incorrect label examples in create_result docstring (Minor)
- Location:
opengait/demo/output.py:345 - Says "normal", "scoliosis" but labels are "negative", "neutral", "positive"
- Fix: Update docstring to match LABEL_MAP
2026-02-27: Workspace Hygiene Cleanup
Removed scope-creep artifacts from prior delegated runs:
- Deleted
.sisyphus/notepads/demo-tensor-fix/(entire folder) - Deleted
assets/sample.mp4
Repository no longer contains these untracked files.
Blocker: Task 11 Sample Video Acceptance Items (2026-02-27)
Status: BLOCKED - Pending user-provided sample video
Remaining unchecked acceptance criteria from Task 11:
./assets/sample.mp4(or.avi) exists- Video has ≥60 frames
- Playable with OpenCV validation command
Unblock condition: Sample video file provided by user and all 3 criteria above pass validation.
Note: User explicitly stated they will provide sample video later; no further plan items remain outside these blocked sample-video checks.
Heartbeat Check (2026-02-27)
- Continuation check: 3 unchecked plan items remain
- Still no
*.mp4/*.avi/*.mov/*.mkvfiles in repo - Unblock condition: User-provided sample video with >=60 frames and OpenCV-readable
Fix: BBox/Mask Coordinate Mismatch (2026-02-27)
Issue
Demo pipeline produced no classifications for YOLO segmentation outputs because bbox and mask were in different coordinate spaces.
Resolution
Fixed in opengait/demo/window.py - select_person() now scales bbox from frame space to mask space using YOLO's orig_shape metadata.
Verification
- All tests pass (33 passed, 4 skipped)
- Smoke test on provided video yields 56 classifications from 60 frames
- Non-zero confidence values confirmed
Status
RESOLVED
2026-02-27: Sample Video Blocker Resolved
- Previous blocker (missing sample video) is no longer active.
assets/sample.mp4now present and playable via OpenCV with 227 frames.- No remaining open checklist items in
.sisyphus/plans/sconet-pipeline.mdafter checkbox update.