Skip to content

Commit 190e4cc

Browse files
committed
fix: publish strict replica schema as 1.3.0
1 parent 35735d7 commit 190e4cc

35 files changed

Lines changed: 1865 additions & 115 deletions

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ Do not treat the product release tag as the schema contract version.
3535
- Current product release for this repository: `Bering v1.0.0`
3636
- Current product git tag / GitHub Release: `v1.0.0`
3737
- Default emitted schema contracts now are:
38-
- `io.mb3r.bering.model@1.2.0`
39-
- `io.mb3r.bering.snapshot@1.2.0`
38+
- `io.mb3r.bering.model@1.3.0`
39+
- `io.mb3r.bering.snapshot@1.3.0`
4040
- Previously published contracts remain valid and immutable:
4141
- `io.mb3r.bering.model@1.0.0`
4242
- `io.mb3r.bering.snapshot@1.0.0`
4343
- `io.mb3r.bering.model@1.1.0`
4444
- `io.mb3r.bering.snapshot@1.1.0`
45-
- Schema publishing tag remains separate: `schema-v1.2.0`
45+
- Schema publishing tag remains separate: `schema-v1.3.0`
4646

47-
`bering validate` accepts preserved `1.0.0` and `1.1.0` artifacts plus the current `1.2.0` artifacts.
47+
`bering validate` accepts preserved `1.0.0`, `1.1.0`, and `1.2.0` artifacts plus the current `1.3.0` artifacts.
4848

4949
## Installation
5050

@@ -91,7 +91,7 @@ go run ./cmd/bering discover \
9191
--discovered-at 2026-03-03T00:00:00Z
9292
```
9393

94-
Expected result: a deterministic `io.mb3r.bering.model@1.2.0` artifact.
94+
Expected result: a deterministic `io.mb3r.bering.model@1.3.0` artifact.
9595

9696
`discover` also writes `out/bering-model.signal-quality.json` next to the model.
9797

@@ -115,7 +115,7 @@ go run ./cmd/bering discover \
115115
--discovered-at 2026-03-03T00:00:00Z
116116
```
117117

118-
Expected result: a model artifact plus an `io.mb3r.bering.snapshot@1.2.0` envelope.
118+
Expected result: a model artifact plus an `io.mb3r.bering.snapshot@1.3.0` envelope.
119119

120120
The snapshot gets its own `out/bering-snapshot.signal-quality.json` sidecar.
121121

@@ -152,24 +152,24 @@ go run ./cmd/sheaft run \
152152
--seed 42
153153
```
154154

155-
For Sheaft `v1.0.0` stochastic-connectivity compatibility, use the canonical fixture checkpoint in [examples/compatibility/sheaft-v1](examples/compatibility/sheaft-v1/README.md). It pins Bering `v1.0.0` / schema line `1.2.0` and includes model and snapshot artifacts with reliability evidence, observed edge metadata, and immediate/eventual endpoint semantic hints.
155+
For Sheaft `v1.0.0` stochastic-connectivity compatibility, use the canonical fixture checkpoint in [examples/compatibility/sheaft-v1](examples/compatibility/sheaft-v1/README.md). It pins Bering `v1.0.0` / schema line `1.3.0` and includes model and snapshot artifacts with reliability evidence, observed edge metadata, and immediate/eventual endpoint semantic hints.
156156

157157
## Published Artifacts
158158

159159
### Core model
160160

161161
- `name`: `io.mb3r.bering.model`
162-
- `version`: `1.2.0`
163-
- `uri`: `https://mb3r-lab.github.io/Bering/schema/model/v1.2.0/model.schema.json`
162+
- `version`: `1.3.0`
163+
- `uri`: `https://mb3r-lab.github.io/Bering/schema/model/v1.3.0/model.schema.json`
164164
- `digest`: `sha256:4fa1a34e64703524cfe2289341fcea79986265db08c0220d6c89e38c0ff76bf8`
165165

166166
This is the stable topology artifact intended for file-based consumers and tools such as Sheaft. It now carries first-class operation-aware edge ids, typed service placement and shared-fate metadata, optional service/placement/edge reliability evidence, typed edge resilience policy, optional observed edge timing summaries, policy scope metadata, richer endpoint fidelity, and endpoint semantic hints.
167167

168168
### Snapshot envelope
169169

170170
- `name`: `io.mb3r.bering.snapshot`
171-
- `version`: `1.2.0`
172-
- `uri`: `https://mb3r-lab.github.io/Bering/schema/snapshot/v1.2.0/snapshot.schema.json`
171+
- `version`: `1.3.0`
172+
- `uri`: `https://mb3r-lab.github.io/Bering/schema/snapshot/v1.3.0/snapshot.schema.json`
173173
- `digest`: `sha256:cb737b0a4038e0bf30a397ca7ba7ff017d684fe3b25e7d8e3ae74ac59b45210b`
174174

