From 6a3d24d74faeb57d411fe2282844c28360c19f8c Mon Sep 17 00:00:00 2001 From: colbymchenry Date: Tue, 21 Jul 2026 21:48:19 +0200 Subject: [PATCH 1/2] test(vba): require procedures rule-table validation --- __tests__/extraction-vba-rule-table.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) 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'], + }); + }); }); From 26d801753bc3ea2d2e5be2f7af500e83e505a201 Mon Sep 17 00:00:00 2001 From: colbymchenry Date: Tue, 21 Jul 2026 21:50:44 +0200 Subject: [PATCH 2/2] docs(vba): align comments with extractor behavior --- CHANGELOG.md | 1 + src/extraction/vba-extractor.ts | 9 ++++----- src/extraction/vba-preprocess.ts | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) 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/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