Skip to content

Commit f29662e

Browse files
clay-goodclaude
andcommitted
fix(extract): read "has the same meaning as" statutory-import definitions
DEFINITION_MEANING_TAIL matched only the participle forms — `has the meaning given|set forth|ascribed|assigned|…`. The common statutory/GDPR-import idiom `"Controller" has the same meaning as in the GDPR` (and `… as set forth in the DPA`) has the adjective "same" before "meaning" and the connector "as", so the term went unregistered and STRUCT-006 falsely reported it as used-but-undefined. Added an optional `same` adjective and an `as (in|set|used|defined|…)` connector branch. Decoy guard: `has the same meaning` with no quoted subject (ordinary prose) still defines nothing. Zero golden churn (no corpus fixture uses this form). 2 regression tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 02cafde commit f29662e

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
**Vaulytica is the second pair of eyes you can cite.**
66

7-
`1,111 deterministic rules` · `20 cross-document checks` · `5 pre-disclosure checks` · `3 execution-readiness reconciliations` · `5 derived-deadline families` · `16 document sub-domains` · `88 state-law overlays (non-compete · security deposit · usury · will formalities)` · `10 export formats` · `0 servers` · `0 AI` · `5,838 passing tests` · `v9.41.0` · `MIT`
7+
`1,111 deterministic rules` · `20 cross-document checks` · `5 pre-disclosure checks` · `3 execution-readiness reconciliations` · `5 derived-deadline families` · `16 document sub-domains` · `88 state-law overlays (non-compete · security deposit · usury · will formalities)` · `10 export formats` · `0 servers` · `0 AI` · `5,840 passing tests` · `v9.41.0` · `MIT`
88

99
![Vaulytica landing page — "Drop legal docs. Get a report. Nothing leaves your browser."](docs/images/hero.png)
1010

@@ -1332,7 +1332,7 @@ npm run dev # open the printed URL
13321332
npm run build # static site → dist/
13331333
npm run typecheck # tsc --noEmit
13341334
npm run lint # eslint
1335-
npm run test # vitest — 5,838 tests, ~35s
1335+
npm run test # vitest — 5,840 tests, ~35s
13361336
npm run coverage # vitest + V8 coverage, enforces the regression floor
13371337
npm run accuracy # v5 Ground Truth harness → tools/accuracy/SCOREBOARD.md
13381338
npm run mutation # Stryker mutation score (scoped to extractors; slow, off the per-push path)

src/extract/definitions.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,30 @@ describe("meaning-by-reference definitions", () => {
551551
);
552552
expect(map.entries).toHaveLength(0);
553553
});
554+
555+
it("registers a term defined with 'has the same meaning as' (statutory import)", () => {
556+
const map = extractDefinitions(
557+
buildTree([
558+
"Definitions",
559+
'"Sensitive Data Category" has the same meaning as in the GDPR.',
560+
"Body",
561+
"The processor treats each Sensitive Data Category with heightened care.",
562+
"A Sensitive Data Category requires explicit consent.",
563+
]),
564+
);
565+
expect(map.entries.map((e) => e.term)).toContain("Sensitive Data Category");
566+
expect(map.undefined_capitalized.map((e) => e.term)).not.toContain("Sensitive Data Category");
567+
});
568+
569+
it("does not read 'has the same meaning' without a quoted subject as a definition", () => {
570+
const map = extractDefinitions(
571+
buildTree([
572+
"Body",
573+
"The word herein has the same meaning as it does in common usage everywhere.",
574+
]),
575+
);
576+
expect(map.entries).toHaveLength(0);
577+
});
554578
});
555579

556580
describe("construed-accordingly derivative terms", () => {

src/extract/definitions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,12 @@ const DEFINITION_TRAILING_PARENTHETICAL =
149149
* otherwise defined herein shall have the meaning given in the MSA")
150150
* contributes nothing — its subject is not a Title-Case term list.
151151
* The tail tolerates periods inside numeric citations (`45 CFR § 160.103`).
152+
* The `same` adjective + `as` connector cover the statutory-import idiom
153+
* `"Controller" has the same meaning as in the GDPR` / `… as set forth in
154+
* the DPA`, which the participle-only verb list missed.
152155
*/
153156
const DEFINITION_MEANING_TAIL =
154-
/\b(?:shall\s+|will\s+)?(?:each\s+)?ha(?:ve|s)\s+the\s+(?:respective\s+)?meanings?\s+(?:given|set\s+forth|set\s+out|ascribed|assigned|specified|defined|stated)\b(?:[^.;]|\.(?=\d))*/g;
157+
/\b(?:shall\s+|will\s+)?(?:each\s+)?ha(?:ve|s)\s+the\s+(?:respective\s+|same\s+)?meanings?\s+(?:given|set\s+forth|set\s+out|ascribed|assigned|specified|defined|stated|as\s+(?:in|set|used|defined|given|ascribed|specified|that))\b(?:[^.;]|\.(?=\d))*/g;
155158

156159
/**
157160
* The derivative-form convention: `"Processing" means …, and "Process" and

0 commit comments

Comments
 (0)