58 lines
3.2 KiB
Markdown
58 lines
3.2 KiB
Markdown
# Local Integration Isolation Implementation Plan
|
|
|
|
<!-- markdownlint-disable MD013 -->
|
|
|
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
|
|
**Goal:** Make local WordPress fixtures, Playwright scenarios, show archive links, and image rebuild checks deterministic, isolated, reversible, and safe.
|
|
|
|
**Architecture:** Browser readers run in three dependency roots while a serial Chromium scenario project mutates the local database only after all roots finish. The local seeder owns fixture records, snapshots environment options once, merges unrelated sticky posts, and restores exact original option values explicitly. Show archive routing derives only from validated archive context. Responsive image rebuilds accept the committed destination or one canonical direct child of the system temporary directory.
|
|
|
|
**Tech Stack:** WordPress PHP, WP-CLI/wp-env on Colima, Playwright, Node test runner, POSIX shell.
|
|
|
|
---
|
|
|
|
## Task 1: Isolate Playwright database scenarios
|
|
|
|
**Files:** `playwright.config.mjs`, `tests/e2e/visual-states.spec.mjs`, `tests/e2e/visual-scenarios.spec.mjs`, `tests/smoke/e2e-harness.test.mjs`
|
|
|
|
- [ ] Write smoke contracts for read-only specs and dependent serial scenario project.
|
|
- [ ] Run smoke test and record the expected RED failure.
|
|
- [ ] Move mutation coverage into the dedicated serial spec and configure dependencies.
|
|
- [ ] Run smoke and focused scenario tests GREEN.
|
|
|
|
## Task 2: Restore local WordPress configuration exactly
|
|
|
|
**Files:** `scripts/seed-test-content.php`, `scripts/seed-test-content.sh`, `tests/php/SeedStateTest.php`, `README.md`
|
|
|
|
- [ ] Write adversarial WP/PHP integration tests for snapshot, sticky merge, scenarios, and exact restore.
|
|
- [ ] Run the tests and record the expected RED failure.
|
|
- [ ] Add versioned snapshot ownership and explicit restore scenario.
|
|
- [ ] Run default/scenarios/restore/default and prove exact restoration plus idempotency.
|
|
|
|
## Task 3: Preserve show archive routing
|
|
|
|
**Files:** `inc/queries.php`, `blocks/journal-stream/render.php`, `tests/php/BlockRenderingTest.php`
|
|
|
|
- [ ] Write pretty/plain/subdirectory URL tests for `chrnx_show` archive context and rejected raw input.
|
|
- [ ] Run focused PHP tests and record RED.
|
|
- [ ] Add show to internal archive base and pagination values without public request parsing.
|
|
- [ ] Run focused PHP tests GREEN.
|
|
|
|
## Task 4: Harden responsive rebuild destinations
|
|
|
|
**Files:** `scripts/build-responsive-images.sh`, `tests/smoke/visual-integration.test.mjs`, `README.md`
|
|
|
|
- [ ] Write tests for the documented exact command and symlink/nested/outside rejection.
|
|
- [ ] Run smoke and record RED.
|
|
- [ ] Canonicalize TMPDIR and require a non-symlink direct `chrnx-*` child.
|
|
- [ ] Rebuild and byte-compare all 35 outputs GREEN.
|
|
|
|
## Task 5: Verify and commit
|
|
|
|
- [ ] Run adversarial seed lifecycle and leave default state.
|
|
- [ ] Run the full E2E matrix twice and the complete `npm test` chain.
|
|
- [ ] Run PHP/JS/CSS/PHPCS, asset, parse, HTTP, diff, and secret checks.
|
|
- [ ] Stage only intentional files, inspect cached diff, and commit `fix: isolate CHRNX local integration state`.
|
|
- [ ] Confirm a clean worktree and do not push or deploy.
|