feat(task-023): bind workflow templates into demo flow
This commit is contained in:
@@ -25,14 +25,14 @@ Development description: Bind Admin-managed workflow templates into the demo pro
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] TDD pre-requirement: before implementation, write one failing public API test showing article creation stores the active workflow template snapshot; proceed one behavior at a time and record evidence in `Result`.
|
||||
- [ ] Seed data includes an active workflow template with stages matching the demo pipeline.
|
||||
- [ ] Article creation records the workflow template id, version, and stage summary snapshot.
|
||||
- [ ] Article creation rejects archived/missing workflow template references.
|
||||
- [ ] Article detail exposes workflow template summary to the frontend.
|
||||
- [ ] Site configuration or article creation UI allows selecting an active workflow template.
|
||||
- [ ] Existing end-to-end demo publishing smoke still passes.
|
||||
- [ ] Final demo readiness protocol includes manual steps for Admin workflow create/edit/reorder/activate and Editor article flow using that workflow.
|
||||
- [x] TDD pre-requirement: before implementation, write one failing public API test showing article creation stores the active workflow template snapshot; proceed one behavior at a time and record evidence in `Result`.
|
||||
- [x] Seed data includes an active workflow template with stages matching the demo pipeline.
|
||||
- [x] Article creation records the workflow template id, version, and stage summary snapshot.
|
||||
- [x] Article creation rejects archived/missing workflow template references.
|
||||
- [x] Article detail exposes workflow template summary to the frontend.
|
||||
- [x] Site configuration or article creation UI allows selecting an active workflow template.
|
||||
- [x] Existing end-to-end demo publishing smoke still passes.
|
||||
- [x] Final demo readiness protocol includes manual steps for Admin workflow create/edit/reorder/activate and Editor article flow using that workflow.
|
||||
|
||||
## Verification
|
||||
|
||||
@@ -43,9 +43,20 @@ Development description: Bind Admin-managed workflow templates into the demo pro
|
||||
|
||||
## Result
|
||||
|
||||
- Status: Not started.
|
||||
- TDD plan:
|
||||
- Red evidence:
|
||||
- Green evidence:
|
||||
- Refactor notes:
|
||||
- Status: Implemented.
|
||||
- TDD plan: Use `apps/backend/tests/integration/test_workflow_template_binding_public_api.py` as the public API red test for article creation with an active workflow template, archived/missing template validation, and immutable detail snapshot after workflow archival. Then wire persistence/contracts, seed data, frontend intake/detail display, and demo protocol updates.
|
||||
- Red evidence: `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps.backend.tests.integration.test_workflow_template_binding_public_api -v` failed with all 3 tests returning `422 extra_forbidden` for `workflow_template_id`.
|
||||
- Green evidence: `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps.backend.tests.integration.test_workflow_template_binding_public_api -v` -> `Ran 4 tests ... OK`.
|
||||
- Refactor notes: Added optional article `workflow_template_id`, stored workflow template id/version plus immutable JSON snapshot, active-template validation, seeded active demo workflow stages, generated OpenAPI/shared TypeScript contracts, article intake active-workflow selector, and article detail snapshot display. Existing article workflow statuses remain unchanged.
|
||||
- Verification output:
|
||||
- `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps.backend.tests.integration.test_workflow_template_binding_public_api -v` -> `Ran 4 tests ... OK`.
|
||||
- `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps.backend.tests.contracts.test_generated_contract_artifacts apps.backend.tests.contracts.test_public_openapi_contract -v` -> `Ran 3 tests ... OK`.
|
||||
- `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps.backend.tests.integration.test_end_to_end_demo_stack_smoke_public_api -v` -> `Ran 1 test ... OK`.
|
||||
- `node apps/frontend/tests/article_form_validation.test.mjs` -> passed.
|
||||
- `node apps/frontend/tests/article_detail.model.test.mjs` -> passed.
|
||||
- `pnpm --filter @pipeline/frontend test:ui` -> passed.
|
||||
- `pnpm typecheck` -> passed.
|
||||
- `BACKEND_URL=http://localhost:13800 FRONTEND_URL=http://localhost:13300 RUNNER_URL=http://localhost:13810 WAIT_SECONDS=120 bash tests/smoke/public-health.sh` -> `public health smoke ok`.
|
||||
- `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps.backend.tests.integration.test_auth_authorization_public_api.AuthAuthorizationPublicApiTest.test_editor_can_create_articles_and_approve_plan_review -v` -> `Ran 1 test ... OK` after correcting the stale hard-coded missing plan id fixture to approve the generated public API plan.
|
||||
- `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest discover apps/backend/tests -v` -> `Ran 87 tests ... OK (skipped=1)`.
|
||||
- `docs/demo-readiness-protocol-2026-05-22.md` records the final Task 023 demo readiness protocol.
|
||||
|
||||
Reference in New Issue
Block a user