type: outcome

text: Make eligible international-press-zone admin translation reads paint browser-cached data immediately and receive plugin-cached REST snapshots without rerunning expensive route SQL, while refreshing stale snapshots safely in the background.


verbatim: i want cache on localstorage+plugin side. the problem is that there is no cache-then-lazyload. the pages do not update every second, so plugin side cache should be good enough.


criteria: Eligible translation routes use both scoped localStorage and plugin-side response caching

criteria: Plugin cache hits bypass expensive translation route callbacks and SQL

criteria: Soft-stale plugin snapshots are returned immediately and refreshed asynchronously without request stampedes

criteria: Mutation generation invalidation prevents known-stale snapshots from being served

criteria: User, site, locale, plugin-version, route, descriptor, and normalized-query isolation remain intact

criteria: Active jobs, polling/progress, licensing/entitlements, checkout/payment, and migration state remain live and nonpersistent

criteria: Cache failures fail open to correct live responses

criteria: Verification targets local WordPress through approved cluster browsers only; dev1 remains deployment-only


type: constraints

items: Extend the existing RestResponseCache/AdminDataPolicy/ObjectCache architecture; do not add a duplicate cache subsystem

items: Do not assume transient fallback is zero-SQL; distinguish cheap cache lookup from expensive translation queries

items: Use robust WordPress-supported deferred refresh with bounded execution and lock ownership

items: No browser or diagnostic testing against dev1

items: Use GPT-5.6-Terra for implementation and GPT-5.6-Sol for review/audit


ref: fix/content-generate-all

note: Existing admin-snappy browser cache, generation invalidation, and REST cache are the baseline; preserve all unrelated worktree changes.


steps: Explore existing cache/query contracts and tests

steps: Select cache-first lazy-refresh architecture and TTL/invalidation contract

steps: Obtain independent advisor review and incorporate findings

steps: Launch the approved plan with /claudex-workflow


type: receipt

text: Confirmed existing plugin REST response cache is permission-safe, per-user/site/locale/version/query scoped, generation-invalidated, and tested to bypass route callbacks on fresh hits. Current behavior is cache-aside with 60-second translation TTL; misses and expiry block on route SQL, and transient fallback can itself perform SQL.


Wrote docs/specs/2026-08-10-admin-dual-layer-cache-design.md. Independent advisor required two stop-and-fix rounds; incorporated current-page bounded follow-up, best-effort cron with synchronous hard fallback, generation-safe explicit storage, deterministic scheduling, owner-safe backend dedupe, exact cardinality/privacy bounds, explicit TTL migration/merge semantics, writer inventory gate, and real concurrency proof. Final advisor verdict: PASS.


Wrote and self-reviewed docs/plans/2026-08-10-admin-dual-layer-cache.md with exact seams, exclusions, commands, environment boundary, model roles, delivery contract, and no placeholders/task graph.


Monitor /claudex-workflow run wf_71edbe03-b5d; after a clean result, inspect receipts and model metadata, then land, release, deploy, and verify through the authorized environment boundary.


type: workflow

status: ACTIVE

model_receipt: Foundation agents resolved gpt-5.6-terra

receipt: Atomic cache commit 65fea274 passed 5 tests/17 assertions; policy commit 276a7c16 passed 18 tests/246 assertions. Server agent exhausted prompt context after partial uncommitted edits. Split server production and test work into sequential bounded calls and resumed from the cached foundation prefix.

monitor: /workflows


source_request: Implement only Invalidation writer gaps from docs/plans/2026-08-10-admin-dual-layer-cache.md. Add exact generation rotations after successful eligible-data commits for verified custom-table writers, workers, workflow/team mutations, migration import/rollback paths, and complete LanguageManager policy tags. Edit only the named writer files plus CacheInvalidation.php and its focused unit test; preserve all unrelated WIP; commit only task files as 'Close cache invalidation writer gaps.'

outcome: Every confirmed eligible-data writer rotates its exact AdminDataPolicy generation tags only after successful mutation; failed, rolled-back, and GET paths remain non-rotating.

acceptance_delta: vendor/bin/phpunit --no-configuration tests/unit/Performance/CacheInvalidationTest.php passes

acceptance_delta: Focused writer-invalidation tests added within named files pass

acceptance_delta: Commit contains only task files and exact required message

