Implement phased modernization infrastructure for transitioning from multi-page legacy routing to SPA portal-shell architecture, plus post-delivery hardening fixes for policy loading, fallback consistency, and governance drift detection. Key changes: - Add route contract enrichment with scope/visibility/compatibility policies - Canonical 302 redirects from legacy direct-entry to /portal-shell/ routes - Asset readiness enforcement and runtime fallback retirement for in-scope routes - Shared feature-flag helpers (env > config > default) replacing duplicated _to_bool - Defensive copy for lru_cached policy payloads preventing mutation corruption - Unified retired-fallback response helper across app and blueprint routes - Frontend/backend route-contract cross-validation in governance gates - Shell CSS token fallback values for routes rendered outside shell scope - Local-safe .env.example defaults with production recommendation comments - Legacy contract fallback warning logging and single-hop redirect optimization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
MODIFIED Requirements
Requirement: Pure Vite pages SHALL be served as static HTML
The system SHALL serve in-scope pure Vite pages through backend static HTML delivery under a shell-first canonical routing policy. Direct-entry compatibility for in-scope routes SHALL be explicit and governed. Admin targets /admin/pages and /admin/performance SHALL be represented as governed shell navigation targets, while maintaining backend auth/session authority.
Scenario: In-scope canonical shell entry
- WHEN a user navigates to an in-scope canonical shell route
- THEN the shell SHALL render the target route via governed route contracts and static asset delivery
Scenario: Direct-entry compatibility policy for in-scope routes
- WHEN a user opens an in-scope route through direct non-canonical entry
- THEN the system SHALL apply explicit compatibility behavior without breaking established query semantics
Scenario: Admin targets in shell governance
- WHEN shell navigation is rendered for an authorized admin user
- THEN
/admin/pagesand/admin/performanceSHALL be reachable through governed admin navigation targets
Scenario: Deferred routes excluded from this phase architecture criteria
- WHEN this phase architecture compliance is evaluated
- THEN
/tables,/excel-query,/query-tool, and/mid-section-defectSHALL be excluded and handled in a follow-up change