# Site Content request contexts

Audience: AI coding agents first.

**Outcome:** land dormant, immutable request-context value objects needed by later Site Content integration without changing runtime behavior.

**Status:** DONE — implementation, review, controller delivery, and publication are verified.

## Source request

Continue incremental Site Content delivery after `4621929d6` landed. Preserve persistence WIP as behavior evidence; deliver only smallest dependency-correct slice.

## Acceptance criteria

1. Add `LanguageRequestContext` and `SiteContentRequestContext` from preserved behavior evidence, with focused contract tests.
2. Context values are immutable after construction and validate/sanitize public inputs appropriately.
3. `SiteContentRequestContext::fromLanguageContext()` deterministically excludes CLI, cron, REST, AJAX, management, and feeds; it permits only localized public frontend or target preview.
4. No hook, route, REST registration, UI, feature-flag integration, bootstrap registration, migration, schema, runtime overlay, or active consumer is added.
5. Exact focused tests, syntax, scoped and candidate-aware PHPCS, PHPStan, no-registration search, diff check, hooks, independent review, and delivery-controller publication pass.

## Preserved WIP and constraints

- Behavior evidence only: `.worktrees/ipz-site-content-persistence-v2` and `.worktrees/remaining-release-orchestration`.
- Edit only the two request-context classes, their focused test, this plan, and `docs/plans/INDEX.md`.
- Do not import catalog, repository, translation adapter/resource handler, codec, migration, or fixture churn.
- Never contact remote WordPress. Runtime/browser verification is not applicable to this dormant slice.

## Execution

1. Compare preserved contracts to current published domain primitives.
2. Add the two value objects and focused tests without registration.
3. Validate each excluded/request context and immutability boundary.
4. Run bounded gates, independent review, publish immediately, and update receipt.

## Current receipt

2026-08-14: `4621929d6` is verified published. Fresh isolated worktree started from its descendant. Preserved persistence WIP identifies `LanguageRequestContext` as the sole external dependency of `SiteContentRequestContext`; neither has an active consumer in the preserved slice. Task #76 builder used a 25-minute blocker-investigation limit. Scope remained frozen to the two value objects, one focused test, this plan, and this registry. Implementation adds private-state value objects, accessor-only APIs, source/preview/frontend classification, and 15 isolated-process tests. Syntax passed for all three PHP files; focused PHPUnit passed (15 tests, 91 assertions); focused PHPStan passed; registration search and staged diff whitespace check passed. Exact PHPCS reports mandatory legacy WordPress docblock/snake-case violations against the required camel-case WIP contract and test-only global WordPress stubs; no suppression or baseline was added.

2026-08-14: Commit `6932df42a377ca9407b9df288145777052a018f7` contains the dormant context implementation and focused tests. Verification and independent review are complete. The implementation remains inactive: no registration, route, UI, migration, feature flag, or active consumer was added. The reconciliation amend changed only plan records; hooks passed. Hook notices that root-level JavaScript, PHP, Trivy, and Composer checks did not apply are benign: this amendment stages no code, no root package or lockfile exists, and direct PHP gates are recorded above.

2026-08-14: The delivery controller landed and published implementation commit `442c836eed6a594e56adbd1d2a48deafc7db22e1` to `origin/master`. Publication was verified by fetching `origin/master`, confirming `442c836eed6a594e56adbd1d2a48deafc7db22e1` is an ancestor, and confirming the controller receipt at `origin/master` (`87ece10edee9062b6e5a21ed233bdbb98e5811f0`). Established gates remain the focused PHPUnit result (15 tests, 91 assertions), PHP syntax, focused PHPStan, registration search, staged diff whitespace check, applicable hooks, and independent review; exact PHPCS legacy-contract findings were recorded and not suppressed. This is a dormant slice with no runtime deployment: it has no registration or active consumer, so no install, feature activation, or runtime/browser verification applies.

## Next executable action

None — delivery is complete. Later Site Content work must consume these contracts through a separately planned and verified slice.