note: Another agent owns all non-named files; do not alter them.

constraints: Inventory rule is docs/plans/2026-08-10-admin-dual-layer-cache.md:138-141

constraints: Rotate exact policy tags only after successful commit

constraints: No rotation for failed, rolled-back, or GET paths

constraints: Do not touch CLI/Post API/SettingsController paths already covered by hooks

execution_steps: Inspect CacheInvalidation API, AdminDataPolicy descriptor tags, target mutation success paths, and existing test patterns

execution_steps: Add a single precise rotation seam plus successful-path writer calls

execution_steps: Run specified PHPUnit acceptance and every new focused test

receipt: Task 49 claimed. No source mutation yet. Existing inventory evidence and exact allowed writer list supplied by owner.

next_action: Read target seams and tests; map each successful write to exact policy tags before changing code.


scope: Task 49 staged PHP files

source_request: Fix new PHPCS API violations.

receipt: The current baseline gate reports 1,395 surplus violations across staged writer files. They are concentrated in newly added invalidation code and its immediately associated control-flow blocks; baseline counts still cover pre-existing violations. Correct only surplus violations; do not broaden into a baseline cleanup or change cache behavior.

acceptance_delta: php tools/phpcs-baseline.php check passes for every staged PHP file under the plugin ruleset

acceptance_delta: No cache invalidation semantics change while correcting PHP style/API violations

next_action: Apply PHPCS fixes only to surplus diagnostics, then resolve any non-fixable API violations manually and rerun the baseline gate.


status: DONE

receipt: Normalized every post-baseline invalidation call and control block; renamed the public batch API to rotate_groups, retained its ipz_data_changed contract via an explicit hook name, and guarded Redis DEL's int|Redis|false return before numeric comparison. PHPCS baseline gate, PHPStan, PHP syntax lint, and CacheInvalidationTest all pass.

next_action: Task 49 complete. Continue task 45 deferred REST cache refresh validation before the release/verification lane.


result: PASS

checks: php tools/phpcs-baseline.php check (15 scoped files)

checks: vendor/bin/phpstan analyse --configuration=phpstan.neon.dist --no-progress (15 scoped files)

checks: vendor/bin/phpunit --no-configuration tests/unit/Performance/CacheInvalidationTest.php (34 tests, 171 assertions)

not_analysed: One staged PHPUnit file is intentionally outside the PHPCS/PHPStan includes-only configuration


Task 49 committed. Continue task 45 deferred REST cache refresh validation; do not release this partial integration before that task and the required local-browser verification complete.


verbatim: probably WIP. can you do it from another worktree ? i dont knwo how it works. you need to figure it out . but make it happen safely


outcome: Land from a separate clean integration worktree so shared-main WIP remains untouched, then push, release, deploy, and verify deployment identity only on dev1.

constraints: Never mutate, stash, reset, clean, stage, or commit shared-main WIP

constraints: Use a clean worktree rooted at current origin/master for integration

constraints: Re-run landing preflight and preserve candidate identity

current_receipt: Candidate branch is clean and fully verified on the isolated cluster; the canonical ship wrapper refused only because the shared main checkout contains unrelated live WIP.

next_action: Create a clean integration worktree, merge the verified candidate there using the repository landing workflow, push master, deploy securely, and verify archive/version/asset identity on dev1.


source_request: Fix only seven verified dual-cache review blockers in RestResponseCache.php, CacheInvalidation.php, RollbackManager.php, ObjectCache.php, AdminDataPolicy.php, and admin/tests/admin-stores.test.js; preserve unrelated WIP; run every focused acceptance command from this plan; commit only required finding files as 'Fix dual cache review findings.'

outcome: Deferred refresh canonical identity retains registered defaults; cache generations stay volatile after backend invalidation failure; internal refresh does not consume external rate allowance; partial rollback mutations invalidate relevant snapshots; transient lock reclamation restores options-cache coherence; canonical admin fixture uses soft/hard TTL fields.

acceptance_delta: RestResponseCache focused PHPUnit passes with registered-default deferred refresh and internal rate-limit bypass coverage

acceptance_delta: CacheInvalidation focused PHPUnit passes with persistent volatility after both replacement and deletion failure

acceptance_delta: Rollback failure after a prior mutation rotates exact affected cache generations

