Skip to content

rebrand-literal-gutter RED on main: #682 reintroduced the banned Net4sats literal on 7 surfaces after #684's scoping #722

Closed

Description

@Amperstrand

Summary

tests/packaging/rebrand-literal-gutter_test.sh is RED on current main: PR #682 (dual-brand SSID recognition, commit 659de8a) landed AFTER #684's scoped rebrand gutter (commit fc639db) and reintroduced the banned Net4sats literal on 7 tracked surfaces — including one SHIPPED file and the live brand-prefix table in the source.

This makes make release-check (packaging gate) fail on main today, deterministically, on any host.

Verified on

  • Commit: 68ad5144ab09cb4723d8f3f655cbba1ac7ea9de5 (main, 2026-10-07); also reproduced on the release-prep branch off it
  • Any host; no docker needed

Evidence (verbatim suite output)

== the re-brand's name appears nowhere in the tracked tree
FAIL the banned literal is back (7 hit(s)):
       packaging/files/etc/uci-defaults/99-tollgate-setup:#                                    (hasTollGateSSID: TollGate-/Net4sats-),
       src/wireless_gateway_manager/brands_test.go:		"Net4sats-OQ3Q", // whitelabel brand
       src/wireless_gateway_manager/brands_test.go:		"NET4SATS-AA11", // case-insensitive whitelabel
       src/wireless_gateway_manager/discovery_log.go:// TollGate-…, and Net4sats-… for the whitelabel brand — mirrored by the
       src/wireless_gateway_manager/discovery_log.go:// installer's brandingCommands). A Net4sats-branded TollGate must be
       src/wireless_gateway_manager/discovery_log.go:var tollGateBrandPrefixes = []string{"TollGate-", "Net4sats-"}
       src/wireless_gateway_manager/vendor_element_manager.go:	// whitelabel Net4sats-…, case-insensitively — see hasTollGateSSID). This
== the shipped uci-defaults reference only known uhttpd sections
FAIL unknown uhttpd section name(s) in the uci-defaults: luci
tests: 4 passed, 2 failed

(The second FAIL is a separate cause — see the companion issue for the uhttpd.luci comment trip.)

Reproduce

git clone https://github.com/OpenTollGate/tollgate-module-basic-go && cd tollgate-module-basic-go
git checkout 68ad5144ab09cb4723d8f3f655cbba1ac7ea9de5
bash tests/packaging/rebrand-literal-gutter_test.sh ; echo EXIT=$?   # 4 passed, 2 failed, exit 1
# or the whole gate:
make release-check   # Packaging: FAIL

