Repository navigation
feat(wgm): vendor IE discovery + calibrated score boost (rebased onto main) - #353
Conversation
|
Rebased onto main by felixfelix-bot (supersedes #332). Ready for c03rad0r review + merge. This PR contains the vendor IE discovery v2 feature with calibrated score boost. All conflicts resolved during rebase. |
Amperstrand
left a comment
There was a problem hiding this comment.
Fidelity-verified against our original #332's final reviewed state: the Required:true→false schema fix is present, and the scanner.go staging-marker hunk carried too (struct alignment + the STAGED comment). CI green.
Two notes before merge, neither blocking from our side:
- CHANGELOG entry missing — per repo convention this is a user-visible change (configs that predate the key were being rejected). Suggested entry under Fixed: 'Config schema: vendor_ie_discovery no longer Required — optional-with-default upgrades cleanly (#353).'
- Overlap with #355 on (yours changes the Required field; #355 reformats the block) — whichever merges second will need a trivial rebase. Sequencing note only.
Amperstrand
left a comment
There was a problem hiding this comment.
Fidelity-verified against our original #332's final reviewed state: the vendor_ie_discovery Required:true->false schema fix is present, and the scanner.go staging-marker hunk carried too (struct alignment + the STAGED comment). CI green.
Two notes before merge, neither blocking from our side:
- CHANGELOG entry missing - per repo convention this is a user-visible change (configs that predate the key were being rejected). Suggested entry under Fixed: "Config schema: vendor_ie_discovery no longer Required - optional-with-default upgrades cleanly (#353)."
- Overlap with #355 on src/config_manager/config_schema.go (yours changes the Required field; #355 reformats the block) - whichever merges second will need a trivial rebase. Sequencing note only.
Amperstrand
left a comment
There was a problem hiding this comment.
Reviewed — minimal staging change: schema vendor_ie_discovery flips to Required: false, scanner.go gofmt alignment, plus an explicit comment that the vendor-IE parse wiring lands in a follow-up. Zero runtime delta; CI fully green. Approving — merge at your discretion.
(E2E cloud-lab run for this head is in flight; results will be posted as a follow-up comment.)
|
E2E results: deployed head
As expected for a zero-runtime-delta staging change, the build deploys and behaves identically to main. (Approve + merge at your discretion.) |
1. Encoder: guard total body length against uint8 overflow (per-field checks existed but sum could exceed 255) 2. Parser: respect declared bodyLen instead of raw[2:] (was reading trailing bytes as TLVs) 3. Docs: update vendor_element_manager description (was referencing removed 'Bitcoin/Lightning info') Addresses items 1, 2, 6 from c03rad0r's consolidated review. Items 3 (OUI hardware validation), 4 (ubus health check), 5 (JSON via fmt.Sprintf), 7 (map ordering) are informational — no code change needed for this PR's scope.
…TollGate#235) Addresses c03rad0r's change requests: 1. Encoder: moved len(body) > 255 check BEFORE uint8 cast (was after, meaning truncation already happened) 2. Added 11 encoder/parser unit tests: - 5 encode→decode round-trip tests (minimal, flags, mint, pubkey, full) - TestEncodeRejectsOversizedBody (>255 bytes) - TestParseRejectsInvalidOUI (wrong OUI) - TestParseRejectsTooShort (<8 bytes) - TestParseRejectsWrongElementType (wrong elem type byte) - TestParseRespectsBodyLen (trailing garbage ignored) All tests pass.
- scanner.go: staging marker where NetworkInfo is built — IsTollGate/RawIEs/pricing stay zero here; the vendor-IE parse that fills them and the VendorIEDiscovery gate land in the wiring follow-up. Makes the intentional staging legible at the seam. - config schema: vendor_ie_discovery Required true → false. A Required key with Default false rejects every existing config that predates the key; optional-with-default upgrades cleanly. Review findings: cold review 2026-08-18 (majors 1-3 are the staged wiring by design — deferred with this PR per merge order; minor 3).
350fd58 to
bd43945
Compare
* docs(changelog): backfill [Unreleased] for v0.6.0 Add entries for PRs #331, #312, #299, #347, #361, #365, #366, #368, #369, #370 under [Unreleased] (Added / Changed / Internal), matching existing Keep-a-Changelog style. Ref #339. * docs(changelog): backfill #359 and #353 entries --------- Co-authored-by: Felix <301398501+felixfelix-bot@users.noreply.github.com> Co-authored-by: c03rad0r <1100745+c03rad0r@users.noreply.github.com>
… main) (OpenTollGate#353) * fix(wgm): address c03rad0r change requests on OpenTollGate#199 1. Encoder: guard total body length against uint8 overflow (per-field checks existed but sum could exceed 255) 2. Parser: respect declared bodyLen instead of raw[2:] (was reading trailing bytes as TLVs) 3. Docs: update vendor_element_manager description (was referencing removed 'Bitcoin/Lightning info') Addresses items 1, 2, 6 from c03rad0r's consolidated review. Items 3 (OUI hardware validation), 4 (ubus health check), 5 (JSON via fmt.Sprintf), 7 (map ordering) are informational — no code change needed for this PR's scope. * fix(wgm): encoder overflow check before cast + round-trip tests (OpenTollGate#235) Addresses c03rad0r's change requests: 1. Encoder: moved len(body) > 255 check BEFORE uint8 cast (was after, meaning truncation already happened) 2. Added 11 encoder/parser unit tests: - 5 encode→decode round-trip tests (minimal, flags, mint, pubkey, full) - TestEncodeRejectsOversizedBody (>255 bytes) - TestParseRejectsInvalidOUI (wrong OUI) - TestParseRejectsTooShort (<8 bytes) - TestParseRejectsWrongElementType (wrong elem type byte) - TestParseRespectsBodyLen (trailing garbage ignored) All tests pass. * fix(wgm): mark vendor-IE pipeline as staged; schema key not Required - scanner.go: staging marker where NetworkInfo is built — IsTollGate/RawIEs/pricing stay zero here; the vendor-IE parse that fills them and the VendorIEDiscovery gate land in the wiring follow-up. Makes the intentional staging legible at the seam. - config schema: vendor_ie_discovery Required true → false. A Required key with Default false rejects every existing config that predates the key; optional-with-default upgrades cleanly. Review findings: cold review 2026-08-18 (majors 1-3 are the staged wiring by design — deferred with this PR per merge order; minor 3). --------- Co-authored-by: amperstand <atlas@oh-my-opencode.com>
* docs(changelog): backfill [Unreleased] for v0.6.0 Add entries for PRs OpenTollGate#331, OpenTollGate#312, OpenTollGate#299, OpenTollGate#347, OpenTollGate#361, OpenTollGate#365, OpenTollGate#366, OpenTollGate#368, OpenTollGate#369, OpenTollGate#370 under [Unreleased] (Added / Changed / Internal), matching existing Keep-a-Changelog style. Ref OpenTollGate#339. * docs(changelog): backfill OpenTollGate#359 and OpenTollGate#353 entries --------- Co-authored-by: Felix <301398501+felixfelix-bot@users.noreply.github.com> Co-authored-by: c03rad0r <1100745+c03rad0r@users.noreply.github.com>
Rebased version of #332. Conflicts resolved: kept main's refined vendor_element_manager.go, config_manager_config.go, vendor_ie_encode_test.go. 3 commits applied cleanly. Build verified.