Skip to content

Commit a502095

Browse files
committed
feat: implement v1 stochastic connectivity analysis
1 parent d76d6fc commit a502095

47 files changed

Lines changed: 3413 additions & 141 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- added v1 major semantics documentation for the stochastic connectivity baseline, migration notes, and explicit out-of-scope release boundaries
6+
- added release dry-run validation for v1 docs/schema/example consistency
57
- recorded app-level sync with the published Bering `v0.3.4` release/package in `compatibility-manifest.json`
68
- refreshed compatibility docs and README badges to distinguish Bering app-package sync from unchanged `1.0.0` / `1.1.0` schema contract pins
79

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ endif
3131
DIST_DIR ?= dist
3232
PLATFORMS ?= linux/amd64,linux/arm64
3333
BENCHMARK_OUT_DIR ?= .tmp/benchmark-slice
34+
ORACLE_OUT_DIR ?= .tmp/oracle-suite
3435

35-
.PHONY: help build test lint smoke-examples benchmark-slice docker-build docker-run-sample sample compatibility-manifest validate-compatibility-manifest validate-chart default-config-pack release-tools release-build image-dry-run image-local chart-package chart-publish-local release-manifest validate-release-manifest validate-release-assets release-dry-run release-local clean clean-dist
36+
.PHONY: help build test lint smoke-examples benchmark-slice oracle-suite docker-build docker-run-sample sample compatibility-manifest validate-compatibility-manifest validate-v1-release-docs validate-chart default-config-pack release-tools release-build image-dry-run image-local chart-package chart-publish-local release-manifest validate-release-manifest validate-release-assets release-dry-run release-local clean clean-dist
3637

3738
ifeq ($(OS),Windows_NT)
3839
define MKDIR_P
@@ -59,9 +60,11 @@ help:
5960
@echo " lint Run go vet"
6061
@echo " smoke-examples Build the CLI and smoke checked-in examples"
6162
@echo " benchmark-slice Run the fixed Sheaft-on-Bering benchmark slice"
63+
@echo " oracle-suite Run synthetic stochastic-connectivity oracle suite"
6264
@echo " docker-build Build the local container image"
6365
@echo " docker-run-sample Run sample pipeline in the container image"
6466
@echo " compatibility-manifest Generate compatibility-manifest.json from strict contract pins"
67+
@echo " validate-v1-release-docs Validate v1 docs/schema/example consistency"
6568
@echo " chart-package Lint and package charts/sheaft into dist/charts"
6669
@echo " release-build Produce binaries, archives, checksums, SBOM, and source archive with GoReleaser"
6770
@echo " release-manifest Generate release-manifest.json from dist metadata"
@@ -90,6 +93,9 @@ endif
9093
benchmark-slice:
9194
go run ./cmd/releasectl benchmark-slice --manifest benchmarks/fixed-slice/manifest.json --out-dir $(BENCHMARK_OUT_DIR)
9295

96+
oracle-suite:
97+
go run ./cmd/releasectl oracle-suite --out-dir $(ORACLE_OUT_DIR)
98+
9399
docker-build:
94100
docker build -f build/Dockerfile -t $(IMAGE) .
95101

@@ -105,6 +111,9 @@ compatibility-manifest:
105111
validate-compatibility-manifest:
106112
go run ./cmd/releasectl validate-compatibility-manifest --manifest compatibility-manifest.json
107113

114+
validate-v1-release-docs:
115+
go run ./cmd/releasectl validate-v1-release-docs --root .
116+
108117
validate-chart:
109118
go run ./cmd/releasectl validate-chart --chart-dir charts/sheaft
110119

@@ -159,9 +168,9 @@ release-manifest:
159168
validate-release-manifest:
160169
go run ./cmd/releasectl validate-release-manifest --manifest release-manifest.json
161170

162-
validate-release-assets: validate-compatibility-manifest validate-chart validate-release-manifest
171+
validate-release-assets: validate-compatibility-manifest validate-v1-release-docs validate-chart validate-release-manifest
163172

164-
release-dry-run: compatibility-manifest test smoke-examples benchmark-slice release-build default-config-pack image-dry-run chart-package release-manifest validate-release-assets
173+
release-dry-run: compatibility-manifest validate-v1-release-docs test smoke-examples oracle-suite benchmark-slice release-build default-config-pack image-dry-run chart-package release-manifest validate-release-assets
165174

166175
release-local: compatibility-manifest test smoke-examples release-build
167176
ifeq ($(OS),Windows_NT)

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ Unknown or mismatched contracts are rejected. There is no silent fallback for un
6666

6767
The current `main` line has also been app-level synced against the published Bering `v0.3.4` release/package. That sync does not change the accepted Bering schema contract pins.
6868

69+
The planned v1 major release claim is documented in [docs/v1-major-semantics.md](docs/v1-major-semantics.md): product-baseline `P_Node * P_Edge` stochastic connectivity over Bering topology `G`, replication map `R`, and endpoint predicates `Phi`, with explicit boundaries for what remains future work.
70+
6971
## Installation
7072

