diff --git a/tasks/bundle1-checkpoint-c-review.md b/tasks/bundle1-checkpoint-c-review.md index d8abdd1..4e941a3 100644 --- a/tasks/bundle1-checkpoint-c-review.md +++ b/tasks/bundle1-checkpoint-c-review.md @@ -1,6 +1,6 @@ # Bundle 1 — Checkpoint C review -Prepared 2026-09-27. **Awaiting owner review.** This covers T06–T07 only; draft/publish permissions, admin editing, public and preview APIs, seed, and frontend adapter have not started. +Prepared 2026-09-27. **Approved by the owner on 2026-09-27.** This covers T06–T07 only; draft/publish permissions, admin editing, public and preview APIs, seed, and frontend adapter had not started at this checkpoint. ## Implemented @@ -23,4 +23,4 @@ Prepared 2026-09-27. **Awaiting owner review.** This covers T06–T07 only; draf - `python manage.py check --settings=config.settings.test`: no issues. - `python manage.py makemigrations --check --dry-run --settings=config.settings.test`: no changes detected. -No production database, media, or public route was changed. This review closes Checkpoint C only if the owner accepts the schema and validation choices above. +No production database, media, or public route was changed. The owner approved Checkpoint C and the schema and validation choices above on 2026-09-27. diff --git a/tasks/bundle1-checkpoint-d-review.md b/tasks/bundle1-checkpoint-d-review.md new file mode 100644 index 0000000..f1b0bd9 --- /dev/null +++ b/tasks/bundle1-checkpoint-d-review.md @@ -0,0 +1,26 @@ +# Bundle 1 — Checkpoint D review + +Prepared 2026-09-27. **Awaiting owner review.** This covers T08–T09: editorial draft/publish/restore rules and Django admin editing. Public and private preview APIs (T10–T11), seed (T12–T13), and frontend adapter (T14) have not started. + +## What is ready + +- The `content_editor` group can create and preview drafts. The `content_publisher` group can also publish and restore. Active superusers override these rules. Staff status alone grants no content action. Migration `content.0003_content_groups` creates both groups and their explicit permissions without assigning accounts. +- Each save creates a new content revision. Publishing validates the full page and any referenced media, then swaps the published pointer in one transaction. A stale pointer rejects the publish. Restore creates a new revision from a prior published snapshot and keeps history. Audit entries record actor, operation, and revision numbers. +- Home publishing requires all four visible sections in the approved order. About requires identity first and contact last. Optional About sections can be reordered or hidden. Listing pages contain an intro and SEO but no sections. Unapproved media cannot be published. +- Django admin exposes named fields for site identity, navigation, contacts, page copy, sections, actions, and typed About entries. Editors do not edit raw JSON, revision status, or the published pointer. The dashboard shows drafts, preview links, the published revision, and publisher actions. Approved media becomes read only. +- Admin draft preview requires the preview permission, stays on an admin route, and sends `Cache-Control: private, no-store` plus `X-Robots-Tag: noindex, nofollow`. No public content API is active yet. + +## Verification + +- Full backend suite on the isolated SQLite test settings: **79 unit passed; 184 integration passed; 1 PostgreSQL-only concurrency test skipped**. +- The two-publisher race test ran separately against a local PostgreSQL test database: **1 passed**. One publish won; the second received a conflict. The SQLite suite also tests a second publish attempt using the same stale pointer. +- Django system check: no issues. Migration consistency check: no changes detected. The additive content permission/group migrations applied on the local test database. +- Browser walkthrough on a local test database: editor saved a Home draft at 390px, publisher opened its no-store preview and published it, and the dashboard then identified revision 1 as published. The draft form had no horizontal overflow at 390px or 1440px. Captures: [editor form at 390px](evidence/2026-09-27/cms-admin-home-390.png), [editor form at 1440px](evidence/2026-09-27/cms-admin-home-1440.png), [publisher dashboard at 390px](evidence/2026-09-27/cms-admin-publisher-390.png), [published dashboard at 1440px](evidence/2026-09-27/cms-admin-published-1440.png). + +## Review points + +1. Confirm the editor/publisher separation and the admin draft → preview → publish → restore workflow. +2. Confirm that the Home section order and About optional reorder/hide controls match the approved contract. +3. Confirm the admin layout at phone and desktop widths from the captures. Actual staff account assignment remains a later gate. + +No production content, media, account assignment, or public route was changed. Checkpoint D closes only after owner review; T10–T11 begin afterward. diff --git a/tasks/evidence/2026-09-27/cms-admin-home-1440.png b/tasks/evidence/2026-09-27/cms-admin-home-1440.png new file mode 100644 index 0000000..d953989 Binary files /dev/null and b/tasks/evidence/2026-09-27/cms-admin-home-1440.png differ diff --git a/tasks/evidence/2026-09-27/cms-admin-home-390.png b/tasks/evidence/2026-09-27/cms-admin-home-390.png new file mode 100644 index 0000000..ffb0991 Binary files /dev/null and b/tasks/evidence/2026-09-27/cms-admin-home-390.png differ diff --git a/tasks/evidence/2026-09-27/cms-admin-published-1440.png b/tasks/evidence/2026-09-27/cms-admin-published-1440.png new file mode 100644 index 0000000..97ff73a Binary files /dev/null and b/tasks/evidence/2026-09-27/cms-admin-published-1440.png differ diff --git a/tasks/evidence/2026-09-27/cms-admin-publisher-390.png b/tasks/evidence/2026-09-27/cms-admin-publisher-390.png new file mode 100644 index 0000000..6a8ed0d Binary files /dev/null and b/tasks/evidence/2026-09-27/cms-admin-publisher-390.png differ diff --git a/tasks/todo.md b/tasks/todo.md index 9460b62..b729407 100644 --- a/tasks/todo.md +++ b/tasks/todo.md @@ -2,7 +2,7 @@ This is an **implementation backlog**, with work-in-progress noted below and checkboxes reserved for accepted work. See [plan.md](plan.md) for scope, estimates, migration sequence, and release gates. `F`, `B`, and `D` mean frontend, backend, and deployment repository. Each item is intended to fit one focused session (S = 1–2 files; M = 3–5 files); split any item that grows larger. In addition to each item’s check, apply the definition of done: focused and regression tests, lint/build, runtime/browser check, security/rollback where relevant, and human review. -Bundle 0 started 2026-09-24 and was approved by the owner on 2026-09-26. Deliverables: [content inventory](content-inventory.md), [baseline](baseline-2026-09-24.md), [local journey replay](evidence/2026-09-24/local-replay.md), [product/asset review](product-review.md), [CMS/API contract](cms-api-contract-draft.md), backend [API schema](../../guilan-ace-backend/docs/content-api-schema-draft.md), and the approved Home/About visual direction linked from frontend `DESIGN.md`. The owner approved the [Home](concepts/d-logo-led-home.html) and [About](concepts/d-logo-led-about.html) direction on 2026-09-25, then approved the [Bundle 0 review](bundle0-review.md) on 2026-09-26, accepting the content boundary, recorded baseline, and CMS/API contract. T01–T05 and Checkpoints A/B are closed at discovery and contract scope. The current pytest suites pass all 237 tests; the earlier 89-error run is preserved as historical evidence. External SMS/OAuth/live-gateway checks, disputed seed claims, and production media/account assignments remain follow-up work in later gates. Bundle 1 started 2026-09-27; T06–T07 await Checkpoint C review. +Bundle 0 started 2026-09-24 and was approved by the owner on 2026-09-26. Deliverables: [content inventory](content-inventory.md), [baseline](baseline-2026-09-24.md), [local journey replay](evidence/2026-09-24/local-replay.md), [product/asset review](product-review.md), [CMS/API contract](cms-api-contract-draft.md), backend [API schema](../../guilan-ace-backend/docs/content-api-schema-draft.md), and the approved Home/About visual direction linked from frontend `DESIGN.md`. The owner approved the [Home](concepts/d-logo-led-home.html) and [About](concepts/d-logo-led-about.html) direction on 2026-09-25, then approved the [Bundle 0 review](bundle0-review.md) on 2026-09-26, accepting the content boundary, recorded baseline, and CMS/API contract. T01–T05 and Checkpoints A/B are closed at discovery and contract scope. The current pytest suites pass all 237 tests; the earlier 89-error run is preserved as historical evidence. External SMS/OAuth/live-gateway checks, disputed seed claims, and production media/account assignments remain follow-up work in later gates. Bundle 1 started 2026-09-27; Checkpoint C was approved by the owner on 2026-09-27. ## 0. Discovery and design contract (4–5 person-days) @@ -16,11 +16,11 @@ Bundle 0 started 2026-09-24 and was approved by the owner on 2026-09-26. Deliver ## 1. CMS foundation and migration (9–12 person-days) -Work in progress: T06–T07 implementation and verification began 2026-09-27. See [Checkpoint C review](bundle1-checkpoint-c-review.md). Acceptance checkboxes remain open pending owner review; T08 onward has not started. +Checkpoint C was approved by the owner on 2026-09-27 after reviewing [the schema and validation record](bundle1-checkpoint-c-review.md). T08–T09 are implemented and verified; [Checkpoint D review](bundle1-checkpoint-d-review.md) is pending. Acceptance checkboxes remain open until owner review. -- [ ] **T06 — Add site identity and page schema (M; deps: T05).** Files: B new content app models/migration/tests. Acceptance: one site identity, stable page slugs, ordered typed sections, image/alt and SEO fields exist with uniqueness/validation; migrations are additive. Verify: migration test and `python manage.py check` on a test database. -- [ ] **T07 — Validate fields and media handling (M; deps: T06).** Files: B content validators/tests. Acceptance: URLs, section payloads, image type/size, alt text, and unsafe markup are constrained; absent optional media renders safely. Verify: invalid/oversize/malicious inputs rejected in focused tests. -- [ ] **Checkpoint C (deps: T06–T07).** Schema and validation reviewed before permissions/API work. +- [x] **T06 — Add site identity and page schema (M; deps: T05).** Files: B new content app models/migration/tests. Acceptance: one site identity, stable page slugs, ordered typed sections, image/alt and SEO fields exist with uniqueness/validation; migrations are additive. Verify: migration test and `python manage.py check` on a test database. +- [x] **T07 — Validate fields and media handling (M; deps: T06).** Files: B content validators/tests. Acceptance: URLs, section payloads, image type/size, alt text, and unsafe markup are constrained; absent optional media renders safely. Verify: invalid/oversize/malicious inputs rejected in focused tests. +- [x] **Checkpoint C (deps: T06–T07).** Schema and validation reviewed before permissions/API work. Approved by the owner on 2026-09-27. - [ ] **T08 — Implement draft, publish, and revision permissions (M; deps: T06).** Files: B content services/permissions/tests. Acceptance: staff draft, publisher publish/restore, superuser override, audit trail, and atomic published snapshot; unauthorized edits/publish fail. Verify: role-matrix and concurrent-publish tests. - [ ] **T09 — Configure Django admin editing workflow (M; deps: T07–T08).** Files: B content admin/forms/tests. Acceptance: editors can edit/reorder/hide only defined sections, see validation, preview draft, and identify published revision without raw JSON editing. Verify: hands-on staff/publisher Django admin walkthrough at desktop and phone widths. - [ ] **Checkpoint D (deps: T08–T09).** Draft cannot leak or publish by the wrong role.