175175
This wraps the model with runtime window metadata, ingest counts, coverage, provenance, topology diffs, and discovery-side copies of the same typed placement, reliability, resilience, observed edge, and endpoint metadata.
@@ -188,7 +188,7 @@ Runtime mode also keeps a conservative reconciliation layer for sparse traffic a
188188
- a machine-readable reconciliation report for operators
189189
- an operator-facing reconciliation summary in Markdown
190190

191-
These runtime views do not change the public `io.mb3r.bering.model@1.2.0` or `io.mb3r.bering.snapshot@1.2.0` contracts.
191+
These runtime views do not change the public `io.mb3r.bering.model@1.3.0` or `io.mb3r.bering.snapshot@1.3.0` contracts.
192192

193193
### Population Today
194194

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://mb3r-lab.github.io/Bering/schema/model/v1.3.0/model.schema.json",
4+
"title": "BeringResilienceModel",
5+
"type": "object",
6+
"required": [
7+
"services",
8+
"edges",
9+
"endpoints",
10+
"metadata"
11+
],
12+
"properties": {
13+
"services": {
14+
"type": "array",
15+
"items": { "$ref": "#/$defs/service" }
16+
},
17+
"edges": {
18+
"type": "array",
19+
"items": { "$ref": "#/$defs/edge" }
20+
},
21+
"endpoints": {
22+
"type": "array",
23+
"items": { "$ref": "#/$defs/endpoint" }
24+
},
25+
"metadata": {
26+
"type": "object",
27+
"required": [
28+
"source_type",
29+
"source_ref",
30+
"discovered_at",
31+
"confidence",
32+
"schema"
33+
],
34+
"properties": {
35+
"source_type": { "type": "string" },
36+
"source_ref": { "type": "string" },
37+
"discovered_at": { "type": "string", "format": "date-time" },
38+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
39+
"schema": { "$ref": "#/$defs/schemaRef" }
40+
}
41+
}
42+
},
43+
"$defs": {
44+
"schemaRef": {
45+
"type": "object",
46+
"required": ["name", "version", "uri", "digest"],
47+
"properties": {
48+
"name": { "type": "string" },
49+
"version": { "type": "string" },
50+
"uri": { "type": "string" },
51+
"digest": { "type": "string" }
52+
}
53+
},
54+
"commonMetadata": {
55+
"type": "object",
56+
"properties": {
57+
"labels": {
58+
"type": "object",
59+
"additionalProperties": { "type": "string" }
60+
},
61+
"tags": {
62+
"type": "array",
63+
"items": { "type": "string" }
64+
},
65+
"slo_refs": {
66+
"type": "array",
67+
"items": { "type": "string" }
68+
}
69+
}
70+
},
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+
},
90+
"placement": {
91+
"type": "object",
92+
"required": ["replicas"],
93+
"properties": {
94+
"replicas": { "type": "integer", "minimum": 1 },
95+
"labels": {
96+
"type": "object",
97+
"additionalProperties": { "type": "string" }
98+
},
99+
"reliability": { "$ref": "#/$defs/reliabilityEvidence" }
100+
}
101+
},
102+
"serviceMetadata": {
103+
"allOf": [
104+
{ "$ref": "#/$defs/commonMetadata" },
105+
{
106+
"type": "object",
107+
"properties": {
108+
"reliability": { "$ref": "#/$defs/reliabilityEvidence" },
109+
"failure_eligible": { "type": "boolean" },
110+
"placements": {
111+
"type": "array",
112+
"items": { "$ref": "#/$defs/placement" }
113+
},
114+
"shared_resource_refs": {
115+
"type": "array",
116+
"items": { "type": "string" }
117+
}
118+
}
119+
}
120+
]
121+
},
122+
"edgeMetadata": {
123+
"allOf": [
124+
{ "$ref": "#/$defs/commonMetadata" },
125+
{
126+
"type": "object",
127+
"properties": {
128+
"weight": { "type": "number", "minimum": 0 },
129+
"reliability": { "$ref": "#/$defs/reliabilityEvidence" }
130+
}
131+
}
132+
]
133+
},
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+
},
158+
"endpointMetadata": {
159+
"allOf": [
160+
{ "$ref": "#/$defs/commonMetadata" },
161+
{
162+
"type": "object",
163+
"properties": {
164+
"weight": { "type": "number", "minimum": 0 },
165+
"semantics": { "$ref": "#/$defs/endpointSemantics" }
166+
}
167+
}
168+
]
169+
},
170+
"backoffPolicy": {
171+
"type": "object",
172+
"properties": {
173+
"initial_ms": { "type": "integer", "minimum": 0 },
174+
"max_ms": { "type": "integer", "minimum": 0 },
175+
"multiplier": { "type": "number", "minimum": 0 },
176+
"jitter": { "type": "string" }
177+
}
178+
},
179+
"retryPolicy": {
180+
"type": "object",
181+
"properties": {
182+
"max_attempts": { "type": "integer", "minimum": 0 },
183+
"budget_cap": { "type": "number", "minimum": 0 },
184+
"retry_on": {
185+
"type": "array",
186+
"items": { "type": "string" }
187+
},
188+
"backoff": { "$ref": "#/$defs/backoffPolicy" }
189+
}
190+
},
191+
"circuitBreakerPolicy": {
192+
"type": "object",
193+
"properties": {
194+
"enabled": { "type": "boolean" },
195+
"max_pending_requests": { "type": "integer", "minimum": 0 },
196+
"max_requests": { "type": "integer", "minimum": 0 },
197+
"max_connections": { "type": "integer", "minimum": 0 },
198+
"consecutive_5xx": { "type": "integer", "minimum": 0 },
199+
"interval_ms": { "type": "integer", "minimum": 0 },
200+
"base_ejection_time_ms": { "type": "integer", "minimum": 0 }
201+
}
202+
},
203+
"resiliencePolicy": {
204+
"type": "object",
205+
"properties": {
206+
"request_timeout_ms": { "type": "integer", "minimum": 0 },
207+
"per_try_timeout_ms": { "type": "integer", "minimum": 0 },
208+
"retry": { "$ref": "#/$defs/retryPolicy" },
209+
"circuit_breaker": { "$ref": "#/$defs/circuitBreakerPolicy" }
210+
}
211+
},
212+
"latencySummary": {
213+
"type": "object",
214+
"properties": {
215+
"p50": { "type": "number", "minimum": 0 },
216+
"p90": { "type": "number", "minimum": 0 },
217+
"p95": { "type": "number", "minimum": 0 },
218+
"p99": { "type": "number", "minimum": 0 }
219+
}
220+
},
221+
"observedEdge": {
222+
"type": "object",
223+
"properties": {
224+
"latency_ms": { "$ref": "#/$defs/latencySummary" },
225+
"error_rate": { "type": "number", "minimum": 0, "maximum": 1 }
226+
}
227+
},
228+
"policyScope": {
229+
"type": "object",
230+
"properties": {
231+
"source_endpoint_id": { "type": "string" },
232+
"source_route": { "type": "string" },
233+
"method": { "type": "string" },
234+
"operation": { "type": "string" }
235+
}
236+
},
237+
"service": {
238+
"type": "object",
239+
"required": ["id", "name", "replicas"],
240+
"properties": {
241+
"id": { "type": "string" },
242+
"name": { "type": "string" },
243+
"replicas": { "type": "integer", "minimum": 1 },
244+
"metadata": { "$ref": "#/$defs/serviceMetadata" }
245+
}
246+
},
247+
"edge": {
248+
"type": "object",
249+
"required": ["id", "from", "to", "kind", "blocking"],
250+
"properties": {
251+
"id": { "type": "string" },
252+
"from": { "type": "string" },
253+
"to": { "type": "string" },
254+
"kind": {
255+
"type": "string",
256+
"enum": ["sync", "async"]
257+
},
258+
"blocking": { "type": "boolean" },
259+
"identity": { "$ref": "#/$defs/edgeIdentity" },
260+
"metadata": { "$ref": "#/$defs/edgeMetadata" },
261+
"resilience": { "$ref": "#/$defs/resiliencePolicy" },
262+
"observed": { "$ref": "#/$defs/observedEdge" },
263+
"policy_scope": { "$ref": "#/$defs/policyScope" }
264+
}
265+
},
266+
"endpoint": {
267+
"type": "object",
268+
"required": ["id", "entry_service", "success_predicate_ref"],
269+
"properties": {
270+
"id": { "type": "string" },
271+
"entry_service": { "type": "string" },
272+
"success_predicate_ref": { "type": "string" },
273+
"method": { "type": "string" },
274+
"path": { "type": "string" },
275+
"metadata": { "$ref": "#/$defs/endpointMetadata" }
276+
}
277+
}
278+
}
279+
}

0 commit comments

Comments
 (0)