@@ -309,6 +309,30 @@ test('current-parameter matching is opt-in and ignores hidden or invalid fields'
309309 ) ;
310310} ) ;
311311
312+ test ( 'exact catalog matching skips assumed dimensions while custom matching preserves requested values' , ( ) => {
313+ const preset : Preset = {
314+ id : 'nominal-only' ,
315+ name : 'Nominal bore reference' ,
316+ description : 'Width is an editable prototype assumption.' ,
317+ parameters : { bore : 20 , width : 14 } ,
318+ catalog : { ...source , verifiedParameters : [ 'bore' ] } ,
319+ } ;
320+ const configurable = {
321+ ...part ( 'reference' , [ bore , width ] , [ preset ] ) ,
322+ defaults : { ...preset . parameters } ,
323+ presetMatchKeys : [ 'bore' , 'width' ] ,
324+ } ;
325+ for ( const values of [ preset . parameters , { ...preset . parameters } ] ) {
326+ const filters = seedCurrentFilters ( configurable , values ) ;
327+ assert . deepEqual ( filters . parameters [ boreId ] , { min : '20' , max : '20' } ) ;
328+ assert . equal ( filters . parameters [ fieldId ( width ) ] , undefined ) ;
329+ assert . equal ( filterPresets ( buildPresetIndex ( [ configurable ] ) , filters ) . items [ 0 ] . preset , preset ) ;
330+ }
331+ const custom = seedCurrentFilters ( configurable , { ...preset . parameters , width : 16 } ) ;
332+ assert . deepEqual ( custom . parameters [ fieldId ( width ) ] , { min : '16' , max : '16' } ) ;
333+ assert . equal ( filterPresets ( buildPresetIndex ( [ configurable ] ) , custom ) . items . length , 0 ) ;
334+ } ) ;
335+
312336test ( 'a hidden conditional parameter never matches an inactive preset feature' , ( ) => {
313337 const socket : ParameterDefinition = {
314338 key : 'socketDepth' ,
0 commit comments