Troubleshooting guide

  1. Read the gutter's scope: tests/packaging/rebrand-literal-gutter_test.sh — BANNED='net4[s]ats', with a scan-tree allowlist that test(packaging): the rebrand gutter scopes its ban to shipped surfaces — docs may discuss the whitelabel #684 ("the rebrand gutter scopes its ban to shipped surfaces — docs may discuss the whitelabel") carefully calibrated BEFORE fix(discovery): recognize both brands' SSIDs so Net4sats can be an upstream — rebase of #618 #682 existed.
  2. What fix(discovery): recognize both brands' SSIDs so Net4sats can be an upstream — rebase of #618 #682 changed: src/wireless_gateway_manager/discovery_log.go now carries var tollGateBrandPrefixes = []string{"TollGate-", "Net4sats-"} — the whitelabel prefix is now a first-class runtime constant, not a re-brandable surface. The uci-defaults comment and test fixtures reference it.
  3. The product question to answer first: is Net4sats still a re-brandable whitelabel (then these surfaces must not name it literally — derive from a brand config/constant indirection), or has it become a supported dual brand (then the gutter's ban on these surfaces is obsolete and the TEST must be re-scoped — e.g. ban the literal only in generated/shipped portal assets and marketing surfaces, allow the recognized-brand tables in Go source and their tests)?
  4. Interaction with test(packaging): the rebrand gutter scopes its ban to shipped surfaces — docs may discuss the whitelabel #684's intent: test(packaging): the rebrand gutter scopes its ban to shipped surfaces — docs may discuss the whitelabel #684 deliberately kept docs discussing the whitelabel OUT of the ban. The 7 hits are code + one shipped uci-defaults comment. Decide surface-by-surface; the shipped-file comment (99-tollgate-setup) is the only one that ships to routers.

Fix hints

  • Either: replace literal Net4sats in discovery_log.go's prefix table with a brand-registry constant sourced from packaging/brand config, keeping the literal out of source; or update the gutter's scope to permit the brand table + its tests + the uci-defaults comment while keeping the ban where it matters (portal bundles, LuCI assets).
  • Whichever way, restore make release-check Packaging to green on main — it currently blocks any release gate run.

References

Activity

  1. Amperstrand commented on Oct 7, 2026

    @Amperstrand
    CollaboratorAuthor

    Lane de-confliction handoff (this lane stands down from #722 per w1:p2B ownership).

    The main checkout was found sitting on fix/722-rebrand-gutter at cb4db7f with uncommitted WIP — now committed as a handoff snapshot so it can't be lost: 37d8540 (local, on this host's main checkout; not pushed — the branch has no upstream and the owning lane owns its shape).

    What the WIP contains (near-complete, coherent):

    • New src/wireless_gateway_manager/brands.go: the SSID brand-prefix recognition set extracted to its own home — whitelabelCaptivePrefix assembled from non-contiguous bytes ("Net4" + "sats" + "-"), the same trick the gutter test itself uses, so upstream code never carries the re-brand name as a contiguous literal on scanned surfaces; recognition is case-insensitive (the pre-device-code lowercase tollgate-<code> fleet is still out there, per one-device-code.md "The measured drift").
    • vendor_element_manager.go / discovery_log.go: comments de-literalized to "the whitelabel re-brand's prefix" — the literal's legitimate homes are named as the SSID contract checker and docs/.
    • brands_test.go updated with a pin against an independent construction of the assembled value, so an assembly typo fails a test instead of silently dropping a whole brand from upstream recognition — worth keeping whatever shape the final fix takes.
    • tests/contract/check-ssid-format.sh + docs/architecture/one-device-code.md: reference updates pointing at brands.go.

    Diagnostic observations for the owning lane: the snapshot builds on cb4db7f (pre-#714 portal pin); the WIP had no battery run — go test ./wireless_gateway_manager/... and tests/packaging/rebrand-literal-gutter_test.sh were not executed before the handoff commit. The untracked→added brands.go and the modified brands_test.go are the load-bearing pieces; the comment edits are mechanical.

  2. added a commit that references this issue on Oct 7, 2026
  3. Amperstrand commented on Oct 7, 2026

    @Amperstrand
    CollaboratorAuthor

    Diagnostics from the fix-722 lane (PR incoming from Amperstrand:fix/722-rebrand-gutter):

    The 7 surfaces, classified. 1 shipped packaging comment (99-tollgate-setup:460), 1 runtime Go table (discovery_log.go tollGateBrandPrefixes), 2 Go comment lines (discovery_log.go, vendor_element_manager.go:177), 2 test fixtures (brands_test.go). Only the uci-defaults file ships to routers; the rest are source/test surfaces.

    Why the gutter went red after #692 had "fixed" it — merge order, not intent. #692 (74f6782) was authored/verified on a branch cut before #682 (659de8a) merged, so its "suite: 6/0 green" never saw the 7 hits; landing it on a main that already carried #682 re-red the gate the same day. Neither PR is wrong in isolation — they collided.

    The product question, answered by the tree. The whitelabel is still a re-brandable separate build (gutter header: separate org/repo/webroot, /etc/tollgate/brand build input; README branding paragraph). #682's recognition feature makes the brand recognizable as an upstream, not first-class in this repo. So the fix follows #722's first hint: the literal leaves the code surfaces — the prefix is assembled from non-contiguous bytes in a new single brand registry (src/wireless_gateway_manager/brands.go), the same trick the gutter file itself uses to carry its scan pattern; a value-pinning test re-assembles it independently so an assembly typo fails CI rather than silently dropping a brand from upstream recognition. The gutter's scope is untouched (#692's ruling stands).

    A trap worth recording: the issue's second FAIL is tree-state-dependent. The uhttpd.luci vocabulary trip in the evidence does not reproduce on pristine main — it comes from untracked feed-WIP (92-tollgate-admin-setup) sitting in the verifying checkout, because that check greps the filesystem directory, not the tracked tree. That's #723/#734's lane; on a clean checkout this PR's gutter run is 6/6.

    Verification on the branch: gutter 6/6, check-version-sync pass, check-ssid-format pass (behavioural + structural layers), module gofmt/vet/-race pass, full 16-module go-battery run — with the two pre-existing/environmental failures called out in the PR body (#718's racy late-receive assertion; apk-install-resolution needs a docker socket this host lacks).

  4. added a commit that references this issue on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions