Skip to content

feat(encyclopedia): P2 Editorial Engine — secure review, immutable publishing and Atlas search - #368

Draft
baba-dev wants to merge 16 commits into
mainfrom
work/367-food-encyclopedia-editorial-engine
Draft

baba-dev wants to merge 16 commits into
mainfrom
work/367-food-encyclopedia-editorial-engine

Conversation

@baba-dev

@baba-dev baba-dev commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

What this implements

Work package #367; builds on merged P1 Atlas PR #364. The eight planned commits add:

  1. Typed editorial contracts, review-state validation and quality checks.
  2. Additive PostgreSQL content schema with owner-only RLS and immutable revisions.
  3. Definer-only write gateway with one-use step-up, independent reviewer, audited publication, plus published-only public/read interfaces.
  4. Admin Editorial Studio routes and protected actions.
  5. Atlas article editing, source checks, artwork-rights attestation and revision UX.
  6. Idempotent import of existing dish catalogue into a non-public candidate queue.
  7. Approved-only public pagination, source presentation, public sitemap function.
  8. Dynamic Atlas article, homepage, browse and search integration with noindex previews retired from production.

Critical migration dependency

BLOCK MERGE UNTIL: Tiffin PR #366 (currently conflicting proposed 0115 and 0116, to be renumbered) is integrated and src/db/migrations/meta/_journal.json is reconciled in serial order. This branch reserves 0118_food_encyclopedia_editorial.sql after merged 0115_receipt_upi_payment.sql; the journal append must be reconciled after the Tiffin migration sequence is finalized. Never autoactivate a migration with missing preceding journal entries. All SQL is additive, no merchant tables modified.

Security invariants

  • Direct RLS/table privileges revoked for menuminute_app and worker; only narrow owner-definer entry points grant public read or authenticated admin commands.
  • Live superadmin session, enrolled MFA, one-use step-up, idempotency receipts and audit records required for changes.
  • Revision author cannot approve their own work. Approved revision content is immutable; new drafts do not alter the old published revision.
  • Unreviewed candidates, sources notes, internal events and draft revisions are absent from public search/sitemap. Public DB read failures fail closed.
  • Google AdSense stays OFF; no ads, third-party scripts or consent bypass.

Verification and approval

Not yet done: real human article review, 20–30 verified articles, live AdSense, Search Console, production deployment/merge. No external credentials or production server changes.

Current implementation and verification

  • Reconciled branch with main's UPI receipt migration, keeping all unrelated code intact.
  • P2 editorial migration renumbered to 0118, preserving main's 0115_receipt_upi_payment.
  • Pinned Prettier applied to all 25 flagged new files; subsequently removed one unused type import reported by ESLint.
  • Final pushed commit: c7e24fe35b6feb9b78f79510dc81ad739916ad14.
  • Final-SHA ARM64 CI — pending verification at this edit.
  • Do not merge: independent PostgreSQL/security review, migration numbering with Tiffin feat(tiffin): phase 2 weekly menus and combos, inert behind TIFFIN_ENABLED #366, operator backup/host gates. No AdSense activation or external data publication.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant