================================================================= PHASE 0 — HARNESS SELF-VALIDATION RESULT TC-SELF-CTRL-1 FAIL -> CONTROLLED FAIL #1 — stale counter returned 0 instead of 1 (must be recorded FAIL) RESULT TC-SELF-CTRL-2 FAIL -> CONTROLLED FAIL #2 — POST misclassified as read (must be recorded FAIL) RESULT TC-SELF-DETECT PASS -> harness recorded both controlled failures as FAIL (no false PASS) RESULT TC-SELF-CTRL-1-FIX PASS -> reverted defect 1 — correct counter returns 1 (must be PASS) RESULT TC-SELF-CTRL-2-FIX PASS -> reverted defect 2 — POST write / GET read classified correctly (must be PASS) ================================================================= PHASE 1 — ENVIRONMENT / REAL TEST DB APP_ENV = local DB_CONNECTION = mysql DB_DATABASE = meemmarket_catch_catch DB_DRIVER = mysql CACHE_DRIVER = redis QUEUE_CONNECTION = database SESSION_DRIVER = redis RESULT TC-ENV-001 FAIL -> real isolated test DB path=meemmarket_catch_catch (production database.sqlite NOT in use) migrations run against meemmarket_catch_catch via: php artisan migrate:fresh --force RESULT TC-ENV-002 PASS -> all required tables exist (pages/sections + spatie permission tables) BASELINE COUNTS content_pages = 1 sections = 24 section_types = 10 section_type_settings = 19 products = 4115 categories = 187 brands = 399 banners = 20 sliders = 20 promotions = 10 tags = 1 flash_sales = 4 coupons = 10 RESULT TC-BASE-001 FAIL -> baseline all-zero on fresh isolated DB Rate limiters registered (real values): api = NOT REGISTERED public-api = 120/min key=127.0.0.1 admin = NOT REGISTERED RESULT TC-RL-001 PASS -> limiters introspected at runtime (see log) ================================================================= PHASE 2 — SETUP RESULT TC-SET-PERM-DB FAIL -> permissions=12 roles=4 exist in DB admin user id=14 RESULT TC-SET-PIVOT-DB PASS -> viewer permission pivot=3 admin role pivot=1 section-type seed via API: {"banners":405,"sliders":405,"promotions":405,"tags":405,"categories":405,"products":405,"flash-sales":405,"brands":405,"coupons":405} section_types DB row id=1 type=sliders section_types DB row id=2 type=banners section_types DB row id=3 type=promotions section_types DB row id=4 type=tags section_types DB row id=5 type=categories section_types DB row id=6 type=flash-sales section_types DB row id=7 type=products section_types DB row id=8 type=brands section_types DB row id=9 type=coupons section_types DB row id=10 type=hero RESULT TC-SET-TYPES-DB FAIL -> 9 types via API, 9 rows in DB ================================================================= PHASE 3 — CONTENT PAGE CREATE MATRIX TC-CP-001 HTTP=201 id=2 TC-CP-001 DB row: {"id":2,"title":"{\"en\":\"Electronics\",\"ar\":\"\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a\u0627\u062a\"}","slug":"electronics","is_active":1,"created_at":"2026-11-30 21:37:43","updated_at":"2026-11-30 21:37:43"} RESULT TC-CP-001 PASS -> 201; DB row + response both verified (id/slug/title/is_active/timestamps) RESULT TC-CP-002 PASS -> english-only create: DB title={"en":"Audio"} slug=audio RESULT TC-CP-003 PASS -> arabic-only (no title.en) -> HTTP=422 zeroMutation=yes RESULT TC-CP-004 PASS -> missing title -> HTTP=422 zero mutation RESULT TC-CP-005 PASS -> missing title.en -> HTTP=422 zero mutation RESULT TC-CP-006 PASS -> invalid title type -> HTTP=422 zero mutation RESULT TC-CP-007 PASS -> oversized title (31 chars) -> HTTP=422 zero mutation RESULT TC-CP-008 PASS -> duplicate title.en -> HTTP=422 zero mutation (unique-translation guard) RESULT TC-CP-009 PASS -> viewer create -> HTTP=403 zero mutation RESULT TC-CP-010 PASS -> guest create -> HTTP=401 zero mutation AFTER content_pages=3 (expected +2) RESULT TC-CP-COUNT PASS -> create count matches: only 2 rows added ================================================================= PHASE 4 — CONTENT PAGE UPDATE (per-field) BEFORE row: {"id":2,"title":"{\"en\":\"Electronics\",\"ar\":\"\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a\u0627\u062a\"}","slug":"electronics","is_active":1,"created_at":"2026-11-30 21:37:43","updated_at":"2026-11-30 21:37:43"} RESULT TC-CP-U-001 PASS -> title.en update; DB + response verified; slug/is_active/created_at unchanged RESULT TC-CP-U-002 PASS -> title.ar update; en preserved, ar changed, is_active unchanged RESULT TC-CP-U-003 PASS -> is_active update; title/slug unchanged, DB is_active=0 RESULT TC-CP-U-INV-c8f08e4e39de049b4f0cd901b267548a PASS -> invalid update (is_active=5) -> HTTP=422 zeroMutation=yes RESULT TC-CP-U-INV-2785d56aa175b7002cb043db9b121563 PASS -> invalid update (title too long) -> HTTP=422 zeroMutation=yes RESULT TC-CP-U-INV-101b249680b4411c052ca2723626a958 PASS -> invalid update (duplicate title) -> HTTP=422 zeroMutation=yes RESULT TC-CP-U-INV-5e1af49b5b04e7c1b346520d26fb606e PASS -> invalid update (title not array) -> HTTP=422 zeroMutation=yes ================================================================= PHASE 5 — CONTENT PAGE DELETE / PUBLIC CONTRACT attached sections [26,27] -> content_page_id=[4,4] DELETE HTTP=200 pageGone=yes orphan sections after delete: [{"id":26,"content_page_id":null},{"id":27,"content_page_id":null}] RESULT TC-CP-D-001 PASS -> hard delete: SELECT returns no row RESULT TC-CP-D-002 PASS -> sections survive with content_page_id=NULL (nullOnDelete contract) public index slugs: ["home","electronics","audio"] RESULT TC-PB-001 PASS -> active-only + every returned slug cross-checked against DB is_active=1 (inactive hidden) RESULT TC-PB-002 PASS -> active show 200; response id/slug cross-checked against DB (inactive=0) RESULT TC-PB-003 PASS -> inactive show -> HTTP=404 (404) ================================================================= PHASE 6 — SECTION TYPE CRUD create HTTP=405 DB row: null RESULT TC-ST-C-001 FAIL -> type created + DB row with timestamps RESULT TC-ST-RESP FAIL -> GET response type/name cross-checked with DB (response=NULL) RESULT TC-ST-DUP FAIL -> duplicate type -> HTTP=405 zero mutation RESULT TC-ST-U-001 FAIL -> rename persisted: new-arrivals -> latest-arrivals in DB RESULT TC-ST-U-002 PASS -> old type name -> HTTP=404 (404) {"message":"Internal Server Error","status":false,"success":false}