A copper SFP is a converter: an SFP cage holding one mates an RJ45 port (#1514) #1598
Closed
jaylouisw
wants to merge 1 commit from
fix/1116-0335 into main
pull from: fix/1116-0335
merge into: jaylouisw:main
jaylouisw:main
jaylouisw:rev/1121-1812
jaylouisw:catalogue/1121-1822
jaylouisw:docs/1121-1817
jaylouisw:catalogue/1121-1752
jaylouisw:docs/1121-1747
jaylouisw:rev/1121-1742
jaylouisw:catalogue/1121-1722
jaylouisw:rev/1121-1712
jaylouisw:docs/1121-1717
jaylouisw:catalogue/1121-1652
jaylouisw:rev/1121-1642
jaylouisw:docs/1121-1647
jaylouisw:ci/1121-1646
jaylouisw:ci/1121-1427
jaylouisw:rev/1121-1412
jaylouisw:catalogue/1121-1422
jaylouisw:docs/1121-1417
jaylouisw:catalogue/1121-1352
jaylouisw:rev/1121-1342
jaylouisw:docs/1121-1347
jaylouisw:rev/1121-1212
jaylouisw:catalogue/1121-1222
jaylouisw:docs/1121-1217
jaylouisw:ci/1121-1027
jaylouisw:catalogue/1121-1022
jaylouisw:rev/1121-1013
jaylouisw:docs/1121-1017
jaylouisw:catalogue/1121-0852
jaylouisw:rev/1121-0842
jaylouisw:docs/1121-0847
jaylouisw:ci/1121-0827
jaylouisw:catalogue/1121-0822
jaylouisw:rev/1121-0812
jaylouisw:catalogue/1121-0752
jaylouisw:rev/1121-0742
jaylouisw:docs/1121-0747
jaylouisw:catalogue/1121-0722
jaylouisw:docs/1121-0717
jaylouisw:rev/1121-0712
jaylouisw:rev/1121-0642
jaylouisw:plan/1121-0637
jaylouisw:ci/1121-0627
jaylouisw:catalogue/1121-0622
jaylouisw:rev/1121-0612
jaylouisw:docs/1121-0617
jaylouisw:plan/1120-0337
jaylouisw:docs/1120-0347
jaylouisw:rev/1119-1942
jaylouisw:rev/1119-1912
jaylouisw:catalogue/1119-1752
jaylouisw:docs/1119-1347
jaylouisw:catalogue/1119-1352
jaylouisw:fix/1119-1232
jaylouisw:fix/1119-0602
jaylouisw:catalogue/1119-0452
jaylouisw:catalogue/1119-0422
jaylouisw:docs/1119-0417
jaylouisw:fix/1119-0202
jaylouisw:catalogue/1119-0222
jaylouisw:rev/1119-0042
jaylouisw:catalogue/1118-2252
jaylouisw:docs/1118-2047
jaylouisw:catalogue/1118-2152
jaylouisw:fix/1118-2037
jaylouisw:ci/1118-2027
jaylouisw:docs/1118-1416
jaylouisw:fix/1118-1006
jaylouisw:catalogue/1118-0326
jaylouisw:catalogue/1117-2326
jaylouisw:catalogue/1117-0025
jaylouisw:catalogue/1116-1730
jaylouisw:fix/1523-speed-downgrade-one-end
jaylouisw:fix/enable-required-and-empty-pipe-help
jaylouisw:land-all-v5
jaylouisw:land-all-v4
jaylouisw:land-all-v3
jaylouisw:land-all-v2
jaylouisw:land-all
jaylouisw:fix/board-id
jaylouisw:fix/stated-range
jaylouisw:fix/no-form-names-v2
jaylouisw:fix/voice-vlan
jaylouisw:devices/catalogue-batch
jaylouisw:devices/powerline-moca
jaylouisw:devices/firewalls-enterprise
jaylouisw:devices/pon-splitters
jaylouisw:devices/nvr-and-taps
jaylouisw:devices/four-nvr-models
jaylouisw:fix/contributing-exemption
jaylouisw:fix/stale-github-urls
jaylouisw:ci/cancel-superseded-runs
jaylouisw:gh/1438
jaylouisw:device/uisp-console-lbe-xr
jaylouisw:gh/1442
jaylouisw:docs/readme-current-counts
jaylouisw:feat/device-ubiquiti-wave-fiber-onu
jaylouisw:fix/address-ownership
jaylouisw:feat/vrrp-in-path
jaylouisw:fix/merge-research-duplicate
jaylouisw:docs/hybrid-patch-current
jaylouisw:fix/audit-port-template
jaylouisw:fix/2930f-jl256a-uplinks
jaylouisw:feat/dhcp-in-path
jaylouisw:feat/hackgpon-ubiquiti-uisp-fiber-xgs
jaylouisw:feat/hackgpon-adtran-sdx-621
jaylouisw:tool/issue-duplicate-sweep
jaylouisw:feat/device-mikrotik-rb433ah
jaylouisw:feat/hackgpon-ma5671a
jaylouisw:issues/categories-and-labels
jaylouisw:ci/run-every-suite-locally
jaylouisw:chore/http-smoke
No reviewers
Labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1598
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1116-0335"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1514
t.connect("sw","SFP+4","ap","wan",{mediaId:"1000base-t-sfp"})was refused:The module is the converter, which is why
CAGE_MEDIA["sfp+"]already listed1000base-t-sfpwhile the mating rule said the pair was impossible. The only way to draw the cable wasforce: true, recording a link the validator calls impossible.What changed
engine/media.js: newMODULE_FACE/MODULE_CAGES/moduleBridge(). A module with an RJ45 face (1000base-t-sfp) bridges ansfp/sfp+/sfp28/sfp56cage to anrj45port, but only where the cage's own media list offers that module.commonMedia()uses it,negotiateSpeed()returns the module rate for a bridged pair (the cage clocks the module, not the far cage) and refuses when a port cannot reach it, andcanMate()asks whether a module could bridge before returning the connector verdict, so a Fast-Ethernet-only peer getsE_NO_COMMON_MEDIAnaming the face instead of a connector lie.E_CONNECTOR_MISMATCH, same words), a fibre medium into an RJ45 socket.engine/validation.js:E_BIDI_SAME_WAVELENGTHandE_BIDI_MISMATCHwere emittable bycanMateand missing fromRULES; the property test only caught it now that this branch is reachable. Both documented, and the module answer is asked before the single-strand lecture.docs/CONNECTORS.mdsection 4.1 rewritten ("the one that is always correct" is not),docs/PHYSICAL_LAYER.mderror table gains the two BiDi codes.Verification
test/sfp-copper-module.test.js- 21 checks; 8 fail againstmain(the connect, both mediaId spellings, the link record, symmetry, the module rate, and the twocanMateface answers).test/sfp28-legacy.test.js(45) andtest/validation.test.js(22) re-stated in module terms: the connector refusal they pin is now the optics-only cage, and the bare1000base-tlead into a cage is stillE_MEDIA_NOT_SUPPORTED.test/link-options.test.js(26): a copper host can now also be reached through the SFP+ cage with a copper module, so the assertion is "every option is copper, and the plain RJ45 run is among them" rather than "exactly one option".node scripts/syntax-check.js334 files OK; fullnpm test: 264 suites, 9574 assertions, 0 failures.Same four-way collision as #1588 — see the analysis there.
mainalready carries amediaDeclared-gated copper-SFP rule from2c39a647(PR #1602); this branch's module-faces table bridges off the cage rather than off a declaration, so rebasing means replacing that rule. Left for Jay's decision.Closing as superseded: #1514 is already fixed on main by commit
2c39a647— A copper SFP in an SFP+ cage mates an RJ45 port (#1514) (#1602), merged 2026-11-16 04:40.Main now has, in
engine/media.js:copperSfpBridge(pa, pb)— when one cage isrj45/comboand the other is a module slot, it returns1000base-t-sfpinstead of nothing;commonMedia()calls it in the!cagesMate()branch, so the picker is offered the module again (the "possible media: none" gap is gone);portWithModule()+mediaDeclared— a caller-named copper module narrows the port's media, somediaIdis honoured without letting an optic into a socket with no room for it;engine/validation.jsandtest/copper-sfp-bridge.test.js(208 lines) cover the mating rule and the rate.Because main now carries a bridging rule in the same functions, every retry of #1514 conflicts in
engine/media.jsand nowhere else — that is why all three of these sat blocked. Closing rather than picking a winner: the issue is answered, and keeping three conflicting duplicates of one behaviour in the queue means nobody's CI tells them apart.The branch is left intact, not deleted. If this shape is preferred over main's, reopen or re-push it against current main as a replacement change and it can be judged on its own merits.
This branch's distinct shape: the mating rule plus
engine/validation.jsand docs (CONNECTORS.md,PHYSICAL_LAYER.md). Main's2c39a647already updatesvalidation.jsand itsCONNECTORS.md:241/PHYSICAL_LAYER.md:165describe1000base-t-sfpas the copper SFP module legal insfp/sfp+, so the prose landed with it.Pull request closed