snapkitty
hardware
ada
fortran
python
File size: 4,630 Bytes
5befefa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Sovereign Apollo β€” Modern Architecture

> **MODERN DESIGN** β€” preserves Apollo engineering principles on open, local-first infra. Not claiming flight equivalence.

## Principles

| Apollo Principle | Sovereign Mapping |
|----------------|-------------------|
| Deterministic sequencing | Fixed-step physics + deterministic replay hashes |
| Restart protection (phase table) | Write-ahead log + phase checkpoints |
| Human-in-loop (DSKY) | Local WebDSKY + crew procedure timeline |
| Telemetry lists | Typed frames + hash chain |
| Ground verification | Offline MCC dashboard |
| Reproducible builds | Nix / frozen lockfile + SHA256 artifacts |

## Evaluation (per Mission Β§5)

| Requirement | Design | Status |
|-------------|--------|--------|
| Local-first computation | All simulation in `src/` Node/TS, no cloud calls | IMPLEMENTED |
| Deterministic simulation | Fixed dt, seeded PRNG, no Date.now() | IMPLEMENTED |
| Reproducible builds | `package-lock.json` + `scripts/verify-artifacts.ts` + `REPRODUCIBLE_BUILD.md` | IMPLEMENTED |
| Hardware abstraction | `src/vehicle/` interfaces; swap `physics/engine.ts` | IMPLEMENTED |
| Open telemetry formats | JSON frames (`data/telemetry_schema.json`), CCSDS-compatible | IMPLEMENTED |
| Local mission control | `src/sovereign/local-first.ts` Web dashboard | IMPLEMENTED |
| Offline operation | `npm run replay:mission` works air-gapped after fetch | IMPLEMENTED |
| Cryptographic artifact verification | SHA256 + hash-chained telemetry | IMPLEMENTED |
| Formal verification | `formal/SovereignApollo/*.lean` + properties | IMPLEMENTED (stub β†’ expand) |
| Fault injection | `src/replay/fault.ts` | IMPLEMENTED |
| Digital-twin replay | `src/replay/deterministic.ts` | IMPLEMENTED |

## Stack β€” Sovereign [MODERN DESIGN]

```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  Sovereign Apollo Application               β”‚

β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚

β”‚  β”‚ Digital  β”‚ β”‚ Mission  β”‚ β”‚  Local MCC  β”‚  β”‚

β”‚  β”‚  Twin    β”‚ β”‚ Timeline β”‚ β”‚  Dashboard  β”‚  β”‚

β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚

β”‚       β”‚            β”‚              β”‚         β”‚

β”‚  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”   β”‚

β”‚  β”‚  Deterministic Replay Engine        β”‚   β”‚

β”‚  β”‚  hash(MET || state) chain          β”‚   β”‚

β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜   β”‚

β”‚       β”‚                           β”‚        β”‚

β”‚  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”    β”‚

β”‚  β”‚ Physics β”‚ β”‚   AGC   β”‚ β”‚ Telemetry β”‚    β”‚

β”‚  β”‚ Engine  β”‚ β”‚  Model  β”‚ β”‚  +Comms   β”‚    β”‚

β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚

β”‚                                            β”‚

β”‚  Offline Store (SQLite / JSON) ──────────  β”‚

β”‚  Artifact Registry (SHA256)               β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

### Storage

- `data/mission_timeline.json` + `data/*.json` β€” committed, hash-verified
- `evidence/artifacts/` β€” git-LFS-style but local; verified on build
- Replay logs: `replay_*.jsonl` (append-only, hash-chained)

### Determinism Guarantees

- No floating non-determinism: `engine.ts` uses fixed-step RK4, no `Math.random()` without seed
- Replay hash: `H0 = SHA256(seed); Hn = SHA256(H_{n-1} || canonical(state_n))`
- Parallel runs on same commit β†’ bit-identical `H_final` (verified in `tests/replay.test.ts`)

### Security

- No secrets in telemetry; uplink simulation requires explicit `--allow-uplink` flag
- Artifact verification prevents silent Luminary modification

### Deployment

- Single `npm ci && npm run build` on Linux/macOS/Windows (Node 18+)
- Docker: `FROM node:20-alpine` + `npm run verify:artifacts`
- No proprietary cloud binding; optional S3-compatible sync is opt-in.

## Non-Goals

- Not flight-qualifying; no claim to meet NASA-STD-8719
- No closed-source dependencies for core loop