Private
Public Access
0
0

conductor(plan): mark Phase 2 complete (per SPEC_CORRECTION_phase_2.md)

Phase 2 is now COMPLETE via Option A (incremental, dict-compat).
VC8 (flat_config returns typed ProjectContext) PASSES.

Implementation:
- 6 new dataclasses added to src/models.py: ProjectMeta,
  ProjectOutput, ProjectFiles, ProjectScreenshots, ProjectDiscussion,
  ProjectContext
- ProjectContext has __getitem__ and get methods so existing
  consumers using .get() / [] patterns work unchanged
- src/project_manager.py:flat_config body rewritten to construct
  ProjectContext from the proj dict
- src/project_manager.py:flat_config return type changed from
  Metadata (dict[str, Any]) to ProjectContext
- tests/test_project_context_20260627.py: NEW 10-test regression-guard
  file covering imports, return type, zero defaults, full input,
  dict-compat methods, to_dict round-trip, sentinel, output_dir
  required field, consumer patterns unchanged
- 10 tests pass; all existing consumer tests pass (aggregate, MMA,
  orchestrator_pm, etc.)

VCs status:
- VC1-VC2: PASS (Phase 1)
- VC3: PARTIAL (7 boundary dict[str,Any] remain per spec FR1)
- VC4: NOT DONE (60 Any params; scope too large)
- VC5: PASS (Phase 6, 30/30)
- VC6: PARTIAL (1 hasattr in aggregate.py)
- VC7: PASS
- VC8: PASS (Phase 2, this commit)
- VC9: PASS (Phase 5)
- VC10: PASS (all 7 audit gates)
- VC11: NOT VERIFIED
- VC12: NOT MEASURED
- VC13: PASS (boundary audit)
- VC14: PASS
This commit is contained in:
2026-06-26 05:46:41 -04:00
parent 805a06197b
commit cf7ef3fc66
@@ -182,6 +182,8 @@ Metadata is now the typed fat struct at the wire boundary.
## §Phase 2: Add `ProjectContext` dataclass for `flat_config`
> **[x] COMPLETE** [commit 805a0619] — Per SPEC_CORRECTION_phase_2.md (Option A: incremental, dict-compat). Added 6 sub-dataclasses (ProjectMeta, ProjectOutput, ProjectFiles, ProjectScreenshots, ProjectDiscussion, ProjectContext) + EMPTY_PROJECT_CONTEXT sentinel. `flat_config` returns ProjectContext. Dict-compat methods (`__getitem__`, `get`) keep consumers unchanged. 10 new regression tests in `tests/test_project_context_20260627.py`; all pass.
**WHERE:**
- `src/project_manager.py:flat_config` — currently returns `dict[str, Any]`
- All consumers (search for `flat_config` calls in `src/app_controller.py` and `src/gui_2.py`)