Repository navigation
feat(start-sdk): declare and enforce binding transports - #4702
Conversation
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
helix-red
left a comment
There was a problem hiding this comment.
Merges cleanly into master. I found no correctness defect in the transport model. Here is what I checked:
- StartOS forwarding:
PortForwardStatekeys each lease by protocol, so a narrower lease no longer keeps the other protocol alive. Legacy{ tcp, udp }rules use the old tag format and are purged at controller start byremove_stale_forward_rules. Upstream mappings now include the protocol in their keys, so narrowing a binding withdraws only the dropped transport. Vhost/TLS mappings are TCP-only.BindOptionsrejects UDP combined with a proxy,addSslorsecure.ssl. - StartTunnel:
ForwardAddress/PinholeAddresskeys work withoverlapping/occupied. The port-80 redirect yields only to TCP. A manual Both DNAT is split during SNI conversion (UDP remains DNAT, TCP becomes the fallback), andrestore_forward_entryreverses that split. The migration splits onlyautorows. Socket-only API calls go throughoperation_keys/matches_key, andseed_pinholesremoves the legacy socket-only nft tags. - StartWRT: The per-transport section names match the legacy-split names (
apf_<mac>_<port>_<tcp|udp>).redirect_matchesnow comparesproto. Conflict checks honor transport overlap. - SDK/TS:
transportis passed through onbindPort/bindPortRange, the default floor is 0.4.2.2, and the docs are updated.
Proposed changes (DRY cleanups in code this PR touches; the commit "share protocol decoding" set out to do this but missed these three):
net/port_map/server/igd.rs:soap_transportre-decodes the stringsoap_protocolalready decoded and needs anunreachable!(). I madesoap_protocolreturnTransportProtocoldirectly and removedsoap_transport.GetSpecificPortMappingEntrynow compares viaigd_name(), and the TCP-only hostname actions compare againstTransportProtocol::Tcp.projects/start-wrt/backend/ctrl/src/port_control.rs:wan_reserved_overlapskeeps its own copy of the fw4protodecoding (empty /all/tcpudp/tcp/udp), which the newredirect_protocolsduplicates. It now uses the shared helper, which I renameduci_protocolsbecause it decodes rules as well as redirects.net/port_map/server/mod.rs:map_transportused the literals6/17even thoughPROTO_TCPis defined beside it. I addedPROTO_UDPand matched on the constants.
None of these change behavior. I have not built or tested them; the author verifies whatever it adopts.
Proposed changes: 49ca6f5...proposal/4702
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
@helix-red Addressed all three proposals in bad78e7:
Verified through the shared Rust builder using the existing |
helix-red
left a comment
There was a problem hiding this comment.
Re-review of bad78e7. It merges cleanly into master.
All three proposals are adopted as written:
soap_protocolnow returnsTransportProtocol, andsoap_transportis gone.- StartWRT's
wan_reserved_overlapsnow uses the shareduci_protocols. map_transportuses the namedPROTO_TCP/PROTO_UDPconstants.
The only differences from the proposal branch are rustfmt changes, two doc comments trimmed, and a new uci_protocol_lists_share_fw4_defaults_and_normalization test. That test asserts the decoder's output for an empty list, all/tcpudp, mixed case, duplicate entries and non-TCP/UDP protocols, without copying its implementation. Nothing else changed since my previous review, and that review found no correctness defects.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Fixed the CI failure from run 43308721306 in the test-only follow-up commit: the migration expectation now includes 0.4.2.2. Also extended the existing upgrade/rollback table to cover 0.4.2.1 → 0.4.2.2 while preserving service data. Verification through the shared Rust builder: the version:: filter passed 82 tests, including the previously failing test; four helper-dependent conversion tests remained ignored. Pinned formatting and diff checks passed. No production behavior changed after cross-review approval; CI will run on the new head. |
|
Thanks @helix-red. The final brief is published and @dr-bonez’s review is requested. The PR is mergeable; automated tests, generated artifacts, and multiarch builds are still running. The only follow-up after your approval was the test-only version-chain correction described above. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Fixed the Generated Artifacts failure in 231a5be. The omitted MCP catalog regeneration now reflects the reviewed transport field in the output schemas of package.host.binding.list and server.host.binding.list. All 205 tool names, input schemas, and annotations are unchanged; no additional method or input is exposed. The catalog freshness check passes. Reused the CI-confirmed binding/manpage generation because this follow-up changes only the derived catalog. Updated the brief and retained the final-review handoff; full CI is running on the new head. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Merged current master (4b01897) in ef56409 and resolved the sole conflict in installing-startos.md. Kept the upstream Raspberry Pi bootloader step and this PR’s 0.4.2.2 release links. Exact-content verification confirms the page equals current master plus the three intended release-link updates; scoped Prettier and diff checks pass. The merge changes no transport implementation, defaults, or rollout. Reused the pre-merge head’s successful automated tests, generated-artifact, formatting/license, and cross-platform binary/package checks; new-head CI is pending. Re-requesting @helix-red to check the repair. |
helix-red
left a comment
There was a problem hiding this comment.
Re-review of ef56409, covering everything added since my approval at bad78e7. It merges cleanly into master (merge-tree exits 0).
- 7b71869 (tests only): the version-chain test gains the 0.4.2.1 → 0.4.2.2 step with zero actions, and the
v0_4_0_5test now expects 0.4.2.2 inpostInitMigrationTodos. Both follow from the 0.4.2.2 version bump that was already reviewed. - 231a5be: regenerates
mcp-tools.json. BothBindOptionsoutput schemas gaintransportand theTransportenum (tcp/udp/both), with descriptions matching the Rust doc comments.transportis listed as required like the other serialized fields; deserialization still defaults it toboth. - ef56409 (merge of
master): its upstream parent 4b01897 is a docs backport on the original base. The conflict ininstalling-startos.mdwas resolved by keeping the upstream Raspberry Pi bootloader step together with this PR's v0.4.2.2 release links. Relative tomaster, the page differs only by those link updates. The merge changes no code.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
|
Thanks @helix-red. The repaired head is mergeable and the final brief is current. @dr-bonez’s final review remains requested; current-head CI is still running. |
|
All executed checks on ef56409 passed, including OS/migration images; OpenWrt/deployment jobs were skipped. That evidence applies to the previous head, which now conflicts with master34e08131e. The in-progress base integration preserves the shared-volume release at 0.4.3 and will move this SDK’s default minimum from the unpublished 0.4.2.2 marker to 0.4.3. Focused verification of the combined candidate is running before push and fresh cross-review; the published brief will be updated with that changed rollout. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Retiring the marked review from @helix-red (#4702 (review)). Dismissed by Helix: the changes require a substantive PR brief update. Merge 2163535 brought master's shared-volumes release (#4485), which already ships StartOS 0.4.3 and SDK 4.2.0, and the resolution changed the PR's rollout facts. The PR no longer adds the 0.4.2.2 OS version: v0_4_2_2.rs and its version-chain step are removed. The SDK's default compatibility floor (OSVersion in projects/start-sdk/lib/StartSdk.ts, with its manifest test and changelog) is now 0.4.3 instead of 0.4.2.2, and SDK 4.2.0 is no longer this PR's bump. The brief's statements that 'SDK 4.2.0 defaults to requiring StartOS 0.4.2.2: already-released 0.4.2.1 lacks enforcement' and its 0.4.2.1→0.4.2.2 upgrade verification must change: enforcement now ships in StartOS 0.4.3, and packages default to requiring 0.4.3. |
|
Thanks, @helix-red. This approval is already reflected in the final handoff: the current brief is published, all three screenshots are retained, @dr-bonez is requested, and head 678d245 is mergeable. Its only delta after the approved commit is test formatting. Rechecked every current check: required CI is still queued/running, with no current failure shown. No additional edits or review requests are needed for this delayed approval notification. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
Dismissed by Helix: the changes require a substantive PR brief update. Since adb5ae4 (base master), 02a7386 (canonical '{ tcp, udp }' nft pinhole operand) and 678d245 (test re-wrap) are brief-neutral, but 3b1bc8c changes the delivered StartOS UI. The Interfaces gateway-table Transport column moves from between Type and Certificate Authority to between Certificate Authority and URL (header 'Access | Type | [Certificate Authority] | Transport | URL', row cells reordered, mobile stacking now CA, Transport, URL, interfaces.md table reordered). The brief's StartOS screenshot (aaef2f27…) shows the superseded order 'Access | Type | Transport | Certificate Authority | URL', and its statement 'Existing screenshots still represent the final UI' is now false. The brief must replace that screenshot and correct the claim; the UDP-range screenshot (no CA column) remains accurate.
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
The managed-address Transport column moved from before CA to between CA and URL on desktop and mobile, requiring revised placement claims and screenshots. WRT 1.4.0 also shipped, so the release/rollout brief now targets 1.4.1. Requesting renewed review of these substantive changes.
|
Corrected in 3b1bc8c: Transport is now between Certificate Authority and URL, in both the desktop header/cells and mobile rows. When CA is absent, Transport remains immediately before URL. The documentation matches. Mobile layout now follows DOM order instead of duplicating row positions; the optional-CA header also uses one ordered list. Verified strict UI checks (210 tests), dictionaries, a production build, and Chromium assertions for header/cell order, mobile CA→Transport→URL, and CA-free UDP ranges. Replaced the superseded desktop screenshot and added the corrected mobile screenshot; retained the unaffected UDP-range and Tunnel images. CI also caught the newly released WRT 1.4.0 baseline. Separate merge 2c11e1b integrates master, and 291e7fb advances the pending WRT patch/lockfile to1.4.1. All four touched products’ version checks and merged-base UI checks passed. The MCP comparison still has225 unchanged names/inputs and onlytwo changed binding outputs. The final brief is updated in place. The previous approval is dismissed for the changed UI placement/screenshots and release target; requesting fresh cross-review. Current-head Prettier passed; remaining required CI is running. No manual merge or publish is performed. |
helix-red
left a comment
There was a problem hiding this comment.
Re-review of 291e7fb, covering everything since my approval at 02a7386. It merges cleanly into current master (git merge-tree exits 0).
Transport column order (3b1bc8c):
- Desktop:
GatewayComponent.headeris one ordered list with the CA column optional:Access | Type | [Certificate Authority] | Transport | URL. Each row renders the Transport cell after the CA cell to match. - Mobile: the
_no-certhost class and its fixed grid rows are gone..cert-cell,.transportand.url-cellspan1 / 3and auto-place in DOM order, giving CA, Transport, URL, or Transport, URL when there is no CA. That removes the second positional mapping..cert-iconstays hidden on mobile, and the actions cell still spans rows 1–4. - Docs:
interfaces.mdnow lists Transport after Certificate Authority.
Merge 2c11e1b (master at b04100a): every upstream file arrives unchanged (#4701, #4721, #4723, #4728 and the post-release changelog compilation). The PR's own changes are identical, apart from a generated BackupHistory ordering that master (#4728) now carries itself.
StartWRT 1.4.1 (291e7fb): start-wrt/v1.4.0 is tagged and is an ancestor of this head. Its migration list ends with TurnOffRemoteAccess as entry 16, so appending SplitAutomaticForwardTransports as entry 17 is the right order. The crate version in Cargo.toml and Cargo.lock moves to 1.4.1, matching the pending patch-fixed-mapping-transports fragment. Cargo.toml is the only place StartWRT records its version; the remaining 1.4.x strings in web/ are mock data.
678d245 only re-wraps one StartTunnel test assertion.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
|
The reported changelog failure is from superseded head 3b1bc8c. Current head 291e7fb already targets WRT1.4.1 in the canonical manifest and lockfile, and its Changelog fragments & versions check passed. Prettier and dependency-license checks also passed; inspected all other current checks, which remain queued/running rather than established passing. @helix-red approved this exact head, including CA→Transport→URL on desktop/mobile, the separate master integration, and WRT release alignment. Confirmed mergeability, read the final review/delta and verification, reran the brief procedure, retained the corrected desktop/mobile and unchanged UDP/Tunnel screenshots, and renewed @dr-bonez’s final review request. Required full tests, generated artifacts, builds/packages and images remain pending. No obsolete-run retry or further source change is needed for this notification. |
|
Thanks, @helix-red. The exact-head approval is already incorporated into the renewed handoff: current 291e7fb is mergeable, the final brief and corrected desktop/mobile screenshots are published, and @dr-bonez is requested. Rechecked all current checks: no source failure is shown; full tests, formatting/lockfiles, generated artifacts, binaries/packages and images are still pending. No additional source or brief edits are needed for this delayed approval event. |
|
Investigated the current-head riscv64-nonfree failure (job132279707440). It fails in actions/download-artifact@v8 while downloading compiled-riscv64.tar, before extraction or either image-build step. The final action output is Attempted a targeted job retry while preserving successful siblings; GitHub currently reports that the job cannot be rerun while the workflow remains active. No unrelated source changes or blanket rerun made. The failed job still requires a retry once eligible. Inspected every current check: Generated Artifacts, Formatting & Lockfiles, all CLI platform binaries/debs, registry/tunnel packages, WRT binary, OS base binaries, version, license and Prettier checks passed. Automated tests and eight other image variants remain pending/running. The brief records the infrastructure blocker and new successful evidence; cross-review remains valid. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Repaired the real master conflict in merge dcab454, integrating 2f845e5 without force-push or separate implementation changes.
The final brief is revised in place, preserving metadata and corrected screenshots. Old291 full-test/build successes remain recorded evidence, but new-head CI is required; its old RISC-V downloader failure will not be retried on the superseded head. Re-requesting @helix-red after the repair; final handoff waits for that review. |
helix-red
left a comment
There was a problem hiding this comment.
Re-review of dcab454, the merge of master at 2f845e5 (#4583) since my approval at 291e7fb. It merges cleanly into current master (git merge-tree exits 0), and git diff --check against the new base is clean.
I compared the PR's own changes before the merge (b04100a → 291e7fb) and after it (2f845e5 → dcab454), file by file, and checked the merge against upstream's own diff:
- Upstream content: every upstream file arrives unchanged except where the PR also edits it.
- Generated files (
mcp-tools.jsonand the StartOS/StartTunnel RPC bindings, both.tsand.schemas.ts): the PR's additions are identical to before. Regeneration over the merged Rust carried them over unchanged. - Dictionaries: the shared
'Transport'key moves from 1279 to 1295 in all five locales, after #4583's new keys. There are no duplicate ids and the translations are unchanged. package.json: the PR no longer adds the StartTunnel test scripts tocheck:tunnel, because #4583 now contains the identical line.- #4583's Rust in shared files: it adds DB fields (
registryCache/osUpdateCache, the Tunnelserver_identity_key), switches subscriptions to streaming and restructures the StartTunnel context seed. None of it touches transport. The PR'sForwardAddress-keyedactive_forwardspasses through unchanged, and every remainingBindOptions/RangeBindInfoliteral setstransport.
The SDK 4.2.0 requirement of StartOS 0.4.3, StartWRT 1.4.1 with the 17th migration, the protocol-set format, the defaults and the UI column order are unchanged from the head I approved.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
|
The conflict notification refers to superseded head291e7fb10. After fetching, current dcab454 is MERGEABLE and git merge-tree against latest master9423bde57 exits0. Per the conflict guidance, left the branch unchanged. @helix-red has approved this exact repaired head, confirming preserved upstream intent and unchanged transport semantics. Read that review and final changes, confirmed the retained screenshots still represent the UI, remeasured (+2188/-897 in62 files), updated the final brief status in place, and renewed @dr-bonez’s final review request. New-head CI remains queued/running; no current failure was shown in the checks inspected. No additional base merge or obsolete RISC-V retry is needed. |
|
Thanks, @dr-bonez and @helix-red. Both final and cross-review approvals, including the latest final approval, apply to current head dcab454, which is mergeable. The brief and handoff are current; no further reviewer requests or source edits are needed. Re-inspected every current check: some compilation checks have passed, the remainder are queued/running, and no current failure is shown. Leaving the approved source unchanged; automatic merge remains gated on all required checks. No manual merge or publish performed. |
|
Current-head RISC-V failure is infrastructure, after successful image assembly. Job132331706362 completed Run iso build and successfully uploaded riscv64.squashfs (artifact14101696002). During actions/upload-artifact@v7 for riscv64.iso, after704643072 uploaded bytes, the runner Node24 process fatally asserted Inspected every check: full automated tests, generated-artifact freshness, formatting/lockfiles, binaries/packages and seven other image jobs passed. The riscv64-nonfree image is still running, so this workflow is not yet eligible for a targeted retry. Preserve successful siblings and retry only the failed RISC-V job once eligible; no speculative source/toolchain changes or blanket rerun made. Both exact-head approvals remain valid. The brief now records this upload blocker and current-head successful evidence. |
Merged on 2026-11-14 after cross-review and final approval. Automated tests, generated artifacts, formatting, binaries/packages, and eight image jobs passed. The remaining RISC-V image assembled successfully and its squashfs uploaded, but the runner’s Node/V8 process crashed during ISO upload; that job remains failed infrastructure evidence, not a passing check. Skipped jobs are not verification.
Packages declare a non-empty protocol set, canonically
transport: ['tcp', 'udp'], on single-port and range bindings, independently of the applicationprotocol. Bare'tcp'or'udp'inputs select singleton sets; arrays are deduplicated and sorted, and[]is rejected. StartOS enforces the selection for IPv4/IPv6 forwarding and upstream mappings; StartTunnel and StartWRT keep TCP/UDP ownership, leases, renewal, removal, and listing independent.addSsl, andsecure.ssl: true, rather than silently changing transport or discarding options. Selecting TCP+UDP does not create UDP SNI; UDP forwarding uses direct IP/port mappings.Implementation diff: +2188 / −897 lines in 62 files (excludes lockfiles, tests, docs, release notes, and changelog). Generated runtime schemas, runtime dictionaries, and development mock data are included.
Data, compatibility, and rollout
BindOptions(single-port options),BindRangeParams(range requests), andRangeBindInfo(stored ranges) gaintransport. The shared Rust owner wraps a non-emptyBTreeSet<TransportProtocol>with scalar-or-array deserialization and canonical array serialization. Omitted backend input selects TCP+UDP. Only'tcp'and'udp'are protocol tokens;'both'is not accepted. Address recomputation publishes this default for legacy ranges even when their service has not reloaded, preserving explicit selections and disabled state. Generated types and MCP binding-list outputs expose the field.IPv4 forward and IPv6 pinhole keys use
tcp@socketorudp@socketfor concrete selections; socket-only keys retain aggregate TCP+UDP semantics. IPv6 management RPCs gain an optional transport selector. Existing aggregate CLI operations remain supported. One-time Tunnel/WRT migrations split automatic dual-transport mappings while preserving labels and enabled state; manual TCP+UDP entries remain intact. WRT preserves all 16 published migration indices and appends splitting after the Remote Access migration.SDK 4.2.0 requires StartOS 0.4.3 by default; released 0.4.2.1 lacks enforcement. Deploy OS support before packages using the new SDK, and update Tunnel/WRT for independent gateway state. WRT targets 1.4.1, the pending patch after released 1.4.0. PCP/IGD wire formats stay unchanged. SDK numeric port reservations and internal-overlap restrictions stay unchanged; gateway TCP and UDP mappings can independently share an external number.
Reuse and additional fixes
The implementation extends existing forwarding controllers, gateway backends, lease registries, and cleanup rather than adding a parallel forwarding path. Shared transport types own selection and IGD spelling; existing SDK protocol metadata owns defaults, and the backend owns validation. The non-empty wrapper retains the legacy TCP+UDP default rather than a standard set’s empty default. UI transport projection uses existing metadata without extra persisted state. Labels are shared with Tunnel, and the gateway parent owns certificate-column visibility. One header list owns desktop column ordering, while mobile grid auto-placement follows the row’s DOM order without a second positional mapping.
imbl_value::to_valueborrow is corrected.#4678 adds QUIC hostname routing and is not a dependency. Both changes touch gateway types and introduce Tunnel migration 5; whichever lands second must reconcile those types and migration ordering. This PR adds no UDP hostname routing.
Verification
cargo check --tests(no dedicated recipe).make start-wrt-testpass (958 WRT + 37 UCI tests, including the revision-16 migration regression) is reused for unchanged port-control code. On the registry merge, 109 TypeScript core tests, 61 SDK tests, core/SDK builds and typechecks, UI (262 tests), Tunnel (8 tests), RPC-client lifecycle (97 tests), dictionary and scoped formatting checks passed. Earlier shared (17 tests) and version checks are reused for unchanged behavior.Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol