Skip to content

Commit e14cc5d

Browse files
fix(renderer): stop emitting require_live_session, rejected by bread 0.3.0 (#202)
bread 0.3.0 removed the `hardware.require_live_session` field and rejects it at load time as an unknown key. The renderer still emitted it, the catalog still declared it as a bread topology field, both project templates still seeded it, and the TS contract still typed it — so every bread config workbench generated was dead on arrival: the provider exits immediately, the runtime's hello handshake fails on the dead stdout pipe, and the runtime aborts. The field's intent now rides on bus_path: a real path opens a live CRUMBS session and startup throws if the bus cannot be opened, while a mock:// path seeds an inventory instead. Both templates already set bus_path, so behaviour is preserved. The checked-in golden fixture encoded the broken output as expected, so it asserted the bug was correct; updated to match. Verified by rendering both templates and running the released bread 0.3.0 binary's --check-config over the output: bioreactor-manual (/dev/i2c-1) and mixed-bus-mock (mock://) both validate. Same root cause as the failure found on real hardware during the anolishq/anolis#138 run (anolishq/anolis-projects#31).
1 parent e328804 commit e14cc5d

6 files changed

Lines changed: 4 additions & 7 deletions

File tree

anolis_workbench/catalog/providers.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"check_config_flag": "--check-config",
4949
"topology_fields": [
5050
{ "key": "provider_name", "type": "string", "required": false, "default": "bread0" },
51-
{ "key": "require_live_session","type": "bool", "default": false },
5251
{ "key": "query_delay_us", "type": "int", "default": 10000 },
5352
{ "key": "timeout_ms", "type": "int", "default": 100 },
5453
{ "key": "retry_count", "type": "int", "default": 2 }

anolis_workbench/core/renderer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,11 @@ def _render_bread(pdata: dict, path_data: dict) -> dict:
221221
if "provider_name" in pdata:
222222
doc["provider"] = {"name": pdata["provider_name"]}
223223

224+
# No require_live_session: bread 0.3.0 removed the field and rejects it as an
225+
# unknown key. The intent now rides on bus_path — a real path opens a live
226+
# CRUMBS session and startup throws if the bus cannot be opened, while a
227+
# mock:// path seeds an inventory instead.
224228
hardware: dict = {"bus_path": path_data.get("bus_path", "")}
225-
if "require_live_session" in pdata:
226-
hardware["require_live_session"] = pdata["require_live_session"]
227229
if "query_delay_us" in pdata:
228230
hardware["query_delay_us"] = pdata["query_delay_us"]
229231
if "timeout_ms" in pdata:

anolis_workbench/templates/bioreactor-manual/system.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"bread0": {
6363
"kind": "bread",
6464
"provider_name": "bread0",
65-
"require_live_session": true,
6665
"query_delay_us": 15000,
6766
"timeout_ms": 150,
6867
"retry_count": 3,

anolis_workbench/templates/mixed-bus-mock/system.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"bread0": {
5454
"kind": "bread",
5555
"provider_name": "bread0",
56-
"require_live_session": false,
5756
"query_delay_us": 10000,
5857
"timeout_ms": 100,
5958
"retry_count": 2,

frontend/src/lib/contracts.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ export interface SimProviderConfig extends UnknownRecord {
141141
export interface BreadProviderConfig extends UnknownRecord {
142142
kind: "bread";
143143
provider_name?: string;
144-
require_live_session?: boolean;
145144
query_delay_us?: number;
146145
timeout_ms?: number;
147146
retry_count?: number;

tests/fixtures/bioreactor/provider-bread.bioreactor.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ provider:
33

44
hardware:
55
bus_path: /dev/i2c-1
6-
require_live_session: true
76
query_delay_us: 15000
87
timeout_ms: 150
98
retry_count: 3

0 commit comments

Comments
 (0)