EPIC R01 (Team Duy) - safety net before the parallel refactor starts.
R01-T01 docs/architecture/ADR-001-layered-architecture.md
4-tier boundaries, allowed dependency directions, invariants I1-I6 and
the strangler-fig migration strategy.
R01-T02 tests/fakes/{fake_provider,fake_tool_executor}.py
Scripted, offline Provider and extra-tool executor doubles.
R01-T03 scripts/check_imports.py
AST-based Clean Architecture Guard (CASAN Check 3). Also covers relative
imports and function-local imports; ASCII-only output for cp932 consoles.
R01-T04 tests/characterization/test_run_cowork.py
13 snapshot tests pinning run_cowork's current observable contract before
EPIC R04 moves its orchestration into application/.
R01-T05 docs/architecture/dormant-code.md
Import-graph scan: 43 unimported modules verified down to 6 genuinely
dormant items (~1887 LOC); the rest run via subprocess/CLI entry points.
tests/conftest.py binds `cowork_local` to THIS checkout by absolute path -
previously sys.path discovery could import a sibling checkout and the suite
would silently test the wrong code.
Suite: 104 passed, 1.08s (2 pre-existing failures in test_config_security.py
remain - config.py still ships a hardcoded default password, EPIC R02/Team Nam).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
12 lines
593 B
Python
12 lines
593 B
Python
"""Characterization tests: pin the CURRENT behaviour of legacy code (R01-T04).
|
|
|
|
These are not specifications of what the code *should* do - they are a snapshot
|
|
of what it *does* today, written before the refactor so that any behavioural
|
|
drift introduced while moving logic into ``application/`` shows up as a failing
|
|
test rather than as a bug report from a user.
|
|
|
|
Rule for this folder: when a test here fails during the refactor, do not "fix"
|
|
the test first. Decide deliberately whether the behaviour change is intended,
|
|
and only then update the snapshot in the same commit as the change.
|
|
"""
|