docs: bring the documentation up to the daemon/client era

A large gap had opened between the docs and the code: the README and
INTEGRATION guide did not mention the gRPC daemon or the Python client at
all (the entire vendor surface), ARCHITECTURE still described secs_server
as the ~1200-line canonical wiring example (it is a ~110-line thin main
over EquipmentRuntime), and test counts across six files were stale
(445/2753 -> 473/3087 core + the separate 125-assertion daemon suite).

- README: new "Integrating your tool (pick a tier)" section — Python
  client / any-language gRPC / embedded C++ — plus daemon tests and
  tools/run_interop.sh in the Testing section.
- ARCHITECTURE: layer diagram gains the vendor-surface and
  EquipmentRuntime/default_handlers tiers; stale wiring row fixed.
- INTEGRATION: three-tier chooser up front (this guide = the C++ tier).
- ch30 tour: secs_gemd + secs_gemd_tests in the binaries table.
- ch31: example alarm used a nonexistent `alcd:` field with bit 7 set
  (which the validator forbids) -> real `category:`/`name:` fields, and
  the roles: block documented.
- ch35: handler-location note now points at default_handlers.cpp's 15
  per-capability register_* functions.
- ch40: built-artifacts list + sample output counts.
- ch50: secsgem::gem runtime/default_handlers/handler_slot/name_index
  includes + new secsgem::daemon namespace section.
- PROOFS: test-count table gains the runtime/handlers/daemon row so the
  tally adds up; daemon suite noted. VERIFICATION/COMPLIANCE counts.
- interop/README: the one-command runner + the two daemon-track harnesses
  (daemon_interop, pyclient_interop).

Audited via a docs-vs-code sweep (the audit itself under-reported: it
validated counts textually; reality was 473/3087).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 23:18:31 +02:00
parent 8686654b15
commit af1a159c59
12 changed files with 174 additions and 22 deletions
+16 -4
View File
@@ -38,13 +38,25 @@ doc covers.
---
## 2. The five layers
## 2. The layers
```
┌─────────────────────────────────────────────────────────────────┐
│ vendor surfaces (out-of-process) │
│ secs_gemd gRPC daemon (proto/secsgem/v1) ← clients/python │
│ secsgem-client and any-language gRPC stubs │
├─────────────────────────────────────────────────────────────────┤
│ apps/ (your main.cpp lives here) │
│ secs_server, secs_client, secs_conformance, secs_bench,
│ fuzz_*, secs_interop_probe
│ secs_server, secs_client, secs_gemd, secs_conformance, │
secs_bench, fuzz_*, secs_interop_probe │
├─────────────────────────────────────────────────────────────────┤
│ gem::EquipmentRuntime + register_* capability functions │
│ ───────────────────────────────────────────────────── │
│ Runtime: owns io_context + Server + model + control FSM + │
│ Router; thread-safe set/emit/alarm API, on_command hook, │
│ read_sync, control-state mirror, link/state observers │
│ default_handlers: the 56 GEM handlers as 15 per-capability │
│ register_* fns (ids bound via the config's roles: block) │
├─────────────────────────────────────────────────────────────────┤
│ gem::Router + gem::EquipmentDataModel │
│ ───────────────────────────────────────── │
@@ -469,7 +481,7 @@ contract has no locks; adding any would diverge from it.
| How the Router dispatches | `gem/router.hpp` |
| How a store implements persistence | `gem/store/spool.hpp` (smallest), `gem/store/process_jobs.hpp` (richest) |
| How an FSM is structured | `gem/process_job_state.hpp`, `src/gem/process_job_state.cpp` |
| How the application wires it all | `apps/secs_server.cpp` (the canonical example, ~1200 lines) |
| How the application wires it all | `gem::EquipmentRuntime` + `register_default_handlers` (apps/secs_server.cpp is now a ~110-line thin main over them) |
| How a customer would write main() | `examples/pvd_tool/main.cpp` (the worked vendor example) |
| How thread-safety works | `tests/test_thread_safety.cpp`, INTEGRATION.md §3 |
| How E84 timers integrate with asio | `gem/e84_asio_timers.hpp` (the canonical I/O-adapter pattern) |