7173
Preferred path for the current technical preview release:
@@ -186,7 +188,7 @@ Sheaft is intentionally downstream of Bering artifacts and schemas.
186188
## Known limitations
187189

188190
- `1.1.0` analysis is only as rich as the artifact metadata. Missing retry, timeout, latency, placement, or shared-resource metadata is reported as unavailable rather than guessed.
189-
- Legacy explicit predicates remain service-based even when `1.1.0` edge metadata is present. Edge faults and partial degradations affect journey-based analysis and diagnostics, not old explicit predicate semantics.
191+
- Legacy explicit predicates remain service-based even when `1.1.0` edge metadata is present. Edge faults and partial degradations affect journey-based analysis, diagnostics, and explicit `edge_aware` predicates, not old service predicate semantics.
190192
- This release does not introduce or stabilize an upstream discovery pipeline. Discovery remains upstream; the local `discover` helper is experimental only.
191193
- `serve` and its watch loop are suitable for technical-preview evaluation, not yet for a stable long-term operational contract.
192194
- The richer analysis surface is available, but its configuration ergonomics and operational conventions may still change in later `0.x` releases.
@@ -202,6 +204,7 @@ make build
202204
make test
203205
make lint
204206
make smoke-examples
207+
make oracle-suite
205208
make benchmark-slice
206209
```
207210

@@ -218,12 +221,14 @@ go vet ./...
218221
- [Install](docs/install.md)
219222
- [Compatibility](docs/compatibility.md)
220223
- [Compatibility Matrix](docs/compatibility-matrix.md)
224+
- [V1 Major Semantics](docs/v1-major-semantics.md)
221225
- [Release Assets](docs/release-assets.md)
222226
- [Architecture](docs/architecture.md)
223227
- [Methodology](docs/methodology.md)
224228
- [Configuration and Schemas](docs/configuration.md)
225229
- [CI Gate](docs/ci-gate.md)
226230
- [Fixed Benchmark Slice](docs/benchmark-slice.md)
231+
- [Synthetic Oracle Suite](docs/oracle-suite.md)
227232
- [Consumer Semantics v1](docs/consumer-semantics-v1.md)
228233
- [Consumer Semantics v2](docs/consumer-semantics-v2.md)
229234
- [Versioning](VERSIONING.md)

RELEASING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ Dry-run validation:
5757
make release-dry-run APP_VERSION=0.0.0-dev
5858
```
5959

60+
For the v1 major line, dry-run validation also includes `validate-v1-release-docs`. That check keeps the v1 semantics documentation, schema pins, compatibility matrix, and checked-in examples aligned.
61+
62+
V1 release notes must link to [docs/v1-major-semantics.md](docs/v1-major-semantics.md) and must avoid claims about automatic probability calibration, arbitrary non-product `P`, live chaos execution, or rich temporal workflow models unless those features have separate shipped evidence.
63+
6064
`release-dry-run` includes the checked-in example smoke path. You can still run it separately when you only want to validate the first-run surface:
6165

