diff --git a/packages/api/src/db/queries.ts b/packages/api/src/db/queries.ts index 5e148e6..9cb8aec 100644 --- a/packages/api/src/db/queries.ts +++ b/packages/api/src/db/queries.ts @@ -346,6 +346,12 @@ export async function getFlexoptixSuggestions(switchId: string) { END AS vpat FROM switches s JOIN vendors v ON v.id = s.vendor_id WHERE s.id = $1 ), + gate AS ( + -- Hard gate: a switch only presents compatibility if its port config has + -- been verified against the manufacturer datasheet/source. Unverified = + -- no claim (return nothing) rather than show potentially-wrong data. + SELECT ports_verified FROM switches WHERE id = $1 + ), switch_ports AS ( -- Parse each ports_config key 'SPEED_FORMFACTOR' (e.g. '100G_QSFP28') into -- a numeric port speed (Gbps) + a cage family. Real transceivers are then @@ -415,6 +421,7 @@ export async function getFlexoptixSuggestions(switchId: string) { LIMIT 1 ) so ON true WHERE LOWER(v.name) = 'flexoptix' + AND (SELECT ports_verified FROM gate) IS TRUE -- Only parts confirmed in Flexoptix's live API catalog (have authoritative -- datasheet specs). Excludes phantom/misattributed parts not actually -- orderable from Flexoptix, and parts with no source-of-truth specs.