TenantAtlas/specs/438-exchange-internal-render-model-slice-1/tasks.md
ahmido 71e3745aee Spec 438: Exchange internal render model slice 1 (#505)
Implements Feature Spec 438 and associated plan/tasks/update artifacts for Exchange internal render model slice 1.

Target branch: platform-dev

Follow-up integration path after merge: platform-dev -> dev.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #505
2026-07-10 13:30:14 +00:00

22 KiB

description
Dependency-ordered implementation tasks for Spec 438

DEFERRED — DO NOT IMPLEMENT

Spec Readiness Gate: FAIL Candidate Class: Defer Implementation permitted: No

Stop before T001.

Deferred Governance Close-Out (completed)

  • Candidate result documented (FAIL / Defer / 5/12) and implementation prohibited.
  • Deferral reason documented (no current operator workflow and no direct runtime consumer).
  • Runtime consumer absence documented in spec.md.
  • Reactivation conditions documented in spec.md.
  • No implementation confirmed in plan.md and tasks.md.
  • Dirty-state and runtime-change scope recorded in implementation-report.md.
  • git diff --check documented in implementation-report.md (no runtime/test execution artifacts).

Tasks: Spec 438 - Exchange Internal Render Model Slice 1

Input: Design documents from specs/438-exchange-internal-render-model-slice-1/ Prerequisites: spec.md and plan.md Tests: None added or run while deferred. Browser: N/A - no rendered UI surface changed.

Execution status: BLOCKED / REFERENCE ONLY. These tasks MUST NOT be executed in standalone Spec 438. A consumer-owning spec must migrate and adapt the relevant tasks, name the current operator workflow and real consumer, and pass its own Candidate Selection and Spec Readiness gates; merely documenting new evidence does not reactivate this task list.

Test Governance Decision

  • Classification: Unit, focused Feature, explicit Heavy-Governance/diff review; Browser N/A.
  • Lane outcome: blocked/defer. If a future consumer-owning spec resolves the gate, keep the focused test shape and reject or split broad repository discovery.
  • Fixture posture: Array fixtures are default; database/workspace/provider fixtures are opt-in only for the immutability story.
  • Runtime boundary: Exactly one new runtime class and no consumer integration.

Phase 1: Preflight And Candidate Gates

Purpose: Reconfirm prerequisites and stop conditions before runtime work.

Blocking gate: Stop before T001. Resolution requires moving the relevant contract/tasks into a consumer-owning spec; this unchanged package remains non-executable even if later evidence identifies a consumer.

All T001-T048 paths and report references below are non-executable migration examples. The consumer-owning spec must copy only relevant tasks, replace Spec 438 report paths with its own paths, and re-establish dependency order before execution.

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T001 Create specs/438-exchange-internal-render-model-slice-1/implementation-report.md and record branch, HEAD, initial git status --short, git diff --check, and base-branch deviation.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T002 Record Spec 437 PASS/merge-ready and exact success-envelope proof from specs/437-exchange-comparable-promotion-slice-1/implementation-report.md and apps/platform/app/Services/TenantConfiguration/ExchangePowerShellComparablePayloadBuilder.php in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T003 In the consumer-owning spec that adopts this reference material, re-run Candidate Selection and proportionality gates, name the current operator workflow and direct runtime consumer, migrate only relevant tasks from specs/438-exchange-internal-render-model-slice-1/tasks.md, and stop on more than one mapping class or any shared abstraction; do not continue execution in this standalone task file.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T004 Confirm the supported target set remains exactly transportRule, remoteDomain, and inboundConnector against apps/platform/app/Services/TenantConfiguration/ExchangePowerShellComparablePayloadBuilder.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T005 Confirm completed Specs 422 and 429-437 remain read-only and record the completed-spec rewrite assertion in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T006 Capture the pre-implementation changed-file allowlist in specs/438-exchange-internal-render-model-slice-1/implementation-report.md: one builder, two focused tests, and active Spec 438 artifacts only.

Checkpoint: Stop if Spec 437 is not at the current base, the envelope/version changed incompatibly, or any hard-stop scope is needed.


Phase 2: Foundational Envelope Boundary

Purpose: Establish failing tests and the single-class API before target mapping.

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T007 Create apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php with minimal successful Spec 437 envelope fixtures and an exact public-contract/reflection assertion for build(array $comparableResult): ?array.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T008 Add failing supported-target and common-boundary-output cases to apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T009 Add failing null-on-invalid cases for missing/false comparable marker, non-null blocker, unsupported type, wrong workload/version/input marker, type mismatch, malformed or stale comparable hash, identity/source-key mismatch, invalid provenance, canonical remote-domain identity denylist, unsafe domain_name_is_identity, inconsistent inbound routing/material duplicates, missing/list-shaped target sections, and raw-scalar/list/nested/additional-key values in protected_values or sensitive_values in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T010 Add failing no-model/no-fallback cases for Evidence, Resource, ResourceType, OperationRun, raw payload, normalized payload, stdout/stderr/transcript, provider response, and legacy renderer-shaped input in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T011 Create exactly one final apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php with one public nullable build method, common envelope validation, fixed top-level output, and no constructor dependency.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T012 Implement null-on-invalid behavior, canonical Spec 437 comparable-hash recomputation/constant-time comparison, and no exception/blocker taxonomy or fallback in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php until T008-T010 pass.

Checkpoint: The builder can accept only a complete valid Spec 437 result shape and cannot resolve any alternate input.


Phase 3: User Story 1 - Build A Safe Internal Model (Priority: P1) 🎯 MVP

Goal: Produce the exact fixed model for all three supported target envelopes.

Independent Test: Each valid target fixture produces fixed boundary metadata, protected identity label, and exact target section order; malformed target data returns null.

Tests For User Story 1

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T013 [US1] Add failing transportRule exact section/field/label order, explicit nullable scalar, safe scalar, configured/redacted count, and forbidden exact-value assertions in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T014 [US1] Add failing remoteDomain exact section/field/label order, classification, grouped settings count, exact-domain exclusion, marker-only settings, and unsafe identity assertions in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T015 [US1] Add failing inboundConnector exact section/field/label order, state/type/TLS, routing presence/count, matching and mismatched duplicate-material truth, marker-only routing, and protected routing exclusion assertions in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.

Implementation For User Story 1

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T016 [US1] Implement the explicit transportRule allowlist and fixed section mapping in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T017 [US1] Implement the explicit remoteDomain allowlist and fixed section mapping in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T018 [US1] Implement the explicit inboundConnector allowlist and fixed section mapping in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T019 [US1] Implement strict recognized-allowlist scalar validation plus exact marker-key-set validation for all displayed markers and every protected_values/sensitive_values entry, without generic recursion/pass-through, in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php.

Checkpoint: All three valid envelopes build; exact protected identity/config values never enter the model.


Phase 4: User Story 2 - Preserve Safe Material Meaning (Priority: P1)

Goal: Make safe changes visible and protected/unknown/volatile changes stable.

Independent Test: Reordered or semantically equivalent input yields byte-equivalent output; only an expected safe field changes for each safe material change.

Tests For User Story 2

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T020 [US2] Add failing canonical key-order, fixed section-order, repeated-build, and encoded byte-equivalence cases in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T021 [US2] Add failing unknown-key and volatile source/provenance metadata stability cases using a recomputed valid hash whenever the hashed payload region changes in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T022 [US2] Add failing priority integer/digit-string cases plus every fixed safe-enum token mapping, canonical-equivalent Spec 437 spellings such as AuditAndNotify, audit-and-notify, OnPremises, and unsupported/non-string enum rejection in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T023 [US2] Add failing configured-field, redacted-field, redacted-value, protected-presence, duplicate-section non-counting, exact marker-key-set, additional-marker-key, and malformed protected/sensitive-section cases in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T024 [US2] Add failing safe boolean/enum/count/presence material-change cases with expected-field-only diffs in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T025 [US2] Add the compositional protected-value stability case in apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php: use only valid Spec 437 comparable-envelope fixtures with identical marker semantics, prove identical render output, and link the upstream exact-value substitution proof to the mandatory Spec 437 regression rather than injecting exact values into the Spec 438 API.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T026 [US2] Add the full forbidden leakage and boundary-language corpus for all three targets to apps/platform/tests/Unit/Support/TenantConfiguration/Spec438ExchangeInternalRenderModelBuilderTest.php.

Implementation For User Story 2

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T027 [US2] Implement fixed-order canonical output and non-semantic collection sorting in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T028 [US2] Implement exact count semantics and duplicate protected_values/sensitive_values exclusion in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T029 [US2] Implement priority canonicalization, the exact trim/remove-non-ASCII-alphanumeric/lowercase enum token map, and marker-state consistency checks in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T030 [US2] Remove any generic traversal/stringification/output discovered while making T020-T026 pass in apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInternalRenderModelBuilder.php.

Checkpoint: Safe material semantics are deterministic and protected exact values cannot influence or leak into output.


Phase 5: User Story 3 - Preserve Existing Truth Boundaries (Priority: P1)

Goal: Prove the builder remains pure, unintegrated, and non-persistent.

Independent Test: Existing database records remain byte-equivalent and source/dependency review finds no forbidden integration.

Tests For User Story 3

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T031 [US3] Create apps/platform/tests/Feature/TenantConfiguration/Spec438ExchangeInternalRenderModelFeatureTest.php with minimal existing Evidence, Resource, ResourceType, and OperationRun fixtures plus a separately supplied valid comparable envelope.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T032 [US3] Add row-count and before/after attribute assertions proving no Evidence, Resource, ResourceType, latest pointer, coverage level, claim state, source metadata, or OperationRun mutation in apps/platform/tests/Feature/TenantConfiguration/Spec438ExchangeInternalRenderModelFeatureTest.php.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T033 [US3] Add focused database assertions that no CoverageLevel::Renderable value, render row/artifact truth, EnvironmentReviewSection, StoredReport, or new OperationRun row is created and that all relevant persisted attributes remain unchanged in apps/platform/tests/Feature/TenantConfiguration/Spec438ExchangeInternalRenderModelFeatureTest.php.

Boundary Review For User Story 3

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T034 [US3] Inspect the builder constructor/imports/calls as Heavy-Governance proof and record no Evidence/Resource/OperationRun/ReadModel/old-renderer/CustomerOutputGate/Review-Pack/report/PDF/UI/trigger/migration/catalog dependency plus no DB, HTTP/remote, filesystem/storage, Log, cache-as-truth, Session, Event, Queue, Bus, payload logging, generated report/PDF artifact, or other I/O/static-facade side effect in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T035 [US3] Review git diff --name-only against the allowlist and record no ReadModel, Filament, Livewire, route, view, navigation, asset, report, customer-output, job, listener, schedule, command, migration, enum, registry, catalog, or completed-spec changes in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T036 [US3] Record Product Surface N/A - no rendered UI surface changed, Human Product Sanity N/A, no customer output, and neutral visible complexity in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.

Checkpoint: The internal model remains derived-only and has no runtime consumer or persistence side effect.


Phase 6: Regression Validation

Purpose: Protect the corrected Exchange sequence and adjacent Coverage/customer boundaries.

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T037 Run cd apps/platform && ./vendor/bin/sail artisan test --filter=Spec438 --compact and record results in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T038 Run cd apps/platform && ./vendor/bin/sail artisan test --filter='Spec430|Spec431|Spec432|Spec433|Spec434|Spec435|Spec436|Spec437' --compact and record results in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T039 Run the mandatory Spec 422 collision regression with cd apps/platform && ./vendor/bin/sail artisan test --filter=Spec422 --compact and record results in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T040 Run cd apps/platform && ./vendor/bin/sail artisan test --filter='Spec415|Spec417|Spec419|Spec420|Spec421|Spec425|Spec426|Spec427' --compact and record results in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T041 Run cd apps/platform && ./vendor/bin/sail artisan test --filter='ProviderCapability|SourceContract|CoverageV2Readiness|CustomerOutputGate' --compact and record results in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T042 Classify any existing skips, Sail signal/resource failures, or fallback runs accurately without converting them into false passes in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.

Checkpoint: Existing evidence, compare, legacy renderer, read-model, and customer-output behavior remains intact.


Phase 7: Final Quality And Close-Out

Purpose: Complete formatting, diff, gate, and report evidence.

  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T043 Run cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent and record the result in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T044 Run git diff --check, git diff --name-only, and git status --short and record final outputs in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T045 Re-evaluate the Constitution, Spec Candidate, Product Surface, test-governance, workspace, evidence, OperationRun, customer-output, and temporary Coverage v2 gates in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T046 Complete the required target and boundary matrices plus API, no-fallback, leakage, determinism, material-change, count, immutability, no-Renderable, no-consumer, tests, deployment, and deferred-work evidence in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T047 Record Livewire v4 compliance, apps/platform/bootstrap/providers.php provider posture, global search, destructive/high-impact actions, asset strategy, filament:assets need, deployment impact, and completed-spec rewrite assertion in specs/438-exchange-internal-render-model-slice-1/implementation-report.md.
  • DEFERRED / NOT APPLICABLE WHILE DEFERRED — T048 Mark specs/438-exchange-internal-render-model-slice-1/tasks.md complete only after every applicable task has evidence; do not check preparation tasks based on intent alone.

Dependencies & Execution Order

  • Phase 1 blocks all runtime/test changes.
  • Phase 2 establishes the API and blocks all target mapping.
  • Phase 3 completes the independently testable MVP.
  • Phase 4 depends on all three mappings.
  • Phase 5 depends on builder behavior and may begin once Phase 3 is stable.
  • Phase 6 follows focused implementation/tests.
  • Phase 7 is final.
  • Target tests share one file and are not marked parallel.
  • The Feature test uses database context only when its immutability assertions require it.

Implementation Strategy

  1. Do not execute this task list. If a consumer-owning spec migrates relevant tasks, run its proportionality and prerequisite gates before any runtime/test work.
  2. Write failing envelope tests before the builder.
  3. Complete the three target mappings inside the same class.
  4. Prove leakage/determinism before adding DB fixtures.
  5. Run focused tests before regressions.
  6. Keep consumer integration out of this reference package; the consumer-owning spec must define and authorize its own integration tasks.

Hard Stops

Stop and amend or split if implementation requires:

  • more than one runtime class or any interface/registry/DTO/presenter/base/trait framework
  • attempting to unlock this unchanged task list through documentation or future-consumer evidence alone
  • a runtime consumer or ReadModel/UI/customer/report integration
  • model/Evidence/raw/normalized/OperationRun/provider fallback
  • old ExchangeTeams renderer reuse
  • generic recursive pass-through, JSON dump, or stringification
  • persistence, Renderable promotion, migration, enum/status/reason family, tenant_id, new operation type, or catalog entry
  • additional Exchange/Teams target types
  • broad discovery tests disguised as Unit/Feature proof

Notes

  • Every task uses the required - [ ] T### [P?] [US?] Description with file path format.
  • No application implementation occurs during preparation.
  • Stand-alone Spec 438 close-out requires implementation-report.md to document deferred-status proof. Implementation tasks remain migration references for a future consumer-owning spec.