acceptance_delta: ObjectCache atomic focused PHPUnit or local WordPress reproduction proves expired transient lock reacquisition

acceptance_delta: AdminDataPolicy focused PHPUnit and cd admin && npm test -- --run pass with canonical soft/hard TTL fixture

acceptance_delta: Run every focused PHP/admin command named in docs/plans/2026-08-10-admin-dual-layer-cache.md; resolve every warning or document benign upstream noise

ref: wt/admin-snappy-contract-fix

paths: all unrelated working-tree changes and existing cache implementation

note: Do not reset, stage, or alter unrelated WIP. Source changes stay limited to verified finding files; durable plan registry changes remain unstaged.

constraints: No duplicate cache/lock/rate-limit subsystem

constraints: No policy broadening or unrelated refactor

constraints: Use existing server-owned internal marker seam and existing generation tags

execution_steps: Inspect each reported seam and its focused tests before editing

execution_steps: Add precise regression coverage where current focused tests do not prove the reported failure

execution_steps: Implement only contract-preserving fixes

execution_steps: Run all focused acceptance commands from the plan plus changed-file static/style gates

execution_steps: Stage only verified finding files and create required local commit

current_receipt: Task claimed after loading expert agent plus wordpress-php-integration, admin-panel-fullstack, settings-management, database-operations, migration-tools, and frontend-javascript skills. Target source files are clean at claim time; existing docs/plans/INDEX.md WIP is preserved.

next_action: Inspect cache identity, refresh dispatch, generation fallback, rollback, transient lock, policy fixture, and focused tests; then implement bounded fixes.


source_request: you must test it on local wordpress before deploying to dev1 to make sure that plugin does not break the site. run UJ verification on localhsot before deploying and declaring done

criteria: Run the applicable UJ journey verification against the local WordPress installation before any dev1 deployment

criteria: Use approved cluster browser infrastructure through e2e-remote; never run browser tests on dev1

criteria: Do not deploy or declare done unless local WordPress remains functional and the UJ verification passes cleanly

criteria: After local proof, land and push to master, build release, deploy with the secure deployment tool, and limit dev1 verification to archive/version/asset identity


Finish seven verified review fixes, re-review, run focused/full gates, then run local WordPress UJ verification through approved cluster browsers before landing, pushing master, release, and secure dev1 deployment.


receipt: Verified unchanged StateMachine successful transitions rotate translations, workflow, and assignments generations after COMMIT. Updated the stale focused test name and expected group array only. WorkflowInvalidationTest passes: 20 tests, 45 assertions. PHPUnit's two expected failure-path error_log lines are test fixture behavior, not warnings or gate failures.

next_action: Commit the focused expectation correction, then unblock task 54 for independent review of residual queue-claim and backend job-ID findings.


receipt: Explicit residual review confirmed both previously dropped findings. QueueManager database pop selected pending work before an id-only update, allowing two workers to return one job; claim now uses id+pending compare-and-set and the standalone fallback test proves a lost claim returns null. TranslationService accepted 2xx async submission without a backend jobId, leaving a permanently unpollable processing job; it now requires the backend's non-empty string jobId contract, fails the local job as INVALID_RESPONSE, and rotates jobs. PASS: TranslationInvalidationTest 14/25; QueueManager standalone; focused PHPCS baseline; PHPStan; syntax; diff check. Intelephense's unchanged unused validate_translate_inputs diagnostic is pre-existing and outside this diff.

next_action: Commit these four residual finding files, then run the full candidate gate before local WordPress UJ verification.


receipt: Candidate-wide PASS: configured PHPUnit 25 tests/119 assertions; REST cache 60/205; ObjectCache 6/21; policy 18/246; CacheInvalidation 34/172; rollback 1/4; controller 23/51; domain 6/15; translation 14/25; workflow 20/45; QueueManager standalone; admin lint; admin 31 files/540 tests; admin production build; full baselined PHPCS; full PHPStan. Admin WARN/ERROR console output is emitted by tests intentionally exercising failure/degrade branches. Workflow and assignment error_log lines are expected failure fixtures. Pre-commit not-analysed notices are benign: two test files sit outside configured PHPCS/PHPStan scopes and passed focused runtime tests; no root JS package, Trivy binary, or root composer.lock exists.

