STP-SIM-001 Deterministic Simulation Protocol
Status: Final draft prepared for handoff (pending review)
Version: 0.9
Owner: BionicLoop engineering
Prepared by: BionicLoop engineering
Reviewer: ____
Approver: ____
Decision date: ____
Effective date: ____
Baseline freeze SHA: ____
Last updated: 2026-04-06 15:20 EDT
Revision History
| Version | Date | Author | Summary of Changes |
|---|---|---|---|
| 0.1 | 2026-03-27 | Engineering | Initial deterministic simulation protocol draft |
| 0.9 | 2026-04-06 | BionicLoop engineering | Added handoff-ready document-control metadata for the software package |
1. Purpose
Define the protocol for deterministic medium-fidelity simulation runs used to verify runtime safety logic before real-device execution.
2. Scope
This protocol owns:
TV-SIM-001TV-SIM-002TV-SIM-003TV-SIM-004TV-SIM-005
It complements, but does not replace, real-device validation.
3. References
4. Roles
- Author: BionicLoop engineering
- Executor: engineering or QA delegate
- Reviewer: quality / design assurance
- Approver: submission-quality owner
5. Prerequisites
- Deterministic simulation harness is buildable and runnable
- Scenario fixtures are locked for the run label
- Output directory is defined in formal or working STR lane before execution
6. Environment
- Host: macOS development workstation
- Tooling: simulation harness scripts and checked-in project/package state
- No live hardware required
7. Procedure
7.1 Setup
- Record git SHA, harness script version, and output path.
- Select formal vs working evidence lane.
- Record scenario seed and fixture set for the run.
7.2 Execution
- Execute the simulation harness for all required
TV-SIM-*scenarios. - Capture generated:
- run context
- expected outputs
- actual outputs
- diffs
- summarized results
- Review failures for determinism, not just exit-code status.
7.3 Failure / Deviation Handling
- If output is nondeterministic, record as harness/protocol failure before accepting behavioral conclusions.
- If a scenario is missing required artifacts, rerun is required.
8. Expected Results
- Each
TV-SIM-*scenario produces a complete STR-style artifact bundle. - Runtime cadence, degraded-input, BG/meal interplay, and alert churn expectations match stored expected outputs.
If cloud-log review support is used for a simulation run, start an Integration Log Session in Home Settings before the scenario begins and stop it immediately after completion.
9. Pass / Fail Criteria
- Pass when all selected simulation scenarios pass and generate complete traceable artifacts.
- Fail when any scenario output diverges without approved rationale or artifacts are incomplete.
10. Evidence to Capture
run-contextresultsexpectedactualdiff- scenario-to-test trace map
- if cloud-log review support was used:
test_run_id- UTC time window
- selected upload threshold
- explicit note that the session was started before execution and stopped after execution
- STR target path:
Docs/Quality/Evidence/Formal/STR-SIM-001/<run-label>/
11. Traceability
TV-* ID |
Purpose |
|---|---|
TV-SIM-001 |
Anchored cadence across reconnect/relaunch |
TV-SIM-002 |
Step-0 gate and degraded CGM execution |
TV-SIM-003 |
Pump-unavailable command-block behavior |
TV-SIM-004 |
Meal/BG/reconnect timing interplay |
TV-SIM-005 |
Alert lifecycle churn / dedupe / clear |