diff --git a/CHANGELOG.md b/CHANGELOG.md index 16374ac..904642d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Changed +- VBA extractor comments now describe the behavior they guard, and the rule-table invariant also validates the procedure pre-walk so future drift fails loudly. (#215) - VBA classifiers now share one rule dispatcher with consistent scan modes, structural gates, counting, and declarative terminal behavior, preventing future rule tables from silently bypassing their documented preconditions. (#216) - VBA extraction now exposes only the classifier factories used by the shared source walker, removing obsolete compatibility entry points and other unused public helpers. (#217) diff --git a/__tests__/extraction-vba-rule-table.test.ts b/__tests__/extraction-vba-rule-table.test.ts index d69e2ac..d3269f6 100644 --- a/__tests__/extraction-vba-rule-table.test.ts +++ b/__tests__/extraction-vba-rule-table.test.ts @@ -17,4 +17,13 @@ describe('VBA rule-table validation', () => { empty: ['dims'], }); }); + + it('validates the procedures pre-walk rule table', () => { + const tables = { ...VBA_RULE_TABLES, procedures: [] }; + + expect(validateVbaRuleTables(tables)).toEqual({ + ok: false, + empty: ['procedures'], + }); + }); }); diff --git a/src/extraction/vba-extractor.ts b/src/extraction/vba-extractor.ts index 4763f92..d86673e 100644 --- a/src/extraction/vba-extractor.ts +++ b/src/extraction/vba-extractor.ts @@ -120,13 +120,12 @@ export const VBA_RULE_TABLES: Readonly