Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 8.98 KB

decisions.md

File metadata and controls

34 lines (30 loc) · 8.98 KB

Decisions

Current decisions with their reasons. A decision is replaced, not appended to, when it changes. Dates are when the decision was made.

# Date Decision Reason
1 2026-11-06 Rust for the engine, the simulator and the console's backend. One toolchain and one set of shared crates for codecs, transports, the store and service hosting on Windows, macOS and Linux; a long-running service that handles instrument traffic benefits from memory safety and predictable latency.
2 2026-11-06 Engine as a headless service, clients attach over local IPC. An interface engine must run while nobody is signed in; a desktop-app-hosted engine stops when the window closes. One engine library, hosted by the packie binary; the console and CLI are clients.
3 2026-11-06 Two channel kinds: bridge (live byte stream between two endpoints) and message (store-and-forward with protocol, transforms, N destinations). Port-to-port bridging and store-and-forward messaging have different durability and failure semantics; forcing one model onto both produces either a lossy engine or a slow bridge.
4 2026-11-06 SQLite (bundled, WAL, one writer) as the message store. Single computer, no server to run; one writer keeps commits ordered without lock contention; message rates are far below SQLite's limits.
5 2026-11-06 Tauri 2 + React 19 console; no TUI in v1 (CLI status and log tail instead). Operators need grids, filters and editors. A terminal UI can be added later from the operator console specification.
6 2026-11-06 Declarative transformations only in v1 (mapping, code tables, conditions, filters). Scripting engine deferred. Covers instrument-to-HL7 and file mapping needs without choosing and sandboxing a language now. Candidates when revisited: QuickJS (rquickjs), rhai, WASM.
7 2026-11-12 AGPL-3.0-only, copyright "BGASoft Inc. and OpenBGA contributors"; trademark statement in NOTICE. Strong copyleft keeps modifications open, including modified versions offered to users over a network. One license across the OpenBGA server and interface products.
8 2026-11-06 Local IPC over Unix domain socket / Windows named pipe with length-prefixed JSON frames; DTOs defined in Rust and exported to TypeScript (ts-rs). No management port on the network; one contract for console and CLI; types stay in sync.
9 2026-11-06 Security proportionate to a private network: bind addresses, allowlists, management access restricted by the OS to a named group (decision 15; on Windows too, no longer all local users), OS key store for secrets, no console login of its own (the OS account is the identity, decision 13), no TLS in v1. The product sits inside the lab LAN; over-engineering here slows the first version without a requirement behind it.
10 2026-11-06 Cloud/remote management out of v1. Remote management may return later as an optional, off-by-default module. The engine is local by design; remote management is a separate product decision.
11 2026-11-06 Testing designed up front per crate, scenario-driven integration through a simulator, one workspace gate at integration points. Verification stays complete without rebuilding the whole workspace after every edit; see testing.md.
12 2026-11-06 Operator-chosen string ids for endpoints, channels and connectors (^[a-z0-9][a-z0-9._-]{0,63}$, unique per document); UUIDv7 only for runtime records (messages, deliveries, attempts, alerts). The runtime document follows docs/spec/configuration.md exactly. Configs, logs, CLI commands and scenarios must be readable (bridge-1, lis); UUIDs there would hurt every operator surface. Runtime records are machine-generated and need global uniqueness across restarts and resends.
13 2026-11-06 Operator attribution from the OS identity of the IPC peer (SO_PEERCRED/getpeereid on Unix, named-pipe client token on Windows); every command and every PHI view is recorded against that user. No application login. HIPAA unique user identification and audit controls; the OS already authenticates the person (laboratory compliance guide).
14 2026-11-06 Append-only, hash-chained audit log in its own SQLite file under the state directory, separate from the message store; audited commands fail closed if the audit write fails; console Audit page and packie audit list/export/verify; default retention 6 years. Audit controls and activity review (laboratory compliance guide).
15 2026-11-06 Management access limited to a named OS group on every platform: Unix packie group (exists); Windows pipe DACL limited to a local "PACK-IE Operators" group instead of all users. Amends decision #9's Windows rule. Access control for ePHI (laboratory compliance guide).
16 2026-11-06 Configuration change control: every version records who applied it and a required note; versions are kept without limit by default; a version can carry a verification sign-off (who, when, note). CLIA/CAP change control and record retention (laboratory compliance guide).
17 2026-11-06 packie backup create/verify/restore for store, bodies, configuration history and audit, with a SHA-256 manifest and a backup_stale alert; encryption at rest stays the OS's (full-disk encryption documented, not built in). HIPAA backup and disaster recovery, kept proportionate (laboratory compliance guide).
18 2026-11-07 Operator-defined exact-decimal arithmetic in mappings. The engine has no built-in flags, reference ranges, interpretation, diagnosis or autoverification. TLS on MLLP stays deferred while the Security Rule amendments are proposed only. Instrument-to-LIS mappings need dilution, unit factors and calculated values; the engine applies what the laboratory defines and validates (laboratory compliance guide).
19 2026-11-06 Filters and mappings are validated semantically in packie-config by compiling them with packie-transform against the connector's schema; packie-config depends on packie-transform. One compiler for validation and runtime: a document that validates cannot fail to compile when applied, and every problem carries its JSON path. packie-transform stays pure and free of configuration types.
20 2026-11-06 Paging: messages by offset and limit (default 100, at most 1000) with a total count; logs by a newest-first limit with before_seq and after_seq cursors. Message grids jump to any page of a sorted, filtered set the store indexes serve. The log ring is append-only, so sequence cursors stay stable while new events arrive.
21 2026-11-06 A store that fails to open degrades the engine, it does not stop it: bridge channels run, message channels are stopped with store_unavailable, and opening is retried every 10 s, doubling to 5 min. A damaged or locked store must not interrupt instrument traffic through bridges (invariant 1). Message channels never acknowledge without a commit, so senders keep their messages.
22 2026-11-06 ipc.group names the OS group that may use the management interface besides the service account (default packie; on Windows packie means the local group PACK-IE Operators). Unix: socket 0660 for the group, 0600 when it is null or missing. Windows: the pipe's DACL grants the group read/write besides SYSTEM and Administrators; a member can also create instances of the pipe name, which is accepted. The service installer creates the group and adds the installing user. The unelevated console and CLI must reach a service that runs as another account (LocalSystem on Windows, packie on Linux), and only people the lab grants access to may (decision 15). The pipe-instance risk is limited to group members on one lab computer (decision 9).
23 2026-11-19 PDF reports are read from their text layer by a declared template of labelled fields, with lopdf for the file structure and an engine-owned content-stream reader for positioned text, and the whole file travels Base64-encoded in the mapped message. No OCR, no layout inference, no reading of result tables. Every value placed in a patient record must come from a position the laboratory declared, and a changed label must stop the report visibly; OCR and inferred layouts produce plausible wrong values. The receiver gets the report itself, so results need not be re-keyed from a table. Among the pure-Rust readers evaluated, lopdf was the only one that read every malformed sample without a panic, and its text matched the reference extraction exactly.

Deferred

Scripting transformations; FHIR R4; TLS for MLLP/TCP; terminal UI; remote management; HTTP/REST endpoints; message channel fan-in (several sources into one channel); self-declared operator names for shared OS accounts.