Project Status: Key Fob Dev Station (2026-08-28)

# Project Status: Key Fob Dev Station (2026-08-28)

> Live open-items tracking: **Forgejo keyfob-station#1–8** (seit 31.08.; zuvor Code-Audit-Notiz). Diese Notiz = periodischer Status-Snapshot + Operations-Quick-Reference.
> **31.08.: OpenUP-Set komplett + I5-Arbeitspakete in Forgejo (keyfob-station#1–5); Slideset → #8; externe KLMS-Punkte → #7.**

## Commit: `014fe17` on `master`, pushed to origin

**Product name (official, from 2026-08-28): "Ford FNV4 Key Fob Personalization
Station"** — use this name in all OpenUP documents.

## **THE OPENUP WORK PRODUCT SET IS COMPLETE + AUDITED + INTEGRATED (014fe17)**

Vision, Use Case Model + Specifications, Supplementary Specifications,
Architecture Notebook, Test Cases, Project Plan (+ Process Tailoring, 7 entries),
Iteration Plan (I5), Iteration Assessment (I1-I4), Work Items List, Risk List.
Audit pass (f38200f): pipeline content-deterministic (JSON hash-identical after
full rebuild), latent export bug fixed, integrity gates added. Integration pass
(014fe17): **PlantUML diagrams = design-diagram annex of the Architecture
Notebook** (generated 9.5 Design Diagram Index, 19 diagrams, titles from
sources, mapped to requirements/UCs/mechanisms); **release test reports =
OpenUP Test Log work product** (generated Test Log Index in the test-cases doc,
parsed live from docs/test-reports). Both mappings recorded in Process
Tailoring. Only remaining optional envelope: test-script.docx.

## Iteration I5 (2026-08-31 → 2026-09-11) — AGREED 2026-08-28

- **WI-14 KLMS confirmation call** (week of 2026-08-31, PO + Clypeum):
  report_usage semantics, scrapping notification, production signing key → **keyfob-station#1**
- **WI-15 SCRAP panel in ALL variants** (due 2026-09-11): warn user + explicit
  confirmation; read out UID of placed fobs; notify KLMS about the scrapping → **keyfob-station#2**
- **WI-16** UC-10 Scrap Key Fob in the EA model (scenario + traces + docs
  pipeline) — ADD SURGICALLY, NOT via generate-usecase-model.ps1 (that wipes
  the manual diagram layout) → **keyfob-station#3**
- **WI-17** re-ship variant zips to the remote machine + live verification → **keyfob-station#4**
- **WI-14a** Report Usage: call after KLMS provisioning (toggleable checkbox, default OFF) → **keyfob-station#5**
- New risks recorded: accidental scrapping (mitigated by confirm dialog + UID
  display), report_usage dependency (call before implementation)

## What Works (all HW-verified)

### KLMS REST integration — COMPLETE
- mTLS + token auth against dev Clypeum CCS, seed lifecycle, container generation (201)
- Full enforced chain: wrapper-key decrypt → **container signature verify** →
  session-key gate → SCP03 → personalization → GA validation (reconnect failures
  now fail the run too)
- Private key card-ready (CBC+IV0+M2 forwarded untouched) since 2026-08-17

### Files production flow
- Re-install + provision + FACTORY + validation, retry-on-failure

### Remote test machine (2026-08-27)
- Deployed (variant zips); all panels work; reader fallback fixed
- FESN/SPID displayed in all result grids (MISSING when not read)

### Infrastructure
- 3 build variants, zero clippy warnings; size-optimized release profile
- Config-driven typeID / keyBundleType / accept_invalid_certs / signing_pubkey_path
- dev_profiles.toml keys-only; certs dir required (fail-fast)
- Test reports: `python scripts/generate-test-report.py` (gate + Markdown/PDF
  evidence; commit at release points) — now the OpenUP Test Log work product
- **OpenUP documentation (2026-08-28, complete + audited + integrated)**: all
  work products in `docs/openup/`, EA model `docs/openup/model/keyfob-station.eapx`
  as the source of truth, JSON exports in `docs/openup/model/exports/`,
  generators in `scripts/generate-*.{py,ps1}`. Iterations mapped: I1 bring-up
  (Jun), I2 real HW (Aug 4-11), I3 KLMS integration/hardening (Aug 14-21),
  I4 deployment/documentation (Aug 26-28), I5 planned (SCRAP + KLMS call).

### EA automation quirks (learned, do not rediscover)
- `Repository.CreateModel` broken via late binding; copy `EABase.eapx` instead
- Diagram element placement: `diagram.DiagramObjects` (NOT `.Objects`)
- **Headless diagram raster export is broken** (`PutDiagramImageToFile` renders
  degenerate ~220x227); use `diagram.SaveAsPDF()` + `scripts/render-diagram-pngs.py`
- Scenario steps persist ONLY if `scenario.Update()` runs AGAIN after adding steps
- **Trace/Dependency connectors appear in BOTH ends' collections — always filter
  to the client side (ClientID == element) when exporting** (bit us twice)
- `element.Connectors` needs `.Refresh()` before first read
- COM wrappers go STALE across package churn — re-fetch fresh; guard `GetByName`
- `GenerateDiagramFromScenario` unusable via COM (undocumented signature)
- **EA license/COM contention: windowless orphan EA.exe processes block new
  automation instances (OpenFile/App creation hangs silently). Kill windowless
  EA pids BEFORE each EA script run; leave a cleanup gap between consecutive
  EA builders.**
- Re-running `generate-usecase-model.ps1` wipes the manual diagram layout

## Deployment (three variant zips at 8bac041)

`scripts\package-deployment.ps1` → `deploy\` (+ merged folder, gitignored):
- **`keyfob-station-dev.zip`** — all panels + provisioning content
- **`keyfob-station-test.zip`** — test variant + content
- **`keyfob-station-prod.zip`** — KLMS panel only, no content, prod user guide only
- Batch discovery: recursive FESN.txt scan, newest delivery stamp wins

## Fob Status

| Fob | Chip UID | Status |
|-----|----------|--------|
| #1 | `04468c7ae11d90` | LOCKED (GP counter exhausted — see incident note) |
| #2 | `04478c7ae11d90` | Provisioned + validated (KLMS flow, last: 2026-08-21) |
| #3 | `044b8c7ae11d90` | Provisioned + validated (KLMS flow, 2026-08-17) |

## Next

→ **Alles in Forgejo getrackt:** I5-Execution = **keyfob-station#1–5** (Milestone bis 11.09.); externe KLMS-Punkte = **#7**; Slideset = **#8**; optionaler Refactoring-Backlog = **#6**. Nach dem WI-14-Call: report_usage/CID/checksum-Semantik in die Supplementary Requirements (Generator-Script) + neue SCRAP-Testfälle übernehmen.

## Operations quick reference

- **Workspace**: `D:\Development\Workspaces\rust-workspace\keyfob-station`
- **Dev run**: `kfs-dev.bat` / `RUST_LOG=info,kf_dev_station=debug cargo run -p kf-dev-station`
- **Package**: `powershell -File scripts\package-deployment.ps1` (3 release builds)
- **Test report**: `python scripts\generate-test-report.py` → docs/test-reports/
- **User docs**: `python scripts\generate-user-docs.py` → `docs/user/*.docx`
- **OpenUP pipeline** (regenerates everything; kill windowless EA pids first,
  gap between EA steps): vision → uc-model (wipes layout!) → uc-scenarios →
  requirements → analysis → design → test-cases; `scripts\export-model-json.ps1`
  (4 JSONs); docs: ucspec / supp-spec / arch-notebook / test-cases /
  pm-docs; diagrams: `scripts\render-diagram-pngs.py` (needs pymupdf)
- **Diagrams**: `docs\diagrams\{KDF,Transport,HSM_Backup}\` (SVG+PNG for slides);
  re-render: `python scripts/render-puml.py <folder>` (needs internet);
  indexed in Architecture Notebook section 9.5
- **Config**: `data\klms-config.toml`; TLS material in `data\tls\` (gitignored;
  passphrase `IKWGc4kTfGnt` for the current dev identity)
- **Certs dir (Files mode)**: REQUIRED — `data\static-certs` (deploy) or
  `reference\new-certs` (repo); no built-in fallback
- **Windows reader**: `scripts/configure-windows.ps1` once

id: a6768b6c7d2d4dbb855399468b9db6fa
parent_id: beb251c3b3f9490285e6cb68942a5145
created_time: 2026-08-04T07:56:04.489Z
updated_time: 2026-08-31T18:45:17.818Z
is_conflict: 0
latitude: 0.00000000
longitude: 0.00000000
altitude: 0.0000
author: 
source_url: 
is_todo: 0
todo_due: 0
todo_completed: 0
source: joplin-desktop
source_application: net.cozic.joplin-desktop
application_data: 
order: 1785830164489
user_created_time: 2026-08-04T07:56:04.489Z
user_updated_time: 2026-08-31T18:45:17.818Z
encryption_cipher_text: 
encryption_applied: 0
markup_language: 1
is_shared: 0
share_id: 
conflict_original_id: 
master_key_id: 
user_data: 
deleted_time: 0
is_locked: 0
extracted_resource_ids: 
type_: 1