Repository navigation
Fabric switch reader: RouterOS response → typed lane readings - #11525
Conversation
…ty comment review 67287 (claude/opus), all four findings: - §3c dangling reader: crs812_fabric_lane_read_outcomes was consumed only by its own witness. The reviewer is right that the stated BMC-transport frontier blocks the FETCH, not the JOIN -- turning LaneReadOk outcomes into the List<Crs812LaneReading> crs812_switch_subject already takes is pure and network-free. Landed that chain: crs812_fabric_read (the join, fail-closed -- one bad lane refuses the whole read) and fabric_switch_subject_from_wire, which builds the real Crs812SwitchSubject inspect_fabric_switch consumes. The ONLY declared frontier is now that terminal function, whose trigger genuinely is the live fetch (BMC basic-auth transport debt), stated on it. - §3c unread fields: dropped auto_negotiation and running from Crs812EthernetWire -- no fold read them. They return with their consumers (autoneg axis G1, live link-state G3), not before. - §4b rung honesty: the witness comment claimed the decode executes "over the captured bytes". There are no captured bytes -- the fixture is hand-authored, transcribed from the 2026-09-17 response. Reworded to say the records are supplied inputs and the real JSON->wire producer is the declared frontier; the claim discriminates the DECODE, not the fetch. - predicate-for-a-test (advisory): crs812_lane_read_outcome_refused now has a production consumer -- crs812_fabric_read folds it -- rather than only the witness. Evidence: claim_batch, 9 claims green, including the join produces eight readings, one bad lane refuses the whole read, and the frontier builds a subject. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
All four findings in review 67287 addressed in the latest commit; 9 claims green by execution. 1. §3c dangling reader — fixed by landing the join. You're exactly right: the stated BMC-transport frontier blocks the fetch, not the join, and turning
So 2. §3c unread fields — dropped. 3. §4b rung honesty — comment fixed. You caught the real thing: the fixture is hand-authored (transcribed from the 2026-09-17 response), so "executing over the captured bytes" was rung inflation. Reworded — the records are supplied inputs, the claim discriminates the decode not the fetch, and the inhabitance pairing (a real JSON→wire producer emitting this shape) lands with that fetch. 4. Predicate-for-a-test (advisory) — resolved by #1. New discriminating claims: the join produces eight readings for the subject, one bad lane refuses the whole read, and the frontier builds a subject from a clean read. Thanks — the dangling-reader call was the right one; the join was pure all along and I'd left it on the wrong side of the frontier. |
First code increment of the modeled switch-convergence path (design in #11524). This is the read path's functional core: it turns a RouterOS
/rest/interface/ethernetresponse into theCrs812LaneReadingvaluesgunbc.spark.fabric_switch_assessmentwas written to receive. Todayfabric_switch_subject()passesreadings: [], so every lane resolves to unknown; this is the producer that closes that gap on the read side.What's here
extdeps.mikrotik.crs812— the inverse wire parsers (DESIGN §4, one grammar both directions):crs812_lane_speed_from_wire,crs812_fec_mode_from_wire,crs812_wire_bool, and theCrs812EthernetWirerecord. Each is partial and fail-closed: a wire value the corpus doesn't model decodes to an explicitUnmodelledarm carrying the string, never a silent default.gunbc.spark.fabric_switch_read— the workflow-layer decode: filters the GET response to our fabric legs (by the RouterOS comment the switch carries), and turns each per-lane wire record into either aCrs812LaneReadingor a located refusal naming the interface, field, and raw wire that didn't parse.gunbc-fabric-switch(192.168.1.240) on 2026-09-17: the 8 legs decode to 50G/fec91/enabled, a non-fabric interface is filtered, an unmodelled speed refuses atspeed, an unmodelled FEC refuses atfec-mode, a disabled lane reads not-enabled.Scope boundaries (deliberate)
extdeps.bmc.httpdeclared as debt (redfish_http_hardwired_transport_dissolution_trigger: the sharedtransport restmachinery doesn't yet realize transport-level basic auth). So this is the pure decode — wire records in, typed readings out — fully testable with no network. The live fetch lands beside it on the BMC precedent. A pure decode is also the right seam: the same function serves a live read and a replayed fixture without branching.speed/fec/enabled); adding the autoneg dimension (gap G1) is a separate change to the load-bearing assessment type.🤖 Generated with Claude Code