add backend endpoints for editor context and draft summaries ensure draft flow bootstrap for editor-driven workflows improve draft-aware initialization and summary reads for clients
122 lines
4.8 KiB
Markdown
122 lines
4.8 KiB
Markdown
# Smoke regression checklist
|
|
|
|
This file is the backend manual regression baseline for svg-service.
|
|
|
|
## Preconditions
|
|
|
|
- docker compose stack is up
|
|
- backend responds on port 9020
|
|
- valid admin API key is available
|
|
- test scheme exists
|
|
|
|
## Environment
|
|
|
|
Use these variables in shell:
|
|
|
|
export API_URL="http://127.0.0.1:9020"
|
|
export API_KEY="admin-local-dev-key"
|
|
export SCHEME_ID="82086336d385427f9d56244f9e1dd772"
|
|
|
|
## 1. Health / system
|
|
|
|
- GET /healthz -> 200
|
|
- GET /api/v1/ping -> 200
|
|
- GET /api/v1/db/ping -> 200
|
|
- GET /api/v1/manifest -> 200
|
|
|
|
## 2. Scheme registry
|
|
|
|
- GET /api/v1/schemes -> 200
|
|
- GET /api/v1/schemes/{scheme_id} -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/current -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/versions -> 200
|
|
|
|
## 3. Structure read model
|
|
|
|
- GET /api/v1/schemes/{scheme_id}/current/sectors -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/current/groups -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/current/seats -> 200
|
|
|
|
## 4. SVG / display pipeline
|
|
|
|
- GET /api/v1/schemes/{scheme_id}/current/svg -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/current/svg/display -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/current/svg/display/meta -> 200
|
|
|
|
## 5. Pricing read model / diagnostics
|
|
|
|
- GET /api/v1/schemes/{scheme_id}/pricing -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/pricing/coverage -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/pricing/unpriced-seats -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/pricing/explain/{seat_id} -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/pricing/rules/diagnostics -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/current/seats/{seat_id}/price -> 200 for priced seat
|
|
- GET /api/v1/schemes/{scheme_id}/test/seats/{seat_id} -> 200 for priced and unpriced seat
|
|
|
|
## 6. Editor entry workflow
|
|
|
|
- GET /api/v1/schemes/{scheme_id}/editor/context -> 200 always
|
|
- if context.needs_new_draft=true -> POST /api/v1/schemes/{scheme_id}/draft/ensure -> 200
|
|
- after ensure -> GET /api/v1/schemes/{scheme_id}/editor/context -> 200 and editable=true
|
|
|
|
Validate:
|
|
- published current version does not break editor bootstrap
|
|
- ensure returns created_new_draft=true when current was published
|
|
- ensure returns created_new_draft=false when current was already draft
|
|
|
|
## 7. Draft editor read model
|
|
|
|
- GET /api/v1/schemes/{scheme_id}/draft/summary -> 200 when current version is draft
|
|
- GET /api/v1/schemes/{scheme_id}/draft/structure -> 200 when current version is draft
|
|
- GET /api/v1/schemes/{scheme_id}/draft/validation -> 200 when current version is draft
|
|
- GET /api/v1/schemes/{scheme_id}/draft/compare-preview -> 200 when current version is draft
|
|
- GET /api/v1/schemes/{scheme_id}/draft/seats/records/{seat_record_id} -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/draft/sectors/records/{sector_record_id} -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/draft/groups/records/{group_record_id} -> 200
|
|
|
|
## 8. Draft mutations
|
|
|
|
- POST /api/v1/schemes/{scheme_id}/draft/sectors -> 200 or typed 422 conflict
|
|
- POST /api/v1/schemes/{scheme_id}/draft/groups -> 200 or typed 422 conflict
|
|
- PATCH /api/v1/schemes/{scheme_id}/draft/seats/records/{seat_record_id} -> 200 or typed 422 validation error
|
|
- POST /api/v1/schemes/{scheme_id}/draft/seats/bulk -> 200 or typed 422 validation error
|
|
- PATCH /api/v1/schemes/{scheme_id}/draft/sectors/records/{sector_record_id} -> 200
|
|
- PATCH /api/v1/schemes/{scheme_id}/draft/groups/records/{group_record_id} -> 200
|
|
- POST /api/v1/schemes/{scheme_id}/draft/repair-references -> 200
|
|
- POST /api/v1/schemes/{scheme_id}/draft/remap/preview -> 200 or typed 422 validation error
|
|
- POST /api/v1/schemes/{scheme_id}/draft/remap/apply -> 200 or typed 422 validation error
|
|
|
|
## 9. Publish preview / readiness
|
|
|
|
- GET /api/v1/schemes/{scheme_id}/publish/validation -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/draft/publish-readiness -> 200 when current version is draft
|
|
- POST /api/v1/schemes/{scheme_id}/draft/pricing/snapshot -> 200 when scheme is in draft
|
|
- GET /api/v1/schemes/{scheme_id}/draft/publish-preview?refresh=true -> 200
|
|
- GET /api/v1/schemes/{scheme_id}/draft/publish-preview -> 200
|
|
|
|
## 10. Publish lifecycle
|
|
|
|
- POST /api/v1/schemes/{scheme_id}/publish -> 200 when draft is ready
|
|
- POST /api/v1/schemes/{scheme_id}/publish with stale expected_scheme_version_id -> 409
|
|
- POST /api/v1/schemes/{scheme_id}/unpublish -> 200
|
|
- POST /api/v1/schemes/{scheme_id}/rollback -> 200
|
|
|
|
## 11. Admin / ops
|
|
|
|
- GET /api/v1/admin/schemes/{scheme_id}/current/artifacts -> 200
|
|
- GET /api/v1/admin/schemes/{scheme_id}/current/validation -> 200
|
|
- GET /api/v1/admin/artifacts/publish-preview/audit -> 200
|
|
- POST /api/v1/admin/artifacts/publish-preview/cleanup?dry_run=true -> 200
|
|
|
|
## 12. Audit trail
|
|
|
|
- GET /api/v1/schemes/{scheme_id}/audit -> 200
|
|
|
|
## 13. Fail criteria
|
|
|
|
Regression is considered failed if:
|
|
- any stable read endpoint returns 500
|
|
- published current version cannot be converted to draft through ensure flow
|
|
- draft editor summary/read endpoints return inconsistent data
|
|
- publish-state mutation guard is bypassed
|