next_action: Run UJ-021 through UJ-025 against the isolated cluster Podman WordPress rig through e2e-remote before landing or dev1 deployment.


source_request: install it on the cluster and run all tests on the cluster instead; cluster got podman

acceptance_delta: Install the exact candidate in an isolated WordPress and MariaDB Podman rig on the approved cluster

acceptance_delta: Run UJ-021 through UJ-025 with Chromium and Firefox on that cluster through e2e-remote

acceptance_delta: Keep dev1 deployment-only and perform no browser tests there

current_receipt: Candidate-wide gates are clean. Laptop Podman port forwarding prevented reliable browser-rig access; no dev1 testing or deployment occurred.

next_action: Start an isolated cluster Podman WordPress/MariaDB rig containing the candidate, initialize WordPress, then execute UJ-021 through UJ-025 in Chromium and Firefox.


source_request: Finish and verify the preserved admin dual-layer cache lane only in worktree admin-snappy-contract-fix. Re-fetch canonical GitHub master, preserve post-snapshot state, surgically reconcile the bounded WIP onto current origin/master, prove relevant regression tests RED then GREEN, complete only the dual-layer cache and queue-claim contract, run focused tests and every expert release gate without unresolved signals, and create one clean local commit. Do not push, merge, deploy, remove the worktree, delete recovery refs, or include generated bundles.

outcome: A clean single local commit on current origin/master contains only the completed dual-layer cache, queue-claim contract, regression coverage, and authoritative plan records; all required tests and release gates pass cleanly.

acceptance_delta: Canonical origin/master is fetched and the branch is reconciled without wholesale stale rebase

acceptance_delta: Any state newer than refs/wip-snapshot/current-20260811/wt-admin-snappy-contract-fix is preserved before mutation

acceptance_delta: Each relevant regression test is observed failing for the intended defect before the production fix is applied, then observed passing

acceptance_delta: No unrelated refactor, generated bundle, %h bytecode, push, merge, deployment, worktree removal, or recovery-ref deletion

acceptance_delta: Focused plan tests and all current expert release gates pass with every warning, notice, and prevent-band signal resolved or explicitly justified

acceptance_delta: Return exact changed files, RED/GREEN evidence, gate results, final commit SHA, blockers, and parent-landing readiness

constraints: Keep lane independent from unrelated WIP

constraints: Work only on wt/admin-snappy-contract-fix

constraints: Never mutate shared checkout, another worktree, GitHub, or deployment state

constraints: Use approved e2e-remote only if browser verification remains applicable

execution_steps: Read repository instructions, expert agent, mapped skills, plan/design, source, tests, diff/index, and relevant history

execution_steps: Fetch origin/master and reconcile the three bounded commits plus required docs onto the current baseline

execution_steps: Reproduce each regression against production-before-fix state, then prove the reconciled implementation passes

execution_steps: Run focused acceptance and current expert release gates; resolve all signals

execution_steps: Commit the clean bounded lane locally and record the final receipt

current_receipt: Loaded caveman ultra, expert agent, wordpress-php-integration, database-operations, frontend-javascript, admin-panel-fullstack, settings-management, api-integration, migration-tools, backend-integration, translation-engine, verification, TDD, and agent-doc-authoring. Canonical origin/master remains 8437570121bb47e6a140777fae294ad7dd47fc9a. Preserved nine post-snapshot generated JS chunks plus the tracked/document WIP in recovery commit 47a84c7693d499b19b67dc288f6cca46f28ff2be; explicitly excluded 757 generated %h bytecode files. Merge-tree is clean; only upstream overlap is admin/tests/admin-stores.test.js.

next_action: Inspect exact source/test diffs and derive RED commands, then reconstruct one bounded candidate commit on origin/master.


