Intent
Convert the macOS/BearBrowser failure lessons into canonical SourceOS typed contracts so runtime components do not repeat the opaque capability-denial, registry-failure, and diagnostic-storm anti-patterns observed in the uploaded log evidence.
This belongs in sourceos-spec because it is the shared machine-readable contract layer consumed by downstream runtimes.
Evidence-derived failure classes to model
The current log evidence shows these recurring classes:
-
Capability/permission denial loops
- Full Disk Access/TCC-style denial
- sandbox denied service lookup
- locked/pre-unlock key material unavailable
- denied pasteboard, analytics, LaunchServices/CoreServices, RunningBoard, FileProvider, network-settings, and diagnostic access
-
Broken registry / package identity plane
- missing LaunchServices/extension records
- invalid bundle/product identity
- missing receipts
- extension discovery cancellation
- missing namespace descriptors / treatment layers
-
Diagnostic storm behavior
- duplicate denial loops
- retry spam without bounded state
- network telemetry spam with nil device identifiers
- missing causal continuity between the original denial and later degraded/crash behavior
-
Network truth ambiguity
- Wi-Fi/radio active but no connected network
- DNS/DHCP events with nil device identifiers
- no route to host despite apparently satisfied path
- broken pipe and route already exists conditions
-
Browser/runtime child-process failure
- sandboxed WebContent/GPU/Networking helpers fail privileged lookups
- pasteboard setup fails
- LaunchServices/CoreServices and RunningBoard access fail
- DB migration and plugin discovery failures surface as opaque runtime noise
Proposed new schemas
Add a capability-authority contract family under schemas/ with examples and catalog updates.
1. CapabilityContract.json
Purpose: declare what a component requires before runtime.
Required fields:
id: urn:srcos:capability-contract:<slug>
specVersion
componentRef
componentKind: app | daemon | agent | browser-child | terminal-helper | network-observer | file-monitor | extension-host | indexer | broker
declaredCapabilities[]
requiredBrokers[]
minimumBootPhase
degradedModePolicy
userVisibleImpact
evidenceRefs[]
2. CapabilityGrantState.json
Purpose: capture observed runtime state of each declared capability.
Required fields:
id: urn:srcos:capability-grant-state:<slug>
contractRef
observedAt
bootId
sessionId
permissionEpoch
capabilityStates[]
Each capability state should include:
capability
requestedOperation
subjectRef
objectRef
grantSource: policy | user-consent | broker | ambient-host | kernel | portal | inherited | unavailable
decision: granted | denied | ask | degraded | unavailable | unknown
policyRuleRef
fallback
userVisibleImpact
remediationHint
3. DiagnosticStormRecord.json
Purpose: normalize repeated logs into bounded evidence.
Required fields:
id: urn:srcos:diagnostic-storm:<slug>
firstSeen
lastSeen
repeatCount
signature
severity
sourceComponent
normalizedFailureClass
sampleEvents[]
suppressionPolicy
terminalState
linkedIncidentRef
4. NetworkTruthState.json
Purpose: replace boolean online/offline status with explicit layered network truth.
Required fields:
id: urn:srcos:network-truth:<slug>
observedAt
networkEpoch
radioState
associationState
authenticationState
dhcpState
dnsState
routeState
captivePortalState
internetReachability
localMeshReachability
vpnOrPrivacyOverlayState
trustedPeerPathState
evidenceRefs[]
5. RuntimeRegistryIntegrityRecord.json
Purpose: make the hidden desktop registry/package identity plane auditable.
Required fields:
id: urn:srcos:runtime-registry-integrity:<slug>
componentRef
bundleOrPackageIdentity
receiptState
extensionRecords[]
brokerRecords[]
manifestDigest
verificationVerdict: valid | degraded | missing | invalid | quarantined
remediationHint
6. BootSessionPhaseState.json
Purpose: prevent services from running before the required boot/session phase.
Required fields:
id: urn:srcos:boot-session-phase:<slug>
bootId
sessionId
phase: sealed-boot | pre-login | post-login-locked | unlocked-user-session | degraded-session | recovery-session
availableKeyrings[]
availablePortals[]
blockedComponents[]
allowedComponents[]
evidenceRefs[]
Acceptance tests
- Examples validate under JSON Schema draft 2020-12.
schemas/README.md catalog includes the new family and URN prefixes.
- A denied capability can be represented without ambiguity.
- A repeated denial storm can be summarized without losing first/last/repeat count.
- A browser child-process denied pasteboard/LaunchServices access can be represented with broker fallback.
- A network state can distinguish radio-active/no-route/no-DNS/no-internet/local-mesh-only states.
- A pre-unlock service attempt can be rejected as phase-ineligible with a user-readable remediation hint.
- Runtime identity failures can distinguish missing receipt, invalid manifest, missing extension record, and quarantined plugin.
Downstream consumers
SourceOS-Linux/sourceos-shell: runtime doctor and shell diagnostics.
SocioProphet/meshrush: network truth and graph-traversal capability evidence.
- BearBrowser/TurtleTerm surfaces when they land in their final runtime home.
SocioProphet/prophet-platform: evidence receipts, FogStack readiness, office/browser diagnostics.
Initial implementation slice
- Add the six schemas.
- Add one example per schema.
- Update
schemas/README.md.
- Add a minimal validator/checker if this repo already has validation tooling.
- Do not overfit to macOS names; preserve generic SourceOS contract semantics and allow platform-specific mappings through evidence refs and adapters.
Intent
Convert the macOS/BearBrowser failure lessons into canonical SourceOS typed contracts so runtime components do not repeat the opaque capability-denial, registry-failure, and diagnostic-storm anti-patterns observed in the uploaded log evidence.
This belongs in
sourceos-specbecause it is the shared machine-readable contract layer consumed by downstream runtimes.Evidence-derived failure classes to model
The current log evidence shows these recurring classes:
Capability/permission denial loops
Broken registry / package identity plane
Diagnostic storm behavior
Network truth ambiguity
Browser/runtime child-process failure
Proposed new schemas
Add a
capability-authoritycontract family underschemas/with examples and catalog updates.1. CapabilityContract.json
Purpose: declare what a component requires before runtime.
Required fields:
id:urn:srcos:capability-contract:<slug>specVersioncomponentRefcomponentKind:app | daemon | agent | browser-child | terminal-helper | network-observer | file-monitor | extension-host | indexer | brokerdeclaredCapabilities[]requiredBrokers[]minimumBootPhasedegradedModePolicyuserVisibleImpactevidenceRefs[]2. CapabilityGrantState.json
Purpose: capture observed runtime state of each declared capability.
Required fields:
id:urn:srcos:capability-grant-state:<slug>contractRefobservedAtbootIdsessionIdpermissionEpochcapabilityStates[]Each capability state should include:
capabilityrequestedOperationsubjectRefobjectRefgrantSource:policy | user-consent | broker | ambient-host | kernel | portal | inherited | unavailabledecision:granted | denied | ask | degraded | unavailable | unknownpolicyRuleReffallbackuserVisibleImpactremediationHint3. DiagnosticStormRecord.json
Purpose: normalize repeated logs into bounded evidence.
Required fields:
id:urn:srcos:diagnostic-storm:<slug>firstSeenlastSeenrepeatCountsignatureseveritysourceComponentnormalizedFailureClasssampleEvents[]suppressionPolicyterminalStatelinkedIncidentRef4. NetworkTruthState.json
Purpose: replace boolean online/offline status with explicit layered network truth.
Required fields:
id:urn:srcos:network-truth:<slug>observedAtnetworkEpochradioStateassociationStateauthenticationStatedhcpStatednsStaterouteStatecaptivePortalStateinternetReachabilitylocalMeshReachabilityvpnOrPrivacyOverlayStatetrustedPeerPathStateevidenceRefs[]5. RuntimeRegistryIntegrityRecord.json
Purpose: make the hidden desktop registry/package identity plane auditable.
Required fields:
id:urn:srcos:runtime-registry-integrity:<slug>componentRefbundleOrPackageIdentityreceiptStateextensionRecords[]brokerRecords[]manifestDigestverificationVerdict:valid | degraded | missing | invalid | quarantinedremediationHint6. BootSessionPhaseState.json
Purpose: prevent services from running before the required boot/session phase.
Required fields:
id:urn:srcos:boot-session-phase:<slug>bootIdsessionIdphase:sealed-boot | pre-login | post-login-locked | unlocked-user-session | degraded-session | recovery-sessionavailableKeyrings[]availablePortals[]blockedComponents[]allowedComponents[]evidenceRefs[]Acceptance tests
schemas/README.mdcatalog includes the new family and URN prefixes.Downstream consumers
SourceOS-Linux/sourceos-shell: runtime doctor and shell diagnostics.SocioProphet/meshrush: network truth and graph-traversal capability evidence.SocioProphet/prophet-platform: evidence receipts, FogStack readiness, office/browser diagnostics.Initial implementation slice
schemas/README.md.