CMS draft creation copies approved packages into drafts with proof #22

Closed
opened 2026-05-28 18:15:00 +01:00 by bingoss · 1 comment
Owner

What to build

Type: AFK.

Complete the approval-gated CMS Draft Creation path so an approved Review Board package can be copied or updated as a CMS draft, never published, and then recorded with proof in Postgres and on the Review Board.

Acceptance criteria

  • Approving a package for CMS draft creation creates or uses a separate cms_draft_creation Run Request tied to the Reviewable Artifact.
  • The draft action copies the already-reviewed package into a CMS draft and never publishes automatically.
  • CMS draft URL/proof is stored in Postgres and shown on the Review Board.
  • Failures leave safe diagnostics and do not mark the package done without proof.
  • Tests are written first for approved draft creation, missing approval, adapter failure, and proof rendering.

Blocked by

## What to build Type: AFK. Complete the approval-gated CMS Draft Creation path so an approved Review Board package can be copied or updated as a CMS draft, never published, and then recorded with proof in Postgres and on the Review Board. ## Acceptance criteria - [ ] Approving a package for CMS draft creation creates or uses a separate cms_draft_creation Run Request tied to the Reviewable Artifact. - [ ] The draft action copies the already-reviewed package into a CMS draft and never publishes automatically. - [ ] CMS draft URL/proof is stored in Postgres and shown on the Review Board. - [ ] Failures leave safe diagnostics and do not mark the package done without proof. - [ ] Tests are written first for approved draft creation, missing approval, adapter failure, and proof rendering. ## Blocked by - #20
Author
Owner

Issue #22 completion audit

Implemented and verified:

  • Added a Postgres CMS draft worker script that consumes a cms_draft_creation Run Request targeted at a Reviewable Artifact.
  • The worker validates the Review Board artifact is already approved before calling the CMS draft adapter.
  • The worker reads the existing reviewed draft artifact link, copies that markdown body into the adapter request, and sends status=draft with an explicit draft-only approval boundary.
  • CMS adapter responses record cms_draft_url, cms_draft_id, cms_draft_created_at, implementation_proof_url, implementation_proof, the completed Run Request, and a cms_draft_created event.
  • Adapter failures and missing approval mark the cms_draft_creation Run Request failed with safe diagnostics, do not write proof, and do not mark the artifact implemented.
  • Review Board cards now expose cms_draft_id, cms_draft_created_at, and implementation_proof alongside cms_draft_url.

Acceptance criteria audit:

  • Approved package creates or uses separate cms_draft_creation Run Request tied to artifact: met through existing approval processor and new worker consumer.
  • Draft action copies already-reviewed package and never publishes automatically: met; worker posts status=draft only and includes no publish flag.
  • CMS draft URL/proof stored in Postgres and shown on Review Board: met.
  • Failures leave safe diagnostics and do not mark package done without proof: met.
  • Tests written first for approved draft creation, missing approval, adapter failure, and proof rendering: met.

Tests run on codex-server:

  • python3 -m unittest tests.test_postgres_schema.SliceFourReviewBoardAndArtifactLinksTests.test_postgres_cms_draft_runner_copies_approved_package_to_draft_endpoint tests.test_postgres_schema.SliceFourReviewBoardAndArtifactLinksTests.test_postgres_cms_draft_runner_blocks_missing_approval_without_calling_adapter tests.test_postgres_schema.SliceFourReviewBoardAndArtifactLinksTests.test_postgres_cms_draft_runner_records_adapter_failure_without_proof tests.test_postgres_dashboard.PostgresDashboardOverviewTests.test_review_board_returns_reviewable_artifacts_with_links_without_long_bodies
  • python3 -m unittest tests.test_postgres_schema.SliceFourReviewBoardAndArtifactLinksTests tests.test_postgres_dashboard && git diff --check
  • Result: all 50 regression tests passed, diff check clean.
Issue #22 completion audit Implemented and verified: - Added a Postgres CMS draft worker script that consumes a cms_draft_creation Run Request targeted at a Reviewable Artifact. - The worker validates the Review Board artifact is already approved before calling the CMS draft adapter. - The worker reads the existing reviewed draft artifact link, copies that markdown body into the adapter request, and sends status=draft with an explicit draft-only approval boundary. - CMS adapter responses record cms_draft_url, cms_draft_id, cms_draft_created_at, implementation_proof_url, implementation_proof, the completed Run Request, and a cms_draft_created event. - Adapter failures and missing approval mark the cms_draft_creation Run Request failed with safe diagnostics, do not write proof, and do not mark the artifact implemented. - Review Board cards now expose cms_draft_id, cms_draft_created_at, and implementation_proof alongside cms_draft_url. Acceptance criteria audit: - Approved package creates or uses separate cms_draft_creation Run Request tied to artifact: met through existing approval processor and new worker consumer. - Draft action copies already-reviewed package and never publishes automatically: met; worker posts status=draft only and includes no publish flag. - CMS draft URL/proof stored in Postgres and shown on Review Board: met. - Failures leave safe diagnostics and do not mark package done without proof: met. - Tests written first for approved draft creation, missing approval, adapter failure, and proof rendering: met. Tests run on codex-server: - python3 -m unittest tests.test_postgres_schema.SliceFourReviewBoardAndArtifactLinksTests.test_postgres_cms_draft_runner_copies_approved_package_to_draft_endpoint tests.test_postgres_schema.SliceFourReviewBoardAndArtifactLinksTests.test_postgres_cms_draft_runner_blocks_missing_approval_without_calling_adapter tests.test_postgres_schema.SliceFourReviewBoardAndArtifactLinksTests.test_postgres_cms_draft_runner_records_adapter_failure_without_proof tests.test_postgres_dashboard.PostgresDashboardOverviewTests.test_review_board_returns_reviewable_artifacts_with_links_without_long_bodies - python3 -m unittest tests.test_postgres_schema.SliceFourReviewBoardAndArtifactLinksTests tests.test_postgres_dashboard && git diff --check - Result: all 50 regression tests passed, diff check clean.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
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
bingoss/owned-growth-engine#22
No description provided.