# Requirement safeguards and compatibility This is a suggestion register, not a replacement architecture. Binding behaviours remain the [common requirements](../Docs/Requirements/00-common-requirements.md) and US-01–US-15. Original [US-16](<../Docs/Requirements/US16 easy installation and deployment installer.txt>) and its [addendum](../Docs/Requirements/us16-addendum) are assessed explicitly; earlier user clarification allows topology alternatives to be documented with necessary revision. ## Constraints every candidate preserves | Behaviour | Architectural safeguard | | --- | --- | | US-01/02/03 account/profile lifecycle and retrieval | Atomic durable association, uniqueness and retry/recovery remain Profile-owned; no cross-service association cache replaces the source of truth | | US-04/05/06 record/read/latest and context | Positive required values/time; actual existing patient; saved independent categories/text/details; latest uses measurement/original recording/deterministic tie, independent of context suitability | | US-07 and shared periods/selections | Full inclusive patient history, equal bounds valid/reversed rejected, ascending measurement order, AND selected dimensions, Unknown distinct from omission; no silent truncation or default exclusions | | US-08/09 updates/deletion | Atomic validation/mutation; omitted values preserved, clear makes Unknown; source revision (if added) changes in the same transaction; later source reads exclude deleted values/context | | US-10 arithmetic insight | Exact raw contributions/count, three means with final half-up two decimals, BP extrema and one/zero sufficiency; mixed/unknown context visible. Aggregate transfer must preserve these obligations | | US-11 trends | Full-period timestamp evidence, intermediate excursions/reversals, distinct-time sufficiency, separate metrics/units, current context, applicable reviewed references and claim-specific limits; no endpoint-only shortcut or replacement formula for energy | | US-12 overview | Latest overall remains independent of insight period/selection; profile/latest retained for no insight; distinct bases and explanations; no trend added. Independent-service composition does not promise a cross-service snapshot | | US-13/14 authentication and authorization | Validate current request identity, ownership and assignment before any result, including cache hits; professional reads only; actual observation owner, never caller patient ID; no direct API bypass, leaked tokens or public clinical caches | | US-15 guidance | Public sourced/reviewed/applicability-labelled guidance; no record writes/certification/defaulting/submission dependency; unsupported verified content explained | | Deployment/security | Separate feature processes/configuration and generated protected credentials/certificates when retained; remote origins supported; HTTPS trust verified; only owners access their databases | ## Structural compatibility by suggestion | Suggestion | Five service processes? | Original US-16 / existing design status | | --- | --- | --- | | 1 physical colocation | Yes | Explicitly permitted; independent units/configuration and configured remote interfaces retained | | 2 shared PostgreSQL server/two owned DBs | Yes | Explicitly permitted; never merge databases, credentials or owners | | 3 bounded resource/connection lifecycle | Yes | Preserves boundaries and configuration semantics; resource policy is a revisable runtime design decision | | 4 request-local observation GET reuse | Yes | Preserves processes/ownership/public results; recorded Gateway forwarding behaviour changes. A strict requirement to preserve every original call path requires explicitly documenting this reduction | | 5 tailored internal data contracts/source aggregates | Yes | Selection/index decisions can remain within owners. New internal APIs/source aggregation change contracts or responsibilities and require corresponding architecture/AC-16-H reconciliation; not asserted fully compatible | | 6 direct private service calls | Yes | Original gateway-routed design changes; AC-16-H communication-path interpretation and deployment/trust documentation require revision. Same service installability and separate DB ownership remain | | 7 revision-validated memory result cache | Yes | Preserves current functional results if its transactional revision contract holds. Changes baseline no-cache/on-demand mechanism; internal metadata contracts/persistence fields require explicit revision. No generated-result database is required | | 8 selective replicas / conditional activation | Yes | Optional runtime topology; per-service management retained. Added routing/credentials/global budgets require design; scale-to-zero is unresolved pending responsiveness/host constraints | | 9 bounded/on-demand work | Yes | Retains baseline on-demand/no-worker behaviour. Any new deferral must leave synchronous acceptance semantics intact | Candidate A is compatible with the central independent-service/deployment constraints; request-local reuse is an optional refinement with its call-path delta identified. Candidates B/C require more significant recorded changes. None introduces direct SQL access by Insights/Overview or claims separate DBs give atomic multi-service reads. ## Decisions still dependent on deployment/workload Physical host sharing and idle power response determine whether colocation releases any powered capacity. History size and repeated query patterns determine whether compact contracts/cache reuse pay for their complexity. Uneven load and isolation needs determine whether selective service scaling offers an advantage. Token/service trust, scope lifetime and cache revision contracts must be fully specified before implementing B/C. Availability and cold-start tolerance must be clarified before scale-to-zero. No numerical workload, savings, pool sizes or automatic-scaling thresholds are invented. External sources in the suggestions support general mechanisms and architectural concerns, not a Health App energy result. No changes to clinical guidance/reference values, original requirements, source or deployment configuration are made.