test(persistence): add decision persistence suites #438

Closed
brent.edwards wants to merge 2 commits from feature/m4-decision-tests into master
Member

Summary

Closes #180

  • Added features/decision_persistence.feature (21 scenarios) covering decision serialization round-trips, CRUD, snapshots, edge cases
  • Added features/steps/decision_persistence_steps.py (522 lines)
  • Added robot/decision_persistence.robot (7 integration tests) + helper
  • Added benchmarks/decision_persistence_bench.py (4 ASV suites, 17 benchmarks)
  • Updated docs/development/testing.md with decision persistence documentation

Local checks: lint passed, typecheck passed (0 errors)

## Summary Closes #180 - Added `features/decision_persistence.feature` (21 scenarios) covering decision serialization round-trips, CRUD, snapshots, edge cases - Added `features/steps/decision_persistence_steps.py` (522 lines) - Added `robot/decision_persistence.robot` (7 integration tests) + helper - Added `benchmarks/decision_persistence_bench.py` (4 ASV suites, 17 benchmarks) - Updated `docs/development/testing.md` with decision persistence documentation **Local checks**: lint passed, typecheck passed (0 errors)
test(persistence): add decision persistence suites
All checks were successful
CI / lint (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 40s
CI / security (pull_request) Successful in 41s
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 37s
CI / build (pull_request) Successful in 32s
CI / integration_tests (pull_request) Successful in 4m46s
CI / unit_tests (pull_request) Successful in 10m36s
CI / docker (pull_request) Successful in 1m2s
CI / benchmark-regression (pull_request) Successful in 22m26s
CI / coverage (pull_request) Successful in 1h55m50s
f4c4884d03
Add comprehensive persistence test suites for the Decision domain model
covering serialization round-trips (model_dump/model_validate, JSON),
context-snapshot persistence, correction-chain reconstruction, and
decision-tree reconstruction from serialized data.

Deliverables:
- Behave: 21 scenarios in features/decision_persistence.feature
- Robot Framework: 7 integration tests in robot/decision_persistence.robot
- ASV benchmarks: 4 suites (17 benchmarks) in benchmarks/decision_persistence_bench.py
- Documentation: Updated docs/development/testing.md

ISSUES CLOSED: #180
Author
Member

Do not merge this PR individually. All changes are consolidated into PR #442 (develop-brent-5). Please review and merge #442 instead.

**Do not merge this PR individually.** All changes are consolidated into PR #442 (`develop-brent-5`). Please review and merge #442 instead.
Author
Member

Code Review — PR #438: test(persistence): add decision persistence suites

Reviewer: @brent.edwards | Review type: Comment-only

Overall looks solid — I didn’t see any P0/P1/P2 issues. One minor nit to consider:


P3:nit — Hard-coded "11 decision types" is brittle

The feature/steps/robot helper all assert there are exactly 11 DecisionType values (e.g., features/decision_persistence.feature, features/steps/decision_persistence_steps.py, robot/helper_decision_persistence.py). This will fail whenever a new decision type is added. Consider deriving the expected count from len(DecisionType) or rewording the assertion to verify round-trip success for all current enum values.


No blockers from my side.

## Code Review — PR #438: test(persistence): add decision persistence suites **Reviewer:** @brent.edwards | **Review type:** Comment-only Overall looks solid — I didn’t see any P0/P1/P2 issues. One minor nit to consider: --- ### P3:nit — Hard-coded "11 decision types" is brittle The feature/steps/robot helper all assert there are exactly 11 `DecisionType` values (e.g., `features/decision_persistence.feature`, `features/steps/decision_persistence_steps.py`, `robot/helper_decision_persistence.py`). This will fail whenever a new decision type is added. Consider deriving the expected count from `len(DecisionType)` or rewording the assertion to verify round-trip success for all current enum values. --- No blockers from my side.
fix(test): derive decision type count from enum instead of hard-coding 11
Some checks failed
CI / lint (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 55s
CI / security (pull_request) Successful in 51s
CI / quality (pull_request) Successful in 32s
CI / integration_tests (pull_request) Successful in 5m12s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 24s
CI / unit_tests (pull_request) Successful in 33m37s
CI / benchmark-regression (pull_request) Successful in 26m3s
CI / docker (pull_request) Successful in 1m1s
CI / coverage (pull_request) Has been cancelled
b99510d016
Replace hard-coded '11 decision types' with dynamic len(DecisionType) in
the assertion and remove the literal from scenario names, step patterns,
docstrings, and docs so the tests stay correct when new DecisionType
values are added.
Merge branch 'master' into feature/m4-decision-tests
All checks were successful
CI / lint (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 36s
CI / security (pull_request) Successful in 57s
CI / typecheck (pull_request) Successful in 1m11s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 27s
CI / integration_tests (pull_request) Successful in 5m10s
CI / unit_tests (pull_request) Successful in 35m17s
CI / benchmark-regression (pull_request) Successful in 24m40s
CI / docker (pull_request) Successful in 13s
CI / coverage (pull_request) Successful in 2h10m22s
45320e3fbf
brent.edwards closed this pull request 2026-02-26 23:54:12 +00:00
brent.edwards deleted branch feature/m4-decision-tests 2026-02-26 23:54:17 +00:00
All checks were successful
CI / lint (pull_request) Successful in 23s
Required
Details
CI / quality (pull_request) Successful in 36s
Required
Details
CI / security (pull_request) Successful in 57s
Required
Details
CI / typecheck (pull_request) Successful in 1m11s
Required
Details
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 27s
Required
Details
CI / integration_tests (pull_request) Successful in 5m10s
Required
Details
CI / unit_tests (pull_request) Successful in 35m17s
Required
Details
CI / benchmark-regression (pull_request) Successful in 24m40s
CI / docker (pull_request) Successful in 13s
Required
Details
CI / coverage (pull_request) Successful in 2h10m22s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!438
No description provided.