A copper SFP is the converter: name the module and the SFP+ cage reaches an RJ45 port (#1514) #1588
Closed
jaylouisw
wants to merge 1 commit from
fix/1116-0235 into main
pull from: fix/1116-0235
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!1588
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1116-0235"
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
canMate()refused an SFP+ cage against an RJ45 port even when the caller declaredmediaId: '1000base-t-sfp'- the copper module whose far side is an RJ45 socket - and the refusal ended atpossible media: nonewith the answer sitting in the cage's own media list.Socket geometry and the module are two different facts.
CAGE_MATEstill says no RJ45 plug enters an SFP+ slot, because that is true, socable-matrixis unchanged. What was missing is that a cage cannot say which module is fitted, so the pair is legal exactly when the link names the copper module - the same reason a BiDi half has to be named.copperModuleBridge()is that rule, asked of the cage's own media table so the two cannot drift.connect(..., { mediaId: '1000base-t-sfp' })builds the run, records the module as the cable and runs at 1G; a ping crosses it.suggestion: { code: 'S_COPPER_MODULE_REQUIRED', field: 'mediaId', value: '1000base-t-sfp' }instead of a dead end.mediaOptions()offers the module for the pair rather than an empty list.test/copper-sfp-cage.test.js: 17 assertions. Full suite: 264 suites, 9565 assertions, 0 failed.scripts/syntax-check.js: 334 files OK.Not done here: the canvas drag path still blocks before the medium picker, so the GUI cannot declare a module yet - the refusal now tells the user the field and value, but a one-click 'apply the copper module' affordance (like the hybrid-cord offer) is a UI change I left for Jay.
`canMate()` refused an SFP+ cage against an RJ45 port even when the caller declared `mediaId: '1000base-t-sfp'` - the copper module whose far side IS an RJ45 socket - and the refusal ended at "possible media: none" with the answer sitting in the cage's own media list. Socket geometry and the module are two different facts. `CAGE_MATE` still says no RJ45 plug enters an SFP+ slot, because that is true. What was missing is that a cage cannot say which module is fitted, so the pair is legal exactly when the link names the copper module, the way a BiDi half has to be named for the same reason. `copperModuleBridge()` is that rule, asked of the cage's own media table so it cannot drift from it. Consequences: - `connect(..., { mediaId: '1000base-t-sfp' })` builds the run, records the module as the cable and runs it at 1G; a ping crosses it. - declaring a fibre module does not turn it into a converter: 10GBASE-SR against an RJ45 port is still refused. - without the module the refusal now names it and the field, and carries `suggestion: { code: 'S_COPPER_MODULE_REQUIRED', field: 'mediaId', value: '1000base-t-sfp' }` instead of a dead end. - `mediaOptions()` offers the module for the pair rather than an empty list. test/copper-sfp-cage.test.js: 17 assertions. Full suite: 264 suites, 9565 assertions, 0 failed.e0b88407bd3122772aaeThis branch conflicts with
main, so it was not rebased:A conflict is a decision about behaviour rather than a mechanical fix, so this is left for a human. Rebasing by hand and force-pushing will let the automation pick it up again.
Needs Jay's decision — this is a four-way answer to one issue (#1514), not a merge problem.
mainalready answers #1514:2c39a647(PR #1602, merged 04:40 today) addedcopperSfpModuleOf()inengine/media.jsand gated it onmediaDeclared, i.e. a copper SFP only converts the cage to RJ45 when the port says the module is fitted (media/supportedMediadeclares it) and the cage can hold that module.test/copper-sfp-bridge.test.js(208 lines) pins that rule.Three open PRs implement the same feature a different way, and none of them uses
mediaDeclared:COPPER_MODULE_MEDIA+cageTakesCopperModule(); also touchesengine/topology.js. Conflicts inengine/media.js.farEnd: 'rj45'to the media table +moduleBridgedMedia(); 9 files, 345/-46. Conflicts inengine/media.js(identical hunk region).module facestable; 8 files, 322/-13. Conflicts inengine/media.js(identical hunk region).All three conflict in the same hunk of
engine/media.jsthat #1602 now occupies, and their gates are looser than #1602's: they bridge off the cage's contents rather than off a declaration, so rebasing any of them means replacing a rule Jay just landed, which I will not guess at.Decision required: keep #1602's declaration-gated rule and close the three as superseded, or name the one whose semantics should win and I will rebase that one on top of #1602. I have verified main's suite is green (
copper-sfp-bridgeincluded) and that no PR here referencesmediaDeclared. Nothing has been rebased or merged.Same note posted on #1594 and #1598.
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:
media.copperModuleBridge+ aCOPPER_MODULE_MEDIAconstant, plus threading{ mediaId: opts.mediaId }through theengine/topology.jscanMatefallback and injecting the module intocommonMedia's result in the picker. Main folded the same two effects intocopperSfpBridge/commonMedia/portWithModulewith no topology signature change, so thetopology.jshalf here is the real difference — worth a fresh look only if the UI needs the module injected at the topology layer rather than resolved inmedia.js.Pull request closed