@@ -24,7 +24,7 @@ pub struct FieldSpec {
2424/// the insertion order within each section.
2525pub const SYNCABLE_FIELDS : & [ FieldSpec ] = & [
2626 // =========================================================================
27- // [unify] section - 16 fields
27+ // [unify] section - 18 fields
2828 // =========================================================================
2929 FieldSpec {
3030 section : "unify" ,
@@ -116,6 +116,18 @@ pub const SYNCABLE_FIELDS: &[FieldSpec] = &[
116116 default_toml : "true" ,
117117 comment : "Auto-remove unused deps (default: true)" ,
118118 } ,
119+ FieldSpec {
120+ section : "unify" ,
121+ key : "detect_undeclared_features" ,
122+ default_toml : "true" ,
123+ comment : "Detect features borrowed via Cargo unification (default: true)" ,
124+ } ,
125+ FieldSpec {
126+ section : "unify" ,
127+ key : "fix_undeclared_features" ,
128+ default_toml : "true" ,
129+ comment : "Auto-fix borrowed features (default: true)" ,
130+ } ,
119131 FieldSpec {
120132 section : "unify" ,
121133 key : "max_backups" ,
@@ -252,7 +264,7 @@ mod tests {
252264 #[ test]
253265 fn test_fields_for_section ( ) {
254266 let unify_fields: Vec < _ > = fields_for_section ( "unify" ) . collect ( ) ;
255- assert_eq ! ( unify_fields. len( ) , 16 ) ;
267+ assert_eq ! ( unify_fields. len( ) , 18 ) ; // 16 + detect_undeclared_features + fix_undeclared_features
256268 assert ! ( unify_fields. iter( ) . all( |f| f. section == "unify" ) ) ;
257269
258270 let release_fields: Vec < _ > = fields_for_section ( "release" ) . collect ( ) ;
@@ -268,15 +280,15 @@ mod tests {
268280 // Update this count when adding new fields
269281 assert_eq ! (
270282 SYNCABLE_FIELDS . len( ) ,
271- 27 , // 16 unify + 10 release + 1 change-detection
283+ 29 , // 18 unify + 10 release + 1 change-detection
272284 "Total syncable fields count changed - update this test if intentional"
273285 ) ;
274286 }
275287
276288 /// This test documents which config sections are syncable vs user-configured.
277289 ///
278290 /// SYNCABLE (auto-added by `config sync`):
279- /// - [unify] - 16 fields: workspace-wide dependency unification settings
291+ /// - [unify] - 18 fields: workspace-wide dependency unification settings
280292 /// - [release] - 10 fields: workspace-wide release settings
281293 /// - [change-detection] - 1 field: infrastructure patterns (custom is user-defined)
282294 ///
@@ -310,6 +322,8 @@ mod tests {
310322 assert ! ( field_keys. contains( & ( "unify" , "prune_dead_features" ) ) ) ;
311323 assert ! ( field_keys. contains( & ( "unify" , "preserve_features" ) ) ) ;
312324 assert ! ( field_keys. contains( & ( "unify" , "detect_unused" ) ) ) ;
325+ assert ! ( field_keys. contains( & ( "unify" , "detect_undeclared_features" ) ) ) ;
326+ assert ! ( field_keys. contains( & ( "unify" , "fix_undeclared_features" ) ) ) ;
313327
314328 // [release] critical fields
315329 assert ! ( field_keys. contains( & ( "release" , "tag_format" ) ) ) ;
0 commit comments