# Demo Readiness Protocol (2026-05-22) ## Scope Final Task 023 protocol for proving Admin-managed workflow templates are connected to the article production flow. Environment: - Date: 2026-05-22 - Stack: Docker Compose demo stack - Roles: `admin@example.com`, `editor@example.com` - Local mapped ports from `.env`: backend `13800`, frontend `13300`, runner `13810` ## Automated Evidence Commands run: - `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps.backend.tests.integration.test_workflow_template_binding_public_api -v` - `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` - `node apps/frontend/tests/article_form_validation.test.mjs` - `node apps/frontend/tests/article_detail.model.test.mjs` - `pnpm --filter @pipeline/frontend test:ui` - `pnpm typecheck` - `BACKEND_URL=http://localhost:13800 FRONTEND_URL=http://localhost:13300 RUNNER_URL=http://localhost:13810 WAIT_SECONDS=120 bash tests/smoke/public-health.sh` - `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` - `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest discover apps/backend/tests -v` Results: - Workflow-template binding public API: PASS - OpenAPI/shared contract snapshots: PASS - Frontend article intake/detail model checks: PASS - Frontend UI model suite: PASS - Shared/frontend typecheck: PASS - Docker Compose public-health smoke: PASS - Auth article/plan approval public flow: PASS - Full backend discovery: PASS (`Ran 87 tests ... OK (skipped=1)`) Additional backend discovery: - The auth/plan-review readiness test was corrected to use the real public flow: create article, generate/answer boundary questions, submit answers, generate a plan, then approve the generated plan id. The previous hard-coded missing plan id was a stale test fixture, not the product flow. - `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest discover apps/backend/tests -v` now passes with 87 tests run and one Postgres-only migration test skipped because `PIPELINE_TEST_DATABASE_DSN` is not set. ## Manual Demo Checklist Admin workflow builder: 1. Open `/admin/workflows` as `admin@example.com`. 2. Confirm the seeded `Demo article production workflow` is active and has ordered stages for intake, plan review, research/evidence, production, draft assembly, review, and publishing. 3. Create a draft workflow with a unique slug. 4. Add at least two stages with structured stage parts. 5. Edit a stage title/runner profile. 6. Reorder stages and confirm the order persists after refresh. 7. Activate the draft workflow. 8. Archive a non-demo workflow and confirm Editors no longer see it in active workflow lists. Editor article flow: 1. Open `/articles/new` as `editor@example.com`. 2. Confirm the workflow template selector shows active workflows only. 3. Select `Demo article production workflow v2`. 4. Create an article brief. 5. Open the article detail page. 6. Confirm article detail shows the workflow template name, slug, version, and stage summary. 7. Archive the selected workflow as Admin. 8. Return to the article detail page and confirm the stored workflow template snapshot is unchanged. 9. Continue the normal publishing path through boundary questions, plan approval, research, evidence approval, draft production, reviews, final approval, dry-run, and publish commit. 10. Confirm the article status path still reaches `PUBLISH_COMMIT_CREATED`. ## Current Sign-Off GO for Task 023 workflow-template binding and demo readiness. Automated public API, model, typecheck, full backend discovery, in-process end-to-end demo, and Docker Compose health checks passed for the new binding behavior, including immutable article snapshots after workflow archival. The manual checklist above remains the step-by-step reviewer protocol for the live browser demo.