6266
```bash

api/schema/analysis.schema.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
"minimum": 0,
3434
"maximum": 1
3535
},
36+
"reliability": {
37+
"$ref": "#/$defs/reliability"
38+
},
3639
"fixed_k_failures": {
3740
"type": "integer",
3841
"minimum": 0
@@ -96,6 +99,9 @@
9699
"minimum": 0,
97100
"maximum": 1
98101
},
102+
"reliability": {
103+
"$ref": "#/$defs/reliability"
104+
},
99105
"fixed_k_failures": {
100106
"type": "integer",
101107
"minimum": 0
@@ -176,5 +182,38 @@
176182
}
177183
}
178184
}
185+
},
186+
"$defs": {
187+
"reliability": {
188+
"type": "object",
189+
"properties": {
190+
"node_live_probability": {
191+
"type": "number",
192+
"minimum": 0,
193+
"maximum": 1
194+
},
195+
"edge_live_probability": {
196+
"type": "number",
197+
"minimum": 0,
198+
"maximum": 1
199+
},
200+
"services": {
201+
"type": "object",
202+
"additionalProperties": {
203+
"type": "number",
204+
"minimum": 0,
205+
"maximum": 1
206+
}
207+
},
208+
"edges": {
209+
"type": "object",
210+
"additionalProperties": {
211+
"type": "number",
212+
"minimum": 0,
213+
"maximum": 1
214+
}
215+
}
216+
}
217+
}
179218
}
180219
}

api/schema/model.v1.1.0.schema.json

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,25 @@
6868
}
6969
}
7070
},
71+
"edgeIdentity": {
72+
"type": "object",
73+
"properties": {
74+
"protocol": { "type": "string" },
75+
"operation": { "type": "string" },
76+
"route": { "type": "string" },
77+
"topic": { "type": "string" },
78+
"span_kind": { "type": "string" }
79+
}
80+
},
81+
"reliabilityEvidence": {
82+
"type": "object",
83+
"required": ["live_probability"],
84+
"properties": {
85+
"live_probability": { "type": "number", "minimum": 0, "maximum": 1 },
86+
"source": { "type": "string" },
87+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 }
88+
}
89+
},
7190
"placement": {
7291
"type": "object",
7392
"required": ["replicas"],
@@ -76,7 +95,8 @@
7695
"labels": {
7796
"type": "object",
7897
"additionalProperties": { "type": "string" }
79-
}
98+
},
99+
"reliability": { "$ref": "#/$defs/reliabilityEvidence" }
80100
}
81101
},
82102
"serviceMetadata": {
@@ -85,6 +105,7 @@
85105
{
86106
"type": "object",
87107
"properties": {
108+
"reliability": { "$ref": "#/$defs/reliabilityEvidence" },
88109
"failure_eligible": { "type": "boolean" },
89110
"placements": {
90111
"type": "array",
@@ -104,18 +125,44 @@
104125
{
105126
"type": "object",
106127
"properties": {
107-
"weight": { "type": "number", "minimum": 0 }
128+
"weight": { "type": "number", "minimum": 0 },
129+
"reliability": { "$ref": "#/$defs/reliabilityEvidence" }
108130
}
109131
}
110132
]
111133
},
134+
"endpointSemantics": {
135+
"type": "object",
136+
"properties": {
137+
"predicate_mode": {
138+
"type": "string",
139+
"enum": ["immediate_response", "eventual_completion", "external_predicate"]
140+
},
141+
"mandatory_targets": {
142+
"type": "array",
143+
"items": { "type": "string" },
144+
"uniqueItems": true
145+
},
146+
"dependency_modes": {
147+
"type": "array",
148+
"items": {
149+
"type": "string",
150+
"enum": ["sync", "async"]
151+
},
152+
"uniqueItems": true
153+
},
154+
"source": { "type": "string" },
155+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 }
156+
}
157+
},
112158
"endpointMetadata": {
113159
"allOf": [
114160
{ "$ref": "#/$defs/commonMetadata" },
115161
{
116162
"type": "object",
117163
"properties": {
118-
"weight": { "type": "number", "minimum": 0 }
164+
"weight": { "type": "number", "minimum": 0 },
165+
"semantics": { "$ref": "#/$defs/endpointSemantics" }
119166
}
120167
}
121168
]
@@ -209,6 +256,7 @@
209256
"enum": ["sync", "async"]
210257
},
211258
"blocking": { "type": "boolean" },
259+
"identity": { "$ref": "#/$defs/edgeIdentity" },
212260
"metadata": { "$ref": "#/$defs/edgeMetadata" },
213261
"resilience": { "$ref": "#/$defs/resiliencePolicy" },
214262
"observed": { "$ref": "#/$defs/observedEdge" },
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://github.com/MB3R-Lab/Sheaft/api/schema/oracle-report.schema.json",
4+
"title": "SheaftOracleSuiteReport",
5+
"type": "object",
6+
"required": [
7+
"schema_version",
8+
"suite_name",
9+
"status",
10+
"generated_at",
11+
"outputs",
12+
"cases"
13+
],
14+
"properties": {
15+
"schema_version": {
16+
"type": "string"
17+
},
18+
"suite_name": {
19+
"type": "string"
20+
},
21+
"status": {
22+
"type": "string",
23+
"enum": ["pass", "fail"]
24+
},
25+
"generated_at": {
26+
"type": "string"
27+
},
28+
"outputs": {
29+
"type": "object",
30+
"required": ["report", "summary"],
31+
"properties": {
32+
"report": { "type": "string" },
33+
"summary": { "type": "string" }
34+
}
35+
},
36+
"cases": {
37+
"type": "array",
38+
"items": {
39+
"type": "object",
40+
"required": ["id", "description", "status", "trials", "checks"],
41+
"properties": {
42+
"id": { "type": "string" },
43+
"description": { "type": "string" },
44+
"status": {
45+
"type": "string",
46+
"enum": ["pass", "fail"]
47+
},
48+
"trials": { "type": "integer" },
49+
"error": { "type": "string" },
50+
"checks": {
51+
"type": "array",
52+
"items": {
53+
"type": "object",
54+
"required": ["id", "status", "expected", "actual", "tolerance", "message"],
55+
"properties": {
56+
"id": { "type": "string" },
57+
"status": {
58+
"type": "string",
59+
"enum": ["pass", "fail"]
60+
},
61+
"expected": { "type": "number" },
62+
"actual": { "type": "number" },
63+
"tolerance": { "type": "number" },
64+
"message": { "type": "string" }
65+
}
66+
}
67+
}
68+
}
69+
}
70+
}
71+
}
72+
}

0 commit comments

Comments
 (0)