Skip to content

Commit 6620697

Browse files
committed
Expand runtime causality contract documentation
1 parent 1f16138 commit 6620697

1 file changed

Lines changed: 44 additions & 11 deletions

File tree

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Runtime Causality Contracts v0
22

3-
This additive contract slice introduces first-pass runtime-causality records derived from ordered diagnostic evidence. The goal is to collapse opaque operating-system log storms into typed, bounded, user-explainable evidence objects.
3+
This additive contract slice introduces runtime-causality records derived from ordered diagnostic evidence. The goal is to collapse opaque operating-system log storms into typed, bounded, user-explainable evidence objects.
4+
5+
The slice now covers both first-pass runtime signals and second-pass causality envelopes: retry loops, security verdict availability, layered network truth, browser launch transactions, runtime identity graphs, desktop-service broker state, maintenance epochs, registry integrity, boot/session phase gates, and diagnostic-storm summaries.
46

57
## Added schemas
68

@@ -10,6 +12,12 @@ This additive contract slice introduces first-pass runtime-causality records der
1012
| `schemas/SecurityVerdictState.json` | `SecurityVerdictState` | `urn:srcos:security-verdict:` | Represent security decision availability, including degraded states such as no verdict provider, invalid provider, unavailable policy, or insufficient evidence. |
1113
| `schemas/NetworkTruthState.json` | `NetworkTruthState` | `urn:srcos:network-truth:` | Preserve layered connectivity truth instead of reducing network state to online/offline. |
1214
| `schemas/BrowserLaunchTransaction.json` | `BrowserLaunchTransaction` | `urn:srcos:browser-launch-transaction:` | Model browser launch as a preflight transaction before WebContent/GPU/Networking child processes are allowed to spawn. |
15+
| `schemas/RuntimeIdentityGraph.json` | `RuntimeIdentityGraph` | `urn:srcos:runtime-identity-graph:` | Connect app, helper, broker, package, executable, audit-token, profile, and session identity observations. |
16+
| `schemas/DesktopServiceBrokerState.json` | `DesktopServiceBrokerState` | `urn:srcos:desktop-service-broker-state:` | Represent broker availability for pasteboard, launcher, core-services, file-provider, notification, extension-registry, intents, network-settings, credential, and URL-opening surfaces. |
17+
| `schemas/MaintenanceEpoch.json` | `MaintenanceEpoch` | `urn:srcos:maintenance-epoch:` | Bound cleanup, cache-delete, indexing, backup, plugin-scan, cloud-purge, experiment-refresh, and registry-sweep maintenance work. |
18+
| `schemas/RuntimeRegistryIntegrityRecord.json` | `RuntimeRegistryIntegrityRecord` | `urn:srcos:runtime-registry-integrity:` | Describe package receipt, extension record, broker record, manifest, launch-record, profile, and namespace-descriptor integrity. |
19+
| `schemas/BootSessionPhaseState.json` | `BootSessionPhaseState` | `urn:srcos:boot-session-phase:` | Gate services by sealed boot, pre-login, post-login locked, unlocked user session, degraded session, or recovery session. |
20+
| `schemas/DiagnosticStormRecord.json` | `DiagnosticStormRecord` | `urn:srcos:diagnostic-storm:` | Summarize repeated diagnostic signatures with count, cadence, severity, representative samples, suppression policy, and terminal state. |
1321

1422
## Added examples
1523

