Spaces:
Sleeping
Sleeping
Add service-graph diagram + task table to blog
Browse files
BLOG.md
CHANGED
|
@@ -103,20 +103,41 @@ An OpenEnv environment with three phases that mirror what a senior platform engi
|
|
| 103 |
2. **Trace** β identify which downstream consumers break (the "blast radius")
|
| 104 |
3. **Fix & verify** β propose a backward-compatible migration and validate it against every consumer's spec
|
| 105 |
|
| 106 |
-
Each episode places the agent inside a simulated enterprise (3β5 microservices, each owning an OpenAPI spec, each declaring which fields it consumes from upstream)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
Then the agent has to propose a fix. Five backward-compat strategies are accepted: `field_alias`, `version_bump`, `deprecation_window`, `dual_write`, `consumer_patch`. The fix is validated against every consumer in the graph. If even one consumer would still break, the agent gets penalized.
|
| 109 |
|
| 110 |
-
###
|
| 111 |
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
-
|
| 115 |
-
- `state()` returns the current observation,
|
| 116 |
-
- `step(action)` submits an action and receives reward,
|
| 117 |
-
- `close()` ends the session.
|
| 118 |
|
| 119 |
-
The action space is intentionally small and inspectable: report a violation, trace
|
| 120 |
|
| 121 |
## 3) Reward signal β composable rubrics, 14 independent components
|
| 122 |
|
|
|
|
| 103 |
2. **Trace** β identify which downstream consumers break (the "blast radius")
|
| 104 |
3. **Fix & verify** β propose a backward-compatible migration and validate it against every consumer's spec
|
| 105 |
|
| 106 |
+
Each episode places the agent inside a simulated enterprise (3β5 microservices, each owning an OpenAPI spec, each declaring which fields it consumes from upstream):
|
| 107 |
+
|
| 108 |
+
```text
|
| 109 |
+
Enterprise Service Graph (one of two cascade scenarios)
|
| 110 |
+
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
|
| 111 |
+
β UserService β ββββββΆ β OrdersService β ββββββΆ βBillingServiceβ
|
| 112 |
+
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
|
| 113 |
+
β β
|
| 114 |
+
βΌ βΌ
|
| 115 |
+
βββββββββββββββββββββ ββββββββββββββββββββ
|
| 116 |
+
βNotificationsSvc β β AnalyticsETL β
|
| 117 |
+
βββββββββββββββββββββ ββββββββββββββββββββ
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
When the producer ships a breaking change, the agent has to figure out who breaks β but the ground-truth answer is hidden. The agent must reason from the consumer declarations.
|
| 121 |
|
| 122 |
Then the agent has to propose a fix. Five backward-compat strategies are accepted: `field_alias`, `version_bump`, `deprecation_window`, `dual_write`, `consumer_patch`. The fix is validated against every consumer in the graph. If even one consumer would still break, the agent gets penalized.
|
| 123 |
|
| 124 |
+
### The 9 tasks at a glance
|
| 125 |
|
| 126 |
+
| Task | Phase | Tests |
|
| 127 |
+
|---|:-:|---|
|
| 128 |
+
| `find_type_mismatches` | 1 | Top-level type/missing/enum violations (4 violations, 12-pool seed variance, 495 combos) |
|
| 129 |
+
| `validate_nested_objects` | 1 | Deep nested-path traversal (7 violations, 2 scenario variants) |
|
| 130 |
+
| `detect_breaking_changes` | 1 | v1 β v2 spec diff: removed/renamed fields, narrowed enums, type changes (9 violations) |
|
| 131 |
+
| `validate_response_schema` | 1 | Subtle format/pattern/range/enum errors in responses (10 violations, 2 variants) |
|
| 132 |
+
| `validate_cross_field_constraints` | 1 | Arithmetic + date ordering + conditional rules across fields (7 violations) |
|
| 133 |
+
| `validate_auth_request` | 1 | OAuth2/API-key constraints, MFA patterns, IP format, rate limits (6 violations, 2 variants) |
|
| 134 |
+
| `trace_downstream_blast_radius` | 2 | Identify every consumer broken by a producer API change |
|
| 135 |
+
| `propose_backward_compat_fix` | 3 | Propose a migration patch that validates against all consumer specs |
|
| 136 |
+
| `multi_service_cascade_fix` | 2+3 | Full workflow: trace β fix β verify in one episode |
|
| 137 |
|
| 138 |
+
### Agent interface
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
+
The agent interacts through normal OpenEnv-style calls (`reset`, `step`, `state`, `close`). The action space is intentionally small and inspectable: report a violation (Phase 1), trace impacted consumers (Phase 2), or propose/validate a fix (Phase 3). Full action and observation schemas are in the [GitHub README](https://github.com/kumarpushpam17-personal/Hackathon/blob/main/api_contract_validator/README.md#action-space).
|
| 141 |
|
| 142 |
## 3) Reward signal β composable rubrics, 14 independent components
|
| 143 |
|