Click/Typer CliRunner.Result.stderr is a property that raises
ValueError when stderr was not separately captured (mix_stderr=True
is the default). Wrap all result.stderr accesses in try/except
to handle this gracefully.
Core domain types (FragmentProvenance, ContextFragment, ContextBudget,
ContextPayload) now extend their CRP counterparts via Pydantic v2
inheritance, ensuring isinstance compatibility across the model
hierarchy.
Key changes:
- CRP base types made frozen=True (no consumer mutates them)
- CRP AssembledContext fields changed from list to tuple (frozen consistency)
- Core types extend CRP bases: FragmentProvenance(CRPFragmentProvenance),
ContextFragment(CRPContextFragment), ContextBudget(CRPContextBudget),
ContextPayload(CRPAssembledContext)
- Removed duplicate ContextFragment dataclass from skeleton_compressor
- Updated project_context.py to pass tuples to frozen AssembledContext
- Added Behave tests (10 scenarios), Robot integration tests (3 cases),
and ASV benchmarks for the unified hierarchy
- Updated Known Limitations table in docs/reference/acms.md
ISSUES CLOSED: #569
The 'Test project list command with no projects' scenario was missing a
Given step to set up a writable working directory. Without it, the
container fell back to CWD/.cleveragents/db.sqlite which could not be
opened (directory did not exist), causing sqlite3.OperationalError.
- Add 'Given I have a temporary working directory' to the scenario
- Bootstrap the SQLite schema in the When step so the ns_projects table
exists for the empty-list query
The 'Test project list command with no database' scenario asserted the
command should abort, but the DI container creates a default SQLite DB
so list_projects() returns an empty list and exits 0 with 'No projects
found'. Update the scenario to match the actual (correct) behavior.