@@ -19,6 +27,12 @@ This additive contract slice introduces first-pass runtime-causality records der
1927
| `examples/security_verdict_state.json` | Network-flow observation where the verdict provider is unavailable. |
2028
| `examples/network_truth_state.json` | Wi-Fi radio active but no association, failed route, and degraded DNS/DHCP observers. |
2129
| `examples/browser_launch_transaction.json` | Browser launch prevented before child-process spawn because broker and extension-registry preflight failed. |
30+
| `examples/runtime_identity_graph.json` | BearBrowser app and WebContent child process identity resolved as a degraded runtime graph. |
31+
| `examples/desktop_service_broker_state.json` | Pasteboard, CoreServices, and extension-registry brokers degraded for browser child-process launch. |
32+
| `examples/maintenance_epoch.json` | deleted/triald registry and experiment sweep bounded as a degraded maintenance epoch. |
33+
| `examples/runtime_registry_integrity_record.json` | LaunchServices extension-record and treatment namespace-descriptor failures captured as registry-integrity evidence. |
34+
| `examples/boot_session_phase_state.json` | post-login locked session blocks analytics and registry-cleanup components until unlock. |
35+
| `examples/diagnostic_storm_record.json` | triald missing-namespace descriptor storm summarized with count, cadence, and suppression policy. |
2236

2337
## Design intent
2438

@@ -30,17 +44,36 @@ The records are designed to support SourceOS doctor flows, browser diagnostics,
3044
- Security monitors that see flows but cannot attach verdicts.
3145
- Network path ambiguity where radio, route, DNS, DHCP, captive portal, and internet reachability disagree.
3246
- Browser child-process launch failures caused by missing desktop brokers, invalid registries, or denied service lookups.
33-
- Diagnostic storms that need first-seen, last-seen, count, cadence, and user-readable remediation.
47+
- Runtime identity ambiguity across app, child process, helper, audit-token, and package boundaries.
48+
- Background maintenance storms caused by cleanup, registry, experiment, backup, cloud purge, or plugin-scan activity.
49+
- Registry integrity failures involving missing extension records, package receipts, broker records, and namespace descriptors.
50+
- Boot/session phase failures where locked state prevents keyring, analytics, registry, or user-store access.
51+
- Diagnostic storms that need first-seen, last-seen, count, cadence, sample events, suppression policy, terminal state, and remediation.
52+
53+
## Downstream consumers
54+
55+
- SourceOS doctor and workstation health reports.
56+
- BearBrowser launch preflight and child-process attestation.
57+
- TurtleTerm terminal helper preflight and broker checks.
58+
- MeshRush/Meshrush network-truth and peer-path evaluation.
59+
- Prophet Platform evidence receipts and FogStack runtime readiness checks.
60+
- Sociosphere estate-control observability where runtime state must be summarized without losing causality.
61+
62+
## Implementation notes
63+
64+
These schemas are additive. They do not replace `TelemetryEvent`, `PolicyDecision`, `ExecutionDecision`, or `RunRecord`; instead, they summarize and relate those lower-level observations into user-readable runtime-causality records.
3465

35-
## Follow-up contract families
66+
The minimum viable runtime flow is:
3667

37-
The next additive slice should add:
68+
1. Capture raw telemetry.
69+
2. Normalize repeated signatures into `RetryLoopFingerprint` and `DiagnosticStormRecord`.
70+
3. Attach contextual truth with `NetworkTruthState`, `SecurityVerdictState`, `BootSessionPhaseState`, and `RuntimeRegistryIntegrityRecord`.
71+
4. Gate app launches through `RuntimeIdentityGraph`, `DesktopServiceBrokerState`, and `BrowserLaunchTransaction`.
72+
5. Bound cleanup/indexing/config refresh through `MaintenanceEpoch`.
3873

39-
- `RuntimeIdentityGraph`
40-
- `DesktopServiceBrokerState`
41-
- `MaintenanceEpoch`
42-
- `RuntimeRegistryIntegrityRecord`
43-
- `BootSessionPhaseState`
44-
- `DiagnosticStormRecord`
74+
## Follow-up work
4575

46-
Those are intentionally deferred so this first PR remains focused and reviewable.
76+
- Add central `schemas/README.md` catalog rows for these ten types.
77+
- Add validation automation that maps schema titles to snake_case examples.
78+
- Add an example storm-log parser that emits these records from ordered logs.
79+
- Wire SourceOS shell, BearBrowser, TurtleTerm, and MeshRush consumers to these contracts.

0 commit comments

Comments
 (0)