feat(audit): item-counting grammar to config, harness-gated (#6855 phase 1)#6906
feat(audit): item-counting grammar to config, harness-gated (#6855 phase 1)#6906chubes4 wants to merge 1 commit into
Conversation
…ed (#6855 phase 1 retry)
Homeboy Results —
|
|
Narrowed the +298: test files are being scanned that shouldn't beDrilled into the new CoreBoundaryLeak findings — they land on Yet I verified:
So something about the migration causes the walker/detector to no longer treat these as test paths at runtime, even though no test-path code or config changed. This is a genuinely subtle runtime coupling that needs the actual audit binary traced against the real repo to pin — static inspection has been exhausted. Reinforces the recommendation: the regression harness must audit the real repository tree so this fails locally and is debuggable. Stopping autonomous attempts here pending that harness upgrade. |
|
Closing as superseded by #6915, which is the current grammar phase 1 draft. |
Retry of #6896 gated by the new runtime audit regression harness (#6903).
Extracts structural.rs item counting into config-driven
LanguageGrammar. Extends the fixture to cover symbol-graph / cross-reference detectors (the ones #6896 broke) and asserts the live audit finding set is IDENTICAL before/after.Scope (tight — learned from #6896)
structural.rs::count_top_level_itemscounts items.enum Language,symbol_graph,import_matching,field_patterns,edit_op_applyuntouched.AuditConfig::is_empty()semantics UNCHANGED —language_grammarsis deliberately NOT added tois_empty()(suspected contributor to feat(audit): extract item-counting grammar to config (#6855 phase 1) #6896's regression; documented inline).What moved
LanguageGrammarconfig (file_extensions,item_declaration_prefixes,visibility_prefixes,modifier_prefixes,ignore_after_line_equals) + genericcount_items.AuditConfig.language_grammarsfield (#[serde(default, skip_serializing_if = "Vec::is_empty")]) + merge.structural.rsnow applies grammar generically — ZERO language keyword literals in detector code; deletedcount_rust_items/count_php_items/count_js_items/is_rust_item_declaration.descriptor_runtime.rsonly.homeboy.jsonand the realhomeboy.jsonso counts are preserved.Harness gate
tests/fixtures/audit_runtimewithexports.rs/consumer.rsto exercise cross-file symbol resolution (a referenced export is suppressed; orphaned exports surface).EXPECTED_FINDINGSnow covers structural AND symbol-graph.cargo test --lib audit_runtime_regressionpasses with the finding set IDENTICAL before/after the migration — the feat(audit): extract item-counting grammar to config (#6855 phase 1) #6896 break does not reproduce.cargo test --lib structural(24 tests incl. parity) green;cargo build --lib --testsclean.