12 KiB
Documented design versus implementation
Scope: repository snapshot 2026-10-12, commit 5d9371388c15066eeb2bc124ed227659c644dab5. Difference is not automatically a defect. Current .drawio authority and explicit corrections supersede same-stem historical JPEGs under Architecture README. No authoritative document was edited and no conflicting design was silently selected for implementation.
Verified differences and elaborations
| ID | Original/current documentation | As-built evidence and interpretation |
|---|---|---|
| D-01 | Original domain model and duplicate domain image show Patient, Observation and Health Summary only | Account/profile lifecycle, professional assignments, measurement context, selections, trend assessments and overview concepts now exist. HealthInsight is a transient summary without stored summary ID. This is an expanded as-built model, not a claim that the original three concepts were replaced. domains, assignments |
| D-02 | Patient class and Patient ER omit account association and account lookup | Patient.AccountId, nullable account_id and unique index plus by-account API now implement US-01/13. migration, controller. Existing null associations are retained; no migration backfill assigns old rows to credentials. |
| D-03 | Original authentication design's opening/Section 10 says token format, lifetime, persistence owner and gateway protection are open; final paragraph permits minimum established mechanisms | Concrete opaque framework Bearer tokens, default 30-minute lifetime, Patient-owned association and shared-key HTTPS boundaries are implemented and described in AUTHENTICATION.md. Opening/open-decision text was not updated, so the document has residual status ambiguity. The final permission is consistent with selecting simple mechanisms; this task does not infer an unrecorded formal approval history. |
| D-04 | Historical Insights ER showed persisted HealthSummary; old Overview ER showed an overview persistence concept | Current Insights correction, Insights drawio and Overview drawio already supersede those concepts. Code has no DB/repository in either service. Historical inconsistency is resolved by current baseline; do not report it as a new implementation violation. |
| D-05 | Updated logical diagrams use schematic methods/names (activity, preparation details, HealthOverview/DTO) and sometimes combine domain/DTO boxes |
Code uses ActivityCondition, RestDurationMinutes, flattened owned columns; separate local consumer DTOs; Overview client abstractions are abstract classes whereas Insights' client is an interface. Observation DTO does not expose creation/update timestamps although its domain entity contains them. These are implementation details permitted by Architecture README, not unexplained new services/tables. context mapping, DTO |
| D-06 | Original class diagrams omit EF contexts, framework authentication, patch-presence fields and detailed trend result types | As-built class pages show those actual dependencies/attributes and responsibilities. No shared runtime contracts or direct class links across service boundaries were found. patch, trend records, Gateway startup |
| D-07 | US-16 and its addendum describe Linux/systemd; later implementation guide also describes Windows/macOS | Native Windows Services/launchd adapters and WindowsServices package are present. This expands implemented platform support beyond the Linux wording while retaining service boundaries. Whether formal requirements should be updated is outside this assignment. Native success on every advertised platform is unknown. adapters, macOS |
| D-08 | Committed systemd templates use User=healthapp and /etc/healthapp/NAME.env; installer guide describes dedicated users/nested files |
Installer rewrites templates into healthapp-NAME user/group and /etc/healthapp/NAME/service.env. Using templates manually without that transform differs from normal installed behavior. template, installer |
| D-09 | Original topology depicts client Web/Mobile | No product frontend is present. This repository implements the API backend; JMeter/curl/test clients are actual consumers. It is unknown whether a client lives in another repository. Backend stories do not establish a frontend deliverable. |
| D-10 | Installation prose broadly says native verification checks independent processes; US-16 AC-I includes stop/restart demonstration | Linux and Windows adapters check running state/distinct PIDs. macOS adapter calls launchctl print and HTTPS probes but does not explicitly compare PIDs. Live verification does not cycle stop/restart; test suite does so with direct processes. This is a runtime-verification limitation, not proof that services cannot restart independently. Linux verifier, macOS, tests |
| D-11 | Early ownership section of AUTHENTICATION.md says trend/overview endpoints remain unimplemented; later sections say they are implemented | Both endpoint sets, client permissions and integration tests exist. The earlier sentence is stale and contradicts later sections of that same implementation document. Earlier service-protection text names only Observation/Insights callbacks, while the later US-12 section/code also provides Overview callbacks. routes, trend controller |
Current behavior with requirements or evidence limits
| ID | Verified behavior | Requirement/evidence implication |
|---|---|---|
| U-01 | Narrative conflict detection is a finite substring list, including documented English/Danish phrases. calculator | US-04/11 broadly require relevant conflicts to be apparent; cited example during exercise is covered. Arbitrary wording/negation is not semantically understood. Exhaustive natural-language fulfillment is unknown and not proven by existing fixtures. |
| U-02 | Reference thresholds and development labels have compiled sources/limits; favourable/concerning logic is coded locally. TRENDS | Numerical behavior is testable. Whether every inference is clinically supported under all input combinations needs an independent domain assessment; this documentation does not assert clinical validation. |
| U-03 | Ownership middleware compares most path segments case-sensitively; routing accepts conventional case variants | Canonical routes work. A case-varied route can return 404/403 instead of the controller behavior. Requirements do not prescribe casing; observable interface inconsistency, not a confirmed missing story. middleware |
| U-04 | Missing expected ownership JSON fields/invalid JSON lack dedicated upstream 502 mapping; general exception handling applies | Such malformed responses may yield 500, unlike explicit Insights/Overview invalid-JSON 502 handling. Upstream failure-injection tests do not prove every malformed shape/status path. |
| U-05 | Assignments are startup configuration, no installer assignment population; generated professional has none | US-14 assigned reads exist and are tested with predefined test assignments. A normal fresh installation cannot demonstrate a populated professional review workflow until assignments are configured. This does not require an out-of-scope assignment-management API. |
| U-06 | Deployment tests use different loopback addresses, controlled SSH/SCP and package doubles | These establish interfaces/scoping/command intent, not actual multi-machine routing, network/firewall policy or native package/service-manager success. Manual CI workflow exists; execution results are unknown in this task. |
| U-07 | Generated DB connections use Pooling=false;SslMode=Prefer; normal Linux startup bootstrap checks local PostgreSQL even if an external admin file is supplied |
This is the actual configuration. Mandatory verified DB TLS is not implemented. External-DB Linux installation can still provision/check an unnecessary local server; the guide's general external-DB description does not mention this coupling. bootstrap call, connection builder |
| U-08 | Installer detects existing app/config and refuses; failure retains partial output | No safe resumable upgrade/uninstall/transactional rollback is implemented. First-install retries may require administrative handling of retained material. This is documented prototype scope, not a silently repaired behavior. |
| U-09 | Complete flag in local installers/verifier is selected by literal all |
Explicitly listing all five service names installs them but does not trigger the complete synthetic workflow in those wrappers. Distribution uses selected count for completeness. This is an observable verification asymmetry under US-16, without changing the application topology. |
| U-10 | Overview does sequential reads; no concurrency token or snapshot; history unbounded | Concurrent-write snapshot, conditional-edit protection, pagination and load resilience are absent. They are not explicit baseline story requirements; do not reclassify them as missing accepted features. |
| U-11 | Filesystem key ring has no explicitly configured encryption-at-rest; no immediate bearer revocation or account-record recheck | The prototype has persistent protected tickets and file permissions, not a full identity lifecycle. Registration/recovery/MFA/refresh/administration are explicitly outside scope. Production security compliance is not established. |
| U-12 | Supplied PFX is checked for a private key, then runtime verifies endpoints; generated leaf/CA expiry not automatically renewed | Early preflight, rotation, renewal and universal third-party chain support are not proven. Replacing certificates is an administrative first-install facility, not an implemented renewal service. |
Unresolved unknowns
Live installed software/configuration may differ from this checkout; no server, device or administrative session was accessed. Native Windows/macOS CI runs, actual deployment firewall rules, backup/restore behavior, multi-instance Gateway behavior, certificate renewal procedures, production security/clinical approval and external client implementations cannot be established from this repository. Traceability separates these from observed functional support.