receipt: Resumed the paused lane in worktree admin-snappy-contract-fix. Re-fetched canonical origin/master 77687984de63ca5765990de27dca5fb62d7ce8cf; branch HEAD already equalled it, so no rebase was needed and the 19 staged paths were preserved byte-identically. Proved seven RED/GREEN pairs by restoring each production file to HEAD, observing the intended failure, then restoring staged content with git checkout-index: empty-search descriptor default (null vs ''), internal refresh rate allowance (3 vs 2), volatile generation rotation (identical tokens), options-cache clear after expired reclaim (false vs true), partial-rollback invalidation (no rotations emitted), atomic database queue claim (where clause lacked status=pending), and async job submission without a backend jobId (returned true). admin-stores.test.js serverSoftTtl/serverHardTtl assertions and the WorkflowInvalidationTest rename are test-only gap closures with no production delta in this lane. Investigated the WordPress-style reformatting in RateLimiter.php and RollbackManager.php: it is gate-forced, not gratuitous, because phpcs-baseline.json is line-anchored and the inserted lines shift previously baselined violations out of coverage; reverting it produced 31 new PHPCS errors, so the staged formatting was restored. The phpcs:disable for ValidFunctionName.MethodNameInvalid around beginInternalRequest/endInternalRequest is justified: RateLimiter is camelCase throughout. GREEN: RestResponseCache 60/205; ObjectCache atomic 6/21; AdminDataPolicy localization 18/246; CacheInvalidation 34/172; RollbackManager 1/4; controller 23/51; domain 6/15; translation 14/25; workflow 20/45; QueueManager standalone; configured PHPUnit 28/127; admin ESLint clean; admin vitest 31 files; admin production build clean; full baselined PHPCS over the ruleset scope exit 0; full PHPStan OK. The AdminDataPolicy localization suite requires a current admin bundle; it fails only when admin/dist is stale and passes after npm run build. admin/dist is gitignored, so no generated bundle can enter the commit. Additional evidence: WorkflowInvalidationTest at origin/master was stale and failing (production already rotated translations, workflow and assignments); this lane repairs the assertion rather than weakening it, verified by running the pre-lane test against unchanged production. The admin-stores.test.js serverSoftTtl/serverHardTtl assertions are pure added coverage with no production delta. Signals resolved: the single PHPUnit 'Warnings: 1' seen under --filter is a filter artifact, absent from the clean full-file run; the phpcs:disable for ValidFunctionName.MethodNameInvalid is justified by RateLimiter's existing camelCase API; the WordPress-style reformatting is forced by the line-anchored PHPCS baseline; admin/dist staleness is a build-order effect and admin/dist is gitignored.

next_action: Landing is the parent's decision. Two plan Acceptance legs remain UNVERIFIED and are not substituted by the passing unit suites: local/concurrency integration against a running WordPress (the plan states isolated PHPUnit stubs are not concurrency proof), and browser UJ-021 through UJ-025 via e2e-remote. Both are blocked now by a degraded cluster: local-gate rsync-push timed out at 115s against debian3 and debian1, and the PHP container claude-php-cli is absent. origin/master advanced to ab457ec1909ddbd0dd598714206ca43249841ef8 during this session; those six commits touch only docs/plans and press-zone-backend, merge-tree against this branch is clean, so no rebase was performed.


receipt: Preserved shared-main WIP untouched. Created isolated landing worktree admin-snappy-land at current origin/master, confirmed a conflict-free merge tree, merged candidate as 7847392f7, and pushed master. Candidate-wide PHP/admin gates had passed; isolated cluster WordPress verification passed UJ-021 through UJ-025 in Chromium and Firefox twice at 22/22. Built release 0.9.37 from clean commit 7847392f7; archive contained 183 runtime files with runtime SHA-256 cb02ef59d6529ef5216b2b4be95743c4e558dd2e03d1bac8de5fe60fa872e909. Secure dev1 deployment installed and activated 0.9.37, verified the admin root plus every packaged admin asset byte-for-byte, and performed no browser test on dev1. Release metadata commit 195d6af02 passed PHPCS and PHPStan and was pushed to origin/master.

signals: Canonical landing wrapper could not operate on the dirty fixed root; its isolated-root equivalent reached an unrelated backend test gate whose command supervisor failed. The candidate was merged only after clean merge-tree proof and existing candidate-wide receipts.

signals: Remote local-gate could not run release build because the registered remote environment lacked bun; the deterministic release builder ran locally and completed without warnings.

signals: Composer PSR-4 warnings arose only from the pre-existing shared checkout dependency install attempt; the correct isolated worktree install completed cleanly. Pre-commit non-analysis notices were scope/tool availability facts: no root JS package, Trivy binary, or root composer.lock.

next_action: None; implementation, verification, landing, release, deployment, activation, and deployment identity verification are complete.