SNAPKITTYWEST commited on
Commit
7834c25
·
verified ·
1 Parent(s): 6afa130

Sync with GitHub, license metadata from LICENSE files, commercial license notice

Browse files

sync from SNAPKITTYWEST/Sovereign-Event-Bus: 1 files
metadata license: None -> apache-2.0
README: License section kept (already accurate)

Files changed (1) hide show
  1. README.md +342 -336
README.md CHANGED
@@ -1,336 +1,342 @@
1
- # Sovereign Event Bus
2
-
3
- ![Sovereign Event Bus architecture and implementation status](docs/assets/seb-architecture.svg)
4
-
5
- Sovereign Event Bus (SEB) is a multi-language reference implementation for
6
- deterministic event coordination, policy-gated execution, human review, and
7
- evidence-oriented delivery. The repository explores how an event can move from
8
- an explicit authority envelope to an auditable outcome across Rust, Erlang,
9
- Ada, Lean, and legacy enterprise adapters.
10
-
11
- > [!IMPORTANT]
12
- > SEB is under active hardening. It is not a production-ready event broker,
13
- > cryptographic trust boundary, WORM store, or completed formal verification.
14
- > The status tables below separate tested code from interfaces, prototypes, and
15
- > open gates.
16
-
17
- [Architecture](#architecture) | [Current status](#current-status) |
18
- [Evaluate the code](#evaluate-the-code) | [Repository map](#repository-map) |
19
- [BOB commands](#bob-commands) | [Production hardening](docs/PRODUCTION_HARDENING.md) |
20
- [Developer guide](docs/DEVELOPER_GUIDE.md)
21
-
22
- ## Why this repository exists
23
-
24
- SEB is organized around five engineering questions:
25
-
26
- 1. Can an event carry its intent, authority, evidence, and continuation state
27
- as one inspectable envelope?
28
- 2. Can routing and policy decisions be deterministic enough to reproduce?
29
- 3. Can native, managed, and legacy runtimes share a stable event contract?
30
- 4. Can high-impact transitions require an explicit human decision?
31
- 5. Can implementation evidence be connected to formal models without claiming
32
- more assurance than the evidence supports?
33
-
34
- The codebase contains concrete experiments for each question. It does not yet
35
- compose them into one deployable service.
36
-
37
- ## Current status
38
-
39
- Status recorded on 2026-07-25 from the repository's default branch.
40
-
41
- | Component | What is present | Current evidence | Open gate |
42
- | --- | --- | --- | --- |
43
- | Reasoning | Rust A2A events, traces, streaming buffers, and integration types | 18 library tests pass | The example target does not compile; transport, persistence, and real signatures are absent |
44
- | Universe | Rust artifact manifests, indexes, search, and a compile-verify-merge model | 15 library tests pass | The example target does not compile; gate steps inspect metadata rather than invoking tools |
45
- | Runtime | Erlang/OTP supervisors, agent FSM, partition manager, policy bridge, and kernel facade | Source and test modules are present | Runtime compile/test/release is not validated; the NIF and policy process are not operational |
46
- | Kernel | Ada interfaces, an in-memory kernel body, WAL source, and a C NIF surface | Public interfaces and test-vector scaffolding are present | No portable build; persistence is disconnected; verification and key handling contain placeholders |
47
- | Human review | Rust queue, audit log, and commit-gateway types | Workflow structure is present | The crate does not compile; authorization, durable storage, and gateway integration are incomplete |
48
- | Lean verification | Lean models and proof attempts pinned to Lean 4.7.0 | Specifications are inspectable | The default build fails and proof files contain `sorry` or simplified cryptographic models |
49
- | Enterprise adapters | RPG/ILE fiscal adapter, COBOL copybook, and PL/I declarations | Platform contracts and build notes are present | Not tested on IBM i or z/OS; wire layouts are not yet interoperable |
50
- | Contracts and codegen | Rust, TypeScript, Python, Lean, and OpenAPI templates with shell generators | Templates are versioned | Generators are copy-oriented, output assumptions differ, and no conformance suite enforces parity |
51
-
52
- The two passing Rust library suites are useful development baselines. They do
53
- not constitute end-to-end, security, interoperability, or production evidence.
54
-
55
- ## Architecture
56
-
57
- The intended event path is:
58
-
59
- ```text
60
- producer
61
- |
62
- v
63
- event envelope
64
- |
65
- v
66
- authority and policy decision
67
- |
68
- v
69
- deterministic routing
70
- |
71
- +----> bounded execution adapter
72
- |
73
- +----> human review when policy requires it
74
- |
75
- v
76
- receipt, trace, and durable evidence
77
- ```
78
-
79
- The repository implements these concerns in separate component experiments:
80
-
81
- - `seb/contracts` defines candidate cross-language shapes.
82
- - `seb/kernel` explores append, chain, offset, and segment interfaces.
83
- - `seb/runtime` explores OTP supervision and per-agent coordination.
84
- - `seb/reasoning` records reasoning-oriented A2A events and trace timelines.
85
- - `seb/universe` indexes artifacts and models promotion gates.
86
- - `seb/human_touch` models review and approval objects.
87
- - `seb/verification/lean4` models selected invariants.
88
- - `seb/adapters` documents legacy platform integration.
89
-
90
- There is currently no executable that joins every box into one request path.
91
- The canonical wire encoding, signature input, key authority, persistence
92
- contract, and failure semantics must be unified before components can be
93
- treated as one system.
94
-
95
- ## Evaluate the code
96
-
97
- ### Prerequisite
98
-
99
- Install a Rust toolchain with Cargo. The repository has no root Cargo workspace,
100
- so invoke each crate through its manifest.
101
-
102
- ```bash
103
- git clone https://github.com/SNAPKITTYWEST/Sovereign-Event-Bus.git
104
- cd Sovereign-Event-Bus
105
-
106
- cargo test --manifest-path seb/reasoning/Cargo.toml --lib
107
- cargo test --manifest-path seb/universe/Cargo.toml --lib
108
- ```
109
-
110
- Expected baseline:
111
-
112
- ```text
113
- seb/reasoning: 18 library tests pass
114
- seb/universe: 15 library tests pass
115
- ```
116
-
117
- Cargo will create local `target/` directories and may create crate-level lock
118
- files. Build outputs are ignored by Git.
119
-
120
- Do not use a successful library-only run to infer that examples or all targets
121
- pass. These broader commands currently expose known integration failures:
122
-
123
- ```bash
124
- cargo test --manifest-path seb/reasoning/Cargo.toml --all-targets --all-features
125
- cargo test --manifest-path seb/universe/Cargo.toml --all-targets
126
- cargo test --manifest-path seb/human_touch/Cargo.toml
127
- ```
128
-
129
- The failures and ownership boundaries are cataloged in the
130
- [developer guide](docs/DEVELOPER_GUIDE.md).
131
-
132
- ### Additional toolchains
133
-
134
- Install only what is needed for the component being evaluated.
135
-
136
- | Area | Required environment |
137
- | --- | --- |
138
- | Erlang runtime | Erlang/OTP and `rebar3` |
139
- | Lean models | `elan`/Lean and `lake`; the project pins Lean and mathlib 4.7.0 |
140
- | Ada kernel | GNAT/SPARK tooling, Erlang NIF headers, and the intended native crypto dependencies |
141
- | Code generation | Bash, GNU Make, and Python 3; optional TypeScript and YAML validators |
142
- | RPG adapter | IBM i with ILE RPG and DB2 objects described in the adapter guide |
143
- | PL/I contract | z/OS Enterprise PL/I and site-specific JCL/link configuration |
144
-
145
- Windows users should run shell tooling in a real Bash environment such as
146
- Git Bash, MSYS2, or WSL. The scripts assume several GNU utilities and are not
147
- PowerShell-native.
148
-
149
- ## Repository map
150
-
151
- ```text
152
- .
153
- |-- bob-shell/ Development command wrappers
154
- |-- docs/
155
- | |-- DEVELOPER_GUIDE.md Build, test, and contribution workflows
156
- | |-- PRODUCTION_HARDENING.md Readiness gates and operational criteria
157
- | `-- assets/ Repository visuals
158
- |-- seb/
159
- | |-- adapters/ RPG, copybook, and PL/I integration assets
160
- | |-- contracts/ Cross-language source templates
161
- | |-- human_touch/ Human-review Rust prototype
162
- | |-- kernel/ Ada kernel and C Erlang NIF prototype
163
- | |-- reasoning/ Rust reasoning and trace library
164
- | |-- runtime/ Erlang/OTP runtime prototype
165
- | |-- scripts/codegen/ Template expansion scripts
166
- | |-- universe/ Rust artifact-universe library
167
- | `-- verification/lean4/ Lean models and proof sources
168
- |-- BOB_OPERATIONAL_CONTRACT.md
169
- |-- BOB_TRUST_DEED_V1.md
170
- `-- LICENSE
171
- ```
172
-
173
- Layer numbers in historical documents are not fully consistent. This README
174
- uses component names as the stable identifiers. References to an L0 master
175
- specification or Idris implementation point to work that is not present in this
176
- repository.
177
-
178
- ## Working with the components
179
-
180
- ### Reasoning
181
-
182
- The reasoning crate exposes A2A event types, trace records, streaming support,
183
- and integration structures from
184
- [`seb/reasoning/src/lib.rs`](seb/reasoning/src/lib.rs).
185
-
186
- ```bash
187
- cargo build --manifest-path seb/reasoning/Cargo.toml
188
- cargo test --manifest-path seb/reasoning/Cargo.toml --lib
189
- ```
190
-
191
- Trace storage and event streaming are process-memory structures. The current
192
- signature field is not an Ed25519 implementation and must not be used as
193
- authentication evidence.
194
-
195
- ### Universe
196
-
197
- The universe crate exposes artifact manifests, an in-memory repository index,
198
- and a model of compile-verify-merge gates from
199
- [`seb/universe/src/lib.rs`](seb/universe/src/lib.rs).
200
-
201
- ```bash
202
- cargo build --manifest-path seb/universe/Cargo.toml
203
- cargo test --manifest-path seb/universe/Cargo.toml --lib
204
- ```
205
-
206
- Gate steps currently validate metadata and simulated outcomes; they do not run
207
- compilers, proof checkers, review services, or deployment systems.
208
-
209
- ### Erlang runtime
210
-
211
- The intended local workflow is:
212
-
213
- ```bash
214
- cd seb/runtime
215
- rebar3 compile
216
- rebar3 eunit
217
- rebar3 dialyzer
218
- ```
219
-
220
- These commands are targets to restore, not a passing baseline. The current
221
- source has compile issues, the test functions are not discovered by EUnit, and
222
- the Erlang facade does not load or match the C NIF interface.
223
-
224
- ### Lean verification
225
-
226
- ```bash
227
- cd seb/verification/lean4
228
- lake build
229
- ```
230
-
231
- The project pins Lean 4.7.0 and mathlib 4.7.0. The default proof target
232
- currently fails type checking, and several proof sources contain `sorry`.
233
- Treat all proof certificates in the tree as historical development artifacts
234
- until CI builds the declared theorem set with a zero-placeholder policy.
235
-
236
- ### Kernel and adapters
237
-
238
- The Ada/C kernel and IBM adapter sources do not have a portable, tested build
239
- entry point. Start with:
240
-
241
- - [`seb/kernel/src/seb_kernel.ads`](seb/kernel/src/seb_kernel.ads) for the
242
- intended kernel API.
243
- - [`seb/kernel/c/seb_kernel_nif.c`](seb/kernel/c/seb_kernel_nif.c) for the C NIF
244
- registry.
245
- - [`seb/adapters/L4_ADAPTER_BUILD_GUIDE.md`](seb/adapters/L4_ADAPTER_BUILD_GUIDE.md)
246
- for target-platform assumptions.
247
-
248
- Do not infer binary or wire compatibility from matching field names. Current
249
- Ada, C test-vector, RPG, PL/I, Rust, Python, and TypeScript representations do
250
- not yet share one validated canonical encoding.
251
-
252
- ## BOB commands
253
-
254
- `bob-shell` contains development wrappers for common repository operations.
255
- Invoke the scripts by filename from a Bash environment:
256
-
257
- ```bash
258
- bash bob-shell/bob-build.sh
259
- bash bob-shell/bob-test.sh
260
- bash bob-shell/bob-audit.sh
261
- bash bob-shell/bob-policy.sh
262
- bash bob-shell/bob-proof.sh
263
- bash bob-shell/bob-deploy.sh
264
- ```
265
-
266
- | Command | Intended use | Important current behavior |
267
- | --- | --- | --- |
268
- | `bob-build.sh` | Dispatch component builds | Missing toolchains may be skipped; the report is not proof that every component built |
269
- | `bob-test.sh` | Dispatch test suites | Deterministic mode sets environment variables but does not establish reproducibility by itself |
270
- | `bob-audit.sh` | Produce file hashes and audit output | Requires GNU-style utilities; traversal, timestamps, and build files affect output |
271
- | `bob-policy.sh` | Run a Prolog policy query | May create default governance files and executes a caller-supplied query |
272
- | `bob-proof.sh` | Dispatch a proof backend | May create placeholder proof files; its generated certificate is not a production attestation |
273
- | `bob-deploy.sh` | Package build output | Validation and sealing can be disabled; packaging is not deployment authorization |
274
-
275
- These wrappers are operator conveniences, not a security boundary. Review their
276
- working-tree mutations and generated reports before using them in automation.
277
- See [`bob-shell/README.md`](bob-shell/README.md) and the
278
- [developer guide](docs/DEVELOPER_GUIDE.md) for details.
279
-
280
- ## Failure modes to design for
281
-
282
- The production plan treats the following as first-class scenarios:
283
-
284
- | Scenario | Current behavior or risk |
285
- | --- | --- |
286
- | Process crash or restart | Several stores are in memory; recovery and replay are not demonstrated |
287
- | Duplicate or replayed event | No shared nonce/idempotency store spans the components |
288
- | Policy engine unavailable | The Erlang bridge can lack a live external process |
289
- | Key compromise or rotation | No key authority, rotation protocol, revocation path, or historical-key policy is implemented |
290
- | Partial append | WAL integration, atomic commit, and recovery evidence are incomplete |
291
- | Partition rebalance | Current logic resets counters rather than transferring assignments |
292
- | Human decision timeout | Durable queueing, escalation, authorization, and exactly-once commit are incomplete |
293
- | Malformed or oversized envelope | A canonical encoding and cross-language conformance limits are not enforced |
294
- | Short or non-ASCII identifiers | Some Rust diagnostic formatting uses fixed byte slices and can panic |
295
- | Mixed-version deployment | There is no schema negotiation or compatibility matrix |
296
-
297
- See [Production hardening](docs/PRODUCTION_HARDENING.md) for exit criteria,
298
- required evidence, threat boundaries, release controls, and edge-case tests.
299
-
300
- ## Security and assurance
301
-
302
- Until the hardening gates are complete:
303
-
304
- - Do not expose SEB directly to untrusted networks.
305
- - Do not use generated seals or certificates as legal, financial, or compliance
306
- evidence.
307
- - Do not process secrets, regulated records, or irreversible production actions.
308
- - Do not rely on BOB reports as attestations without independently validating
309
- their inputs and tool exits.
310
- - Report non-sensitive defects through GitHub issues. Do not publish an
311
- undisclosed vulnerability before a private reporting channel is established.
312
-
313
- The project needs an explicit security policy, supported-version policy, and
314
- private disclosure route before a public production release.
315
-
316
- ## Development
317
-
318
- The [developer guide](docs/DEVELOPER_GUIDE.md) covers:
319
-
320
- - component-specific build and test commands;
321
- - known failures and expected outputs;
322
- - contract and wire-format ownership;
323
- - generated files and cleanup;
324
- - review requirements for security-sensitive changes; and
325
- - the evidence required to change a status in this README.
326
-
327
- Contributions should make the smallest coherent change, include tests at the
328
- affected boundary, and update status claims only when a repeatable command or
329
- artifact supports them.
330
-
331
- ## License
332
-
333
- The repository is distributed under the
334
- [Apache License 2.0](LICENSE). Some component metadata contains older license
335
- labels; resolve those inconsistencies before packaging or redistributing an
336
- affected component.
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - snapkitty
5
+ ---
6
+
7
+ # Sovereign Event Bus
8
+
9
+ ![Sovereign Event Bus architecture and implementation status](docs/assets/seb-architecture.svg)
10
+
11
+ Sovereign Event Bus (SEB) is a multi-language reference implementation for
12
+ deterministic event coordination, policy-gated execution, human review, and
13
+ evidence-oriented delivery. The repository explores how an event can move from
14
+ an explicit authority envelope to an auditable outcome across Rust, Erlang,
15
+ Ada, Lean, and legacy enterprise adapters.
16
+
17
+ > [!IMPORTANT]
18
+ > SEB is under active hardening. It is not a production-ready event broker,
19
+ > cryptographic trust boundary, WORM store, or completed formal verification.
20
+ > The status tables below separate tested code from interfaces, prototypes, and
21
+ > open gates.
22
+
23
+ [Architecture](#architecture) | [Current status](#current-status) |
24
+ [Evaluate the code](#evaluate-the-code) | [Repository map](#repository-map) |
25
+ [BOB commands](#bob-commands) | [Production hardening](docs/PRODUCTION_HARDENING.md) |
26
+ [Developer guide](docs/DEVELOPER_GUIDE.md)
27
+
28
+ ## Why this repository exists
29
+
30
+ SEB is organized around five engineering questions:
31
+
32
+ 1. Can an event carry its intent, authority, evidence, and continuation state
33
+ as one inspectable envelope?
34
+ 2. Can routing and policy decisions be deterministic enough to reproduce?
35
+ 3. Can native, managed, and legacy runtimes share a stable event contract?
36
+ 4. Can high-impact transitions require an explicit human decision?
37
+ 5. Can implementation evidence be connected to formal models without claiming
38
+ more assurance than the evidence supports?
39
+
40
+ The codebase contains concrete experiments for each question. It does not yet
41
+ compose them into one deployable service.
42
+
43
+ ## Current status
44
+
45
+ Status recorded on 2026-07-25 from the repository's default branch.
46
+
47
+ | Component | What is present | Current evidence | Open gate |
48
+ | --- | --- | --- | --- |
49
+ | Reasoning | Rust A2A events, traces, streaming buffers, and integration types | 18 library tests pass | The example target does not compile; transport, persistence, and real signatures are absent |
50
+ | Universe | Rust artifact manifests, indexes, search, and a compile-verify-merge model | 15 library tests pass | The example target does not compile; gate steps inspect metadata rather than invoking tools |
51
+ | Runtime | Erlang/OTP supervisors, agent FSM, partition manager, policy bridge, and kernel facade | Source and test modules are present | Runtime compile/test/release is not validated; the NIF and policy process are not operational |
52
+ | Kernel | Ada interfaces, an in-memory kernel body, WAL source, and a C NIF surface | Public interfaces and test-vector scaffolding are present | No portable build; persistence is disconnected; verification and key handling contain placeholders |
53
+ | Human review | Rust queue, audit log, and commit-gateway types | Workflow structure is present | The crate does not compile; authorization, durable storage, and gateway integration are incomplete |
54
+ | Lean verification | Lean models and proof attempts pinned to Lean 4.7.0 | Specifications are inspectable | The default build fails and proof files contain `sorry` or simplified cryptographic models |
55
+ | Enterprise adapters | RPG/ILE fiscal adapter, COBOL copybook, and PL/I declarations | Platform contracts and build notes are present | Not tested on IBM i or z/OS; wire layouts are not yet interoperable |
56
+ | Contracts and codegen | Rust, TypeScript, Python, Lean, and OpenAPI templates with shell generators | Templates are versioned | Generators are copy-oriented, output assumptions differ, and no conformance suite enforces parity |
57
+
58
+ The two passing Rust library suites are useful development baselines. They do
59
+ not constitute end-to-end, security, interoperability, or production evidence.
60
+
61
+ ## Architecture
62
+
63
+ The intended event path is:
64
+
65
+ ```text
66
+ producer
67
+ |
68
+ v
69
+ event envelope
70
+ |
71
+ v
72
+ authority and policy decision
73
+ |
74
+ v
75
+ deterministic routing
76
+ |
77
+ +----> bounded execution adapter
78
+ |
79
+ +----> human review when policy requires it
80
+ |
81
+ v
82
+ receipt, trace, and durable evidence
83
+ ```
84
+
85
+ The repository implements these concerns in separate component experiments:
86
+
87
+ - `seb/contracts` defines candidate cross-language shapes.
88
+ - `seb/kernel` explores append, chain, offset, and segment interfaces.
89
+ - `seb/runtime` explores OTP supervision and per-agent coordination.
90
+ - `seb/reasoning` records reasoning-oriented A2A events and trace timelines.
91
+ - `seb/universe` indexes artifacts and models promotion gates.
92
+ - `seb/human_touch` models review and approval objects.
93
+ - `seb/verification/lean4` models selected invariants.
94
+ - `seb/adapters` documents legacy platform integration.
95
+
96
+ There is currently no executable that joins every box into one request path.
97
+ The canonical wire encoding, signature input, key authority, persistence
98
+ contract, and failure semantics must be unified before components can be
99
+ treated as one system.
100
+
101
+ ## Evaluate the code
102
+
103
+ ### Prerequisite
104
+
105
+ Install a Rust toolchain with Cargo. The repository has no root Cargo workspace,
106
+ so invoke each crate through its manifest.
107
+
108
+ ```bash
109
+ git clone https://github.com/SNAPKITTYWEST/Sovereign-Event-Bus.git
110
+ cd Sovereign-Event-Bus
111
+
112
+ cargo test --manifest-path seb/reasoning/Cargo.toml --lib
113
+ cargo test --manifest-path seb/universe/Cargo.toml --lib
114
+ ```
115
+
116
+ Expected baseline:
117
+
118
+ ```text
119
+ seb/reasoning: 18 library tests pass
120
+ seb/universe: 15 library tests pass
121
+ ```
122
+
123
+ Cargo will create local `target/` directories and may create crate-level lock
124
+ files. Build outputs are ignored by Git.
125
+
126
+ Do not use a successful library-only run to infer that examples or all targets
127
+ pass. These broader commands currently expose known integration failures:
128
+
129
+ ```bash
130
+ cargo test --manifest-path seb/reasoning/Cargo.toml --all-targets --all-features
131
+ cargo test --manifest-path seb/universe/Cargo.toml --all-targets
132
+ cargo test --manifest-path seb/human_touch/Cargo.toml
133
+ ```
134
+
135
+ The failures and ownership boundaries are cataloged in the
136
+ [developer guide](docs/DEVELOPER_GUIDE.md).
137
+
138
+ ### Additional toolchains
139
+
140
+ Install only what is needed for the component being evaluated.
141
+
142
+ | Area | Required environment |
143
+ | --- | --- |
144
+ | Erlang runtime | Erlang/OTP and `rebar3` |
145
+ | Lean models | `elan`/Lean and `lake`; the project pins Lean and mathlib 4.7.0 |
146
+ | Ada kernel | GNAT/SPARK tooling, Erlang NIF headers, and the intended native crypto dependencies |
147
+ | Code generation | Bash, GNU Make, and Python 3; optional TypeScript and YAML validators |
148
+ | RPG adapter | IBM i with ILE RPG and DB2 objects described in the adapter guide |
149
+ | PL/I contract | z/OS Enterprise PL/I and site-specific JCL/link configuration |
150
+
151
+ Windows users should run shell tooling in a real Bash environment such as
152
+ Git Bash, MSYS2, or WSL. The scripts assume several GNU utilities and are not
153
+ PowerShell-native.
154
+
155
+ ## Repository map
156
+
157
+ ```text
158
+ .
159
+ |-- bob-shell/ Development command wrappers
160
+ |-- docs/
161
+ | |-- DEVELOPER_GUIDE.md Build, test, and contribution workflows
162
+ | |-- PRODUCTION_HARDENING.md Readiness gates and operational criteria
163
+ | `-- assets/ Repository visuals
164
+ |-- seb/
165
+ | |-- adapters/ RPG, copybook, and PL/I integration assets
166
+ | |-- contracts/ Cross-language source templates
167
+ | |-- human_touch/ Human-review Rust prototype
168
+ | |-- kernel/ Ada kernel and C Erlang NIF prototype
169
+ | |-- reasoning/ Rust reasoning and trace library
170
+ | |-- runtime/ Erlang/OTP runtime prototype
171
+ | |-- scripts/codegen/ Template expansion scripts
172
+ | |-- universe/ Rust artifact-universe library
173
+ | `-- verification/lean4/ Lean models and proof sources
174
+ |-- BOB_OPERATIONAL_CONTRACT.md
175
+ |-- BOB_TRUST_DEED_V1.md
176
+ `-- LICENSE
177
+ ```
178
+
179
+ Layer numbers in historical documents are not fully consistent. This README
180
+ uses component names as the stable identifiers. References to an L0 master
181
+ specification or Idris implementation point to work that is not present in this
182
+ repository.
183
+
184
+ ## Working with the components
185
+
186
+ ### Reasoning
187
+
188
+ The reasoning crate exposes A2A event types, trace records, streaming support,
189
+ and integration structures from
190
+ [`seb/reasoning/src/lib.rs`](seb/reasoning/src/lib.rs).
191
+
192
+ ```bash
193
+ cargo build --manifest-path seb/reasoning/Cargo.toml
194
+ cargo test --manifest-path seb/reasoning/Cargo.toml --lib
195
+ ```
196
+
197
+ Trace storage and event streaming are process-memory structures. The current
198
+ signature field is not an Ed25519 implementation and must not be used as
199
+ authentication evidence.
200
+
201
+ ### Universe
202
+
203
+ The universe crate exposes artifact manifests, an in-memory repository index,
204
+ and a model of compile-verify-merge gates from
205
+ [`seb/universe/src/lib.rs`](seb/universe/src/lib.rs).
206
+
207
+ ```bash
208
+ cargo build --manifest-path seb/universe/Cargo.toml
209
+ cargo test --manifest-path seb/universe/Cargo.toml --lib
210
+ ```
211
+
212
+ Gate steps currently validate metadata and simulated outcomes; they do not run
213
+ compilers, proof checkers, review services, or deployment systems.
214
+
215
+ ### Erlang runtime
216
+
217
+ The intended local workflow is:
218
+
219
+ ```bash
220
+ cd seb/runtime
221
+ rebar3 compile
222
+ rebar3 eunit
223
+ rebar3 dialyzer
224
+ ```
225
+
226
+ These commands are targets to restore, not a passing baseline. The current
227
+ source has compile issues, the test functions are not discovered by EUnit, and
228
+ the Erlang facade does not load or match the C NIF interface.
229
+
230
+ ### Lean verification
231
+
232
+ ```bash
233
+ cd seb/verification/lean4
234
+ lake build
235
+ ```
236
+
237
+ The project pins Lean 4.7.0 and mathlib 4.7.0. The default proof target
238
+ currently fails type checking, and several proof sources contain `sorry`.
239
+ Treat all proof certificates in the tree as historical development artifacts
240
+ until CI builds the declared theorem set with a zero-placeholder policy.
241
+
242
+ ### Kernel and adapters
243
+
244
+ The Ada/C kernel and IBM adapter sources do not have a portable, tested build
245
+ entry point. Start with:
246
+
247
+ - [`seb/kernel/src/seb_kernel.ads`](seb/kernel/src/seb_kernel.ads) for the
248
+ intended kernel API.
249
+ - [`seb/kernel/c/seb_kernel_nif.c`](seb/kernel/c/seb_kernel_nif.c) for the C NIF
250
+ registry.
251
+ - [`seb/adapters/L4_ADAPTER_BUILD_GUIDE.md`](seb/adapters/L4_ADAPTER_BUILD_GUIDE.md)
252
+ for target-platform assumptions.
253
+
254
+ Do not infer binary or wire compatibility from matching field names. Current
255
+ Ada, C test-vector, RPG, PL/I, Rust, Python, and TypeScript representations do
256
+ not yet share one validated canonical encoding.
257
+
258
+ ## BOB commands
259
+
260
+ `bob-shell` contains development wrappers for common repository operations.
261
+ Invoke the scripts by filename from a Bash environment:
262
+
263
+ ```bash
264
+ bash bob-shell/bob-build.sh
265
+ bash bob-shell/bob-test.sh
266
+ bash bob-shell/bob-audit.sh
267
+ bash bob-shell/bob-policy.sh
268
+ bash bob-shell/bob-proof.sh
269
+ bash bob-shell/bob-deploy.sh
270
+ ```
271
+
272
+ | Command | Intended use | Important current behavior |
273
+ | --- | --- | --- |
274
+ | `bob-build.sh` | Dispatch component builds | Missing toolchains may be skipped; the report is not proof that every component built |
275
+ | `bob-test.sh` | Dispatch test suites | Deterministic mode sets environment variables but does not establish reproducibility by itself |
276
+ | `bob-audit.sh` | Produce file hashes and audit output | Requires GNU-style utilities; traversal, timestamps, and build files affect output |
277
+ | `bob-policy.sh` | Run a Prolog policy query | May create default governance files and executes a caller-supplied query |
278
+ | `bob-proof.sh` | Dispatch a proof backend | May create placeholder proof files; its generated certificate is not a production attestation |
279
+ | `bob-deploy.sh` | Package build output | Validation and sealing can be disabled; packaging is not deployment authorization |
280
+
281
+ These wrappers are operator conveniences, not a security boundary. Review their
282
+ working-tree mutations and generated reports before using them in automation.
283
+ See [`bob-shell/README.md`](bob-shell/README.md) and the
284
+ [developer guide](docs/DEVELOPER_GUIDE.md) for details.
285
+
286
+ ## Failure modes to design for
287
+
288
+ The production plan treats the following as first-class scenarios:
289
+
290
+ | Scenario | Current behavior or risk |
291
+ | --- | --- |
292
+ | Process crash or restart | Several stores are in memory; recovery and replay are not demonstrated |
293
+ | Duplicate or replayed event | No shared nonce/idempotency store spans the components |
294
+ | Policy engine unavailable | The Erlang bridge can lack a live external process |
295
+ | Key compromise or rotation | No key authority, rotation protocol, revocation path, or historical-key policy is implemented |
296
+ | Partial append | WAL integration, atomic commit, and recovery evidence are incomplete |
297
+ | Partition rebalance | Current logic resets counters rather than transferring assignments |
298
+ | Human decision timeout | Durable queueing, escalation, authorization, and exactly-once commit are incomplete |
299
+ | Malformed or oversized envelope | A canonical encoding and cross-language conformance limits are not enforced |
300
+ | Short or non-ASCII identifiers | Some Rust diagnostic formatting uses fixed byte slices and can panic |
301
+ | Mixed-version deployment | There is no schema negotiation or compatibility matrix |
302
+
303
+ See [Production hardening](docs/PRODUCTION_HARDENING.md) for exit criteria,
304
+ required evidence, threat boundaries, release controls, and edge-case tests.
305
+
306
+ ## Security and assurance
307
+
308
+ Until the hardening gates are complete:
309
+
310
+ - Do not expose SEB directly to untrusted networks.
311
+ - Do not use generated seals or certificates as legal, financial, or compliance
312
+ evidence.
313
+ - Do not process secrets, regulated records, or irreversible production actions.
314
+ - Do not rely on BOB reports as attestations without independently validating
315
+ their inputs and tool exits.
316
+ - Report non-sensitive defects through GitHub issues. Do not publish an
317
+ undisclosed vulnerability before a private reporting channel is established.
318
+
319
+ The project needs an explicit security policy, supported-version policy, and
320
+ private disclosure route before a public production release.
321
+
322
+ ## Development
323
+
324
+ The [developer guide](docs/DEVELOPER_GUIDE.md) covers:
325
+
326
+ - component-specific build and test commands;
327
+ - known failures and expected outputs;
328
+ - contract and wire-format ownership;
329
+ - generated files and cleanup;
330
+ - review requirements for security-sensitive changes; and
331
+ - the evidence required to change a status in this README.
332
+
333
+ Contributions should make the smallest coherent change, include tests at the
334
+ affected boundary, and update status claims only when a repeatable command or
335
+ artifact supports them.
336
+
337
+ ## License
338
+
339
+ The repository is distributed under the
340
+ [Apache License 2.0](LICENSE). Some component metadata contains older license
341
+ labels; resolve those inconsistencies before packaging or redistributing an
342
+ affected component.