@mergesignal/shared 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"deriveScanNarrative.d.ts","sourceRoot":"","sources":["../src/deriveScanNarrative.ts"],"names":[],"mappings":"AAMA,OAAO,EAaL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAKV,UAAU,EACX,MAAM,YAAY,CAAC;AAgapB;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACpC,kBAAkB,CAsGpB"}
1
+ {"version":3,"file":"deriveScanNarrative.d.ts","sourceRoot":"","sources":["../src/deriveScanNarrative.ts"],"names":[],"mappings":"AAOA,OAAO,EAaL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAKV,UAAU,EACX,MAAM,YAAY,CAAC;AAsbpB;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACpC,kBAAkB,CAuGpB"}
@@ -1,5 +1,6 @@
1
1
  import { extractRepositoryContextFacts } from "./extractRepositoryContextFacts.js";
2
2
  import { readBlastLevel, safeParseRepoIntelligence, } from "./repoIntelligenceSchema.js";
3
+ import { isRuntimeNarrativeSafe } from "./repoIntelligenceSemantics.js";
3
4
  import { EMPTY_SCAN_NARRATIVE_FACTS, NARRATIVE_FACT_MAX_AREAS, NARRATIVE_FACT_MAX_HOTSPOTS, NARRATIVE_FACT_MAX_PATHS, } from "./scanNarrativeFacts.js";
4
5
  import { mergePostureFromDecision } from "./riskVocabulary.js";
5
6
  import { selectTopAffectedAreas } from "./selectTopAffectedAreas.js";
@@ -130,8 +131,12 @@ function extractTier1FromRepoIntelligence(ri, changed) {
130
131
  const packageUsage = collectPackageUsageForChanged(ri, changed);
131
132
  const frameworks = collectFrameworks(ri);
132
133
  const paths = allUsagePaths(packageUsage);
133
- const runtimeKind = pkgIntel?.runtimeSurface ?? null;
134
- const reachKind = pkgIntel?.reachability ?? null;
134
+ const suppressRuntime = pkgIntel?.suppressRuntimeNarrative === true;
135
+ const narrativeSafe = isRuntimeNarrativeSafe(pkgIntel);
136
+ const runtimeKind = narrativeSafe && !suppressRuntime
137
+ ? (pkgIntel?.runtimeSurface ?? null)
138
+ : null;
139
+ const reachKind = narrativeSafe && !suppressRuntime ? (pkgIntel?.reachability ?? null) : null;
135
140
  const runtimeSurface = runtimeKind != null
136
141
  ? {
137
142
  kind: runtimeKind,
@@ -150,6 +155,14 @@ function extractTier1FromRepoIntelligence(ri, changed) {
150
155
  },
151
156
  }
152
157
  : null;
158
+ const packageSemantics = pkgIntel
159
+ ? {
160
+ runtimeImpact: pkgIntel.runtimeImpact ?? null,
161
+ expectedImpact: pkgIntel.expectedImpact ?? null,
162
+ suppressRuntimeNarrative: suppressRuntime,
163
+ verificationFocus: pkgIntel.verificationFocus ?? [],
164
+ }
165
+ : null;
153
166
  const blastFromRi = ri.blastRadius;
154
167
  const blastLevel = readBlastLevel(blastFromRi?.level) ??
155
168
  (changed.all.length > 0
@@ -181,6 +194,7 @@ function extractTier1FromRepoIntelligence(ri, changed) {
181
194
  frameworks,
182
195
  runtimeSurface,
183
196
  reachability,
197
+ packageSemantics,
184
198
  blastRadius,
185
199
  affectedAreas: affectedAreas.slice(0, NARRATIVE_FACT_MAX_AREAS),
186
200
  hotspots: codeHotspots.slice(0, NARRATIVE_FACT_MAX_HOTSPOTS),
@@ -191,6 +205,7 @@ function hasMeaningfulTier1(tier1) {
191
205
  tier1.frameworks.length > 0 ||
192
206
  tier1.runtimeSurface != null ||
193
207
  tier1.reachability != null ||
208
+ tier1.packageSemantics?.expectedImpact != null ||
194
209
  tier1.blastRadius != null ||
195
210
  tier1.affectedAreas.length > 0 ||
196
211
  tier1.hotspots.length > 0);
@@ -271,6 +286,7 @@ function emptyTier1Blocks() {
271
286
  frameworks: [],
272
287
  runtimeSurface: null,
273
288
  reachability: null,
289
+ packageSemantics: null,
274
290
  blastRadius: null,
275
291
  affectedAreas: [],
276
292
  hotspots: [],
@@ -369,6 +385,7 @@ export function deriveScanNarrative(result) {
369
385
  frameworks: tier1Blocks.frameworks,
370
386
  runtimeSurface: tier1Blocks.runtimeSurface,
371
387
  reachability: tier1Blocks.reachability,
388
+ packageSemantics: tier1Blocks.packageSemantics,
372
389
  blastRadius: tier1Blocks.blastRadius,
373
390
  affectedAreas,
374
391
  hotspots: tier1Blocks.hotspots,
@@ -112,7 +112,7 @@ describe("deriveScanNarrative", () => {
112
112
  expect(facts.repositoryContext.length).toBeGreaterThan(0);
113
113
  expect(facts.repositoryContext[0]?.family).toBe("transitive_volume");
114
114
  });
115
- it("populates build-only runtime surface from repoIntelligence", () => {
115
+ it("populates tooling semantics without runtime surface chips for typescript", () => {
116
116
  const result = {
117
117
  ...baseResult,
118
118
  changedPackages: ["typescript"],
@@ -121,8 +121,11 @@ describe("deriveScanNarrative", () => {
121
121
  };
122
122
  const facts = deriveScanNarrative(result);
123
123
  expect(facts.availability.mode).toBe("pr_intelligence");
124
- expect(facts.runtimeSurface?.kind).toBe("build");
125
- expect(facts.reachability?.kind).toBe("build_only");
124
+ expect(facts.runtimeSurface).toBeNull();
125
+ expect(facts.reachability).toBeNull();
126
+ expect(facts.packageSemantics?.runtimeImpact).toBe("none");
127
+ expect(facts.packageSemantics?.expectedImpact).toBe("typecheck");
128
+ expect(facts.packageSemantics?.suppressRuntimeNarrative).toBe(true);
126
129
  expect(facts.blastRadius?.level).toBe("narrow");
127
130
  });
128
131
  it("extracts packageUsage for all changed packages with blast factors and frameworks", () => {
@@ -1 +1 @@
1
- {"version":3,"file":"repoIntelligenceFixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/repoIntelligenceFixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,iEAAiE;AACjE,eAAO,MAAM,8BAA8B,EAAE,gBAmC5C,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,iCAAiC,EAAE,gBAc/C,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,mCAAmC,EAAE,gBAgDjD,CAAC"}
1
+ {"version":3,"file":"repoIntelligenceFixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/repoIntelligenceFixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,iEAAiE;AACjE,eAAO,MAAM,8BAA8B,EAAE,gBAyC5C,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,iCAAiC,EAAE,gBAqB/C,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,mCAAmC,EAAE,gBAgDjD,CAAC"}
@@ -4,6 +4,12 @@ export const fixtureRepoIntelligenceFastify = {
4
4
  fastify: {
5
5
  runtimeSurface: "runtime",
6
6
  reachability: "on_runtime_paths",
7
+ runtimeImpact: "confirmed",
8
+ expectedImpact: "runtime",
9
+ evidenceStrength: "high",
10
+ suppressRuntimeNarrative: false,
11
+ dependencyClass: "runtime",
12
+ packageRole: "http_framework",
7
13
  usage: {
8
14
  packageName: "fastify",
9
15
  files: [
@@ -41,6 +47,13 @@ export const fixtureRepoIntelligenceTypescript = {
41
47
  typescript: {
42
48
  runtimeSurface: "build",
43
49
  reachability: "build_only",
50
+ runtimeImpact: "none",
51
+ expectedImpact: "typecheck",
52
+ evidenceStrength: "medium",
53
+ suppressRuntimeNarrative: true,
54
+ dependencyClass: "tooling",
55
+ packageRole: "typechecker",
56
+ verificationFocus: ["ci", "typecheck"],
44
57
  usage: {
45
58
  packageName: "typescript",
46
59
  files: ["tsconfig.json"],
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from "./deriveCardDisplaySummary.js";
14
14
  export * from "./scanNarrativeFacts.js";
15
15
  export * from "./repoIntelligenceSchema.js";
16
16
  export * from "./repoIntelligenceMappers.js";
17
+ export * from "./repoIntelligenceSemantics.js";
17
18
  export * from "./repoIntelligenceValidation.js";
18
19
  export * from "./deriveScanNarrative.js";
19
20
  export * from "./extractRepositoryContextFacts.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EACL,wCAAwC,EACxC,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EACL,wCAAwC,EACxC,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ export * from "./deriveCardDisplaySummary.js";
14
14
  export * from "./scanNarrativeFacts.js";
15
15
  export * from "./repoIntelligenceSchema.js";
16
16
  export * from "./repoIntelligenceMappers.js";
17
+ export * from "./repoIntelligenceSemantics.js";
17
18
  export * from "./repoIntelligenceValidation.js";
18
19
  export * from "./deriveScanNarrative.js";
19
20
  export * from "./extractRepositoryContextFacts.js";
@@ -1 +1 @@
1
- {"version":3,"file":"narrativePresentation.d.ts","sourceRoot":"","sources":["../src/narrativePresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,kBAAkB,GACxB,MAAM,GAAG,IAAI,CAEf;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,kBAAkB,EACzB,QAAQ,SAAI,GACX,MAAM,GAAG,IAAI,CAQf;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,kBAAkB,GACxB,MAAM,EAAE,CAEV;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE,4BAAiC,GACzC,mBAAmB,GAAG,IAAI,CA6B5B;AAED,iBAAS,mBAAmB,CAAC,KAAK,EAAE,kBAAk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AU,SAAI,GACb,MAAM,GAAG,IAAI,CAQf;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,kBAAkB,EACzB,GAAG,SAAI,GACN,MAAM,GAAG,IAAI,CAKf;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/D,MAAM,GAAG,IAAI,CAgCf;AAED,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -147,12 +147,15 @@ export function formatFrameworksSummary(facts, max = 2) {
147
147
  }
148
148
  export function composeContextLineFromFacts(facts, options = {}) {
149
149
  const parts = [];
150
- const runtime = labelRuntimeSurface(facts);
151
- const reach = summarizeReachability(facts, options.includePathSample ? 1 : 0);
150
+ const suppressRuntime = facts.packageSemantics?.suppressRuntimeNarrative === true;
151
+ const runtime = suppressRuntime ? null : labelRuntimeSurface(facts);
152
+ const reach = suppressRuntime
153
+ ? null
154
+ : summarizeReachability(facts, options.includePathSample ? 1 : 0);
152
155
  const blast = labelBlastRadiusLevel(facts);
153
156
  if (runtime)
154
157
  parts.push(runtime);
155
- if (reach.kindLabel) {
158
+ if (reach?.kindLabel) {
156
159
  if (options.includePathSample && reach.pathSamples[0]) {
157
160
  parts.push(`${reach.kindLabel} (${reach.pathSamples[0]})`);
158
161
  }
@@ -1 +1 @@
1
- {"version":3,"file":"derivePresentationProfile.d.ts","sourceRoot":"","sources":["../../../src/presentation/profile/derivePresentationProfile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,KAAK,gCAAgC,GAAG;IACtC,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AA+FF,8DAA8D;AAC9D,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,kBAAkB,EACzB,GAAG,EAAE,gCAAgC,GACpC,mBAAmB,GAAG,IAAI,CAsB5B"}
1
+ {"version":3,"file":"derivePresentationProfile.d.ts","sourceRoot":"","sources":["../../../src/presentation/profile/derivePresentationProfile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,KAAK,gCAAgC,GAAG;IACtC,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAyGF,8DAA8D;AAC9D,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,kBAAkB,EACzB,GAAG,EAAE,gCAAgC,GACpC,mBAAmB,GAAG,IAAI,CAsB5B"}
@@ -35,7 +35,9 @@ function deriveDensity(facts, priority) {
35
35
  if (priority === "limited") {
36
36
  return hasHighSeverityFindings(facts) ? "standard" : "minimal";
37
37
  }
38
- const runtime = facts.runtimeSurface?.kind === "runtime";
38
+ const semantics = facts.packageSemantics;
39
+ const runtime = facts.runtimeSurface?.kind === "runtime" ||
40
+ semantics?.runtimeImpact === "confirmed";
39
41
  const wideOrModerate = facts.blastRadius?.level === "wide" ||
40
42
  facts.blastRadius?.level === "moderate";
41
43
  const hasAreas = facts.affectedAreas.length > 0;
@@ -43,7 +45,13 @@ function deriveDensity(facts, priority) {
43
45
  if (runtime && (wideOrModerate || hasAreas || hasRuntimePaths)) {
44
46
  return "rich";
45
47
  }
46
- const buildOnly = facts.runtimeSurface?.kind === "build" ||
48
+ const toolingImpact = semantics?.expectedImpact === "typecheck" ||
49
+ semantics?.expectedImpact === "development_only" ||
50
+ semantics?.expectedImpact === "test_time" ||
51
+ semantics?.expectedImpact === "build_time";
52
+ const buildOnly = semantics?.suppressRuntimeNarrative === true ||
53
+ toolingImpact ||
54
+ facts.runtimeSurface?.kind === "build" ||
47
55
  facts.reachability?.kind === "build_only";
48
56
  const narrowBlast = !facts.blastRadius || facts.blastRadius.level === "narrow";
49
57
  if (buildOnly && narrowBlast && !hasAreas) {
@@ -1 +1 @@
1
- {"version":3,"file":"repoIntelligenceMappers.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceMappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAEpE,mDAAmD;AACnD,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhF,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;AAE/E,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,sBAAsB,GAC5B,gBAAgB,CAalB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,oBAAoB,GAC5B,kBAAkB,CAapB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,MAAM,EAAE,wBAAwB,CAAC;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,oBAAoB,CAAC;CACvC,GAAG,gBAAgB,CAwBnB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpD"}
1
+ {"version":3,"file":"repoIntelligenceMappers.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceMappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAEpE,mDAAmD;AACnD,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhF,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;AAE/E,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,sBAAsB,GAC5B,gBAAgB,CAalB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,oBAAoB,GAC5B,kBAAkB,CAapB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,MAAM,EAAE,wBAAwB,CAAC;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,oBAAoB,CAAC;CACvC,GAAG,gBAAgB,CAgCnB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpD"}
@@ -48,7 +48,14 @@ export function mapReachabilityKind(input) {
48
48
  return "unreachable";
49
49
  }
50
50
  if (bucket === "moderate" || bucket === "high") {
51
- return "on_runtime_paths";
51
+ if (dominantSurface === "test")
52
+ return "test_only";
53
+ if (dominantSurface === "build" ||
54
+ dominantSurface === "dev" ||
55
+ dominantSurface === "ci") {
56
+ return "build_only";
57
+ }
58
+ return "unknown";
52
59
  }
53
60
  return "unknown";
54
61
  }
@@ -9,7 +9,7 @@ import { z } from "zod";
9
9
  import type { ScanResult } from "./types.js";
10
10
  import type { BlastRadiusLevel } from "./scanNarrativeFacts.js";
11
11
  /** Bump when wire schema changes incompatibly. */
12
- export declare const REPO_INTELLIGENCE_ABI: "1";
12
+ export declare const REPO_INTELLIGENCE_ABI: "2";
13
13
  /** Strict canonical wire schema — single source of truth. */
14
14
  export declare const repoIntelligenceWireSchema: z.ZodObject<{
15
15
  packages: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -34,6 +34,73 @@ export declare const repoIntelligenceWireSchema: z.ZodObject<{
34
34
  areas: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
35
  }, z.core.$strip>;
36
36
  areas: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ dependencyClass: z.ZodOptional<z.ZodEnum<{
38
+ unknown: "unknown";
39
+ runtime: "runtime";
40
+ build: "build";
41
+ test: "test";
42
+ format: "format";
43
+ tooling: "tooling";
44
+ lint: "lint";
45
+ ci: "ci";
46
+ }>>;
47
+ packageRole: z.ZodOptional<z.ZodEnum<{
48
+ unknown: "unknown";
49
+ typechecker: "typechecker";
50
+ compiler: "compiler";
51
+ bundler: "bundler";
52
+ linter: "linter";
53
+ formatter: "formatter";
54
+ test_runner: "test_runner";
55
+ http_framework: "http_framework";
56
+ auth: "auth";
57
+ queue: "queue";
58
+ orm: "orm";
59
+ }>>;
60
+ lockfileKind: z.ZodOptional<z.ZodEnum<{
61
+ unknown: "unknown";
62
+ optional: "optional";
63
+ production: "production";
64
+ development: "development";
65
+ }>>;
66
+ runtimeImpact: z.ZodOptional<z.ZodEnum<{
67
+ unknown: "unknown";
68
+ confirmed: "confirmed";
69
+ none: "none";
70
+ possible: "possible";
71
+ }>>;
72
+ expectedImpact: z.ZodOptional<z.ZodEnum<{
73
+ unknown: "unknown";
74
+ runtime: "runtime";
75
+ build_time: "build_time";
76
+ typecheck: "typecheck";
77
+ test_time: "test_time";
78
+ development_only: "development_only";
79
+ }>>;
80
+ evidenceStrength: z.ZodOptional<z.ZodEnum<{
81
+ low: "low";
82
+ medium: "medium";
83
+ high: "high";
84
+ }>>;
85
+ confidenceReason: z.ZodOptional<z.ZodString>;
86
+ verificationFocus: z.ZodOptional<z.ZodArray<z.ZodString>>;
87
+ suppressRuntimeNarrative: z.ZodOptional<z.ZodBoolean>;
88
+ classificationProvenance: z.ZodOptional<z.ZodObject<{
89
+ dependencyClass: z.ZodEnum<{
90
+ unknown: "unknown";
91
+ graph: "graph";
92
+ registry: "registry";
93
+ lockfile: "lockfile";
94
+ heuristic: "heuristic";
95
+ }>;
96
+ packageRole: z.ZodEnum<{
97
+ unknown: "unknown";
98
+ graph: "graph";
99
+ registry: "registry";
100
+ heuristic: "heuristic";
101
+ }>;
102
+ registryEntryId: z.ZodOptional<z.ZodString>;
103
+ }, z.core.$strip>>;
37
104
  }, z.core.$strip>>;
38
105
  packageUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
106
  packageName: z.ZodString;
@@ -69,6 +136,13 @@ export declare const repoIntelligenceWireSchema: z.ZodObject<{
69
136
  paths: z.ZodArray<z.ZodString>;
70
137
  }, z.core.$strip>>>;
71
138
  frameworks: z.ZodOptional<z.ZodArray<z.ZodString>>;
139
+ semanticDiagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
140
+ packageName: z.ZodString;
141
+ ruleId: z.ZodString;
142
+ before: z.ZodRecord<z.ZodString, z.ZodUnknown>;
143
+ after: z.ZodRecord<z.ZodString, z.ZodUnknown>;
144
+ reason: z.ZodString;
145
+ }, z.core.$strip>>>;
72
146
  }, z.core.$strip>;
73
147
  export type RepoIntelligence = z.infer<typeof repoIntelligenceWireSchema>;
74
148
  export type ParseRepoIntelligenceSuccess = {
@@ -1 +1 @@
1
- {"version":3,"file":"repoIntelligenceSchema.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceSchema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO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ema changes incompatibly. */
10
- export const REPO_INTELLIGENCE_ABI = "1";
10
+ export const REPO_INTELLIGENCE_ABI = "2";
11
11
  const surfaceKindSchema = z.enum(["runtime", "build", "test", "unknown"]);
12
12
  const reachabilityKindSchema = z.enum([
13
13
  "on_runtime_paths",
@@ -24,11 +24,83 @@ const packageUsageWireSchema = z.object({
24
24
  criticalPaths: z.array(z.string()).optional(),
25
25
  areas: z.array(z.string()).optional(),
26
26
  });
27
+ const dependencyClassSchema = z.enum([
28
+ "runtime",
29
+ "tooling",
30
+ "test",
31
+ "lint",
32
+ "format",
33
+ "build",
34
+ "ci",
35
+ "unknown",
36
+ ]);
37
+ const packageRoleSchema = z.enum([
38
+ "typechecker",
39
+ "compiler",
40
+ "bundler",
41
+ "linter",
42
+ "formatter",
43
+ "test_runner",
44
+ "http_framework",
45
+ "auth",
46
+ "queue",
47
+ "orm",
48
+ "unknown",
49
+ ]);
50
+ const lockfileKindSchema = z.enum([
51
+ "production",
52
+ "development",
53
+ "optional",
54
+ "unknown",
55
+ ]);
56
+ const runtimeImpactSchema = z.enum([
57
+ "none",
58
+ "possible",
59
+ "confirmed",
60
+ "unknown",
61
+ ]);
62
+ const expectedImpactSchema = z.enum([
63
+ "runtime",
64
+ "build_time",
65
+ "typecheck",
66
+ "test_time",
67
+ "development_only",
68
+ "unknown",
69
+ ]);
70
+ const evidenceStrengthSchema = z.enum(["high", "medium", "low"]);
71
+ const classificationProvenanceSchema = z.object({
72
+ dependencyClass: z.enum([
73
+ "registry",
74
+ "graph",
75
+ "lockfile",
76
+ "heuristic",
77
+ "unknown",
78
+ ]),
79
+ packageRole: z.enum(["registry", "graph", "heuristic", "unknown"]),
80
+ registryEntryId: z.string().optional(),
81
+ });
82
+ const semanticDiagnosticSchema = z.object({
83
+ packageName: z.string().min(1),
84
+ ruleId: z.string().min(1),
85
+ before: z.record(z.string(), z.unknown()),
86
+ after: z.record(z.string(), z.unknown()),
87
+ reason: z.string().min(1),
88
+ });
27
89
  const packageIntelWireSchema = z.object({
28
90
  runtimeSurface: surfaceKindSchema,
29
91
  reachability: reachabilityKindSchema,
30
92
  usage: packageUsageWireSchema,
31
93
  areas: z.array(z.string()).optional(),
94
+ dependencyClass: dependencyClassSchema.optional(),
95
+ packageRole: packageRoleSchema.optional(),
96
+ lockfileKind: lockfileKindSchema.optional(),
97
+ runtimeImpact: runtimeImpactSchema.optional(),
98
+ expectedImpact: expectedImpactSchema.optional(),
99
+ evidenceStrength: evidenceStrengthSchema.optional(),
100
+ confidenceReason: z.string().optional(),
101
+ verificationFocus: z.array(z.string()).optional(),
102
+ suppressRuntimeNarrative: z.boolean().optional(),
103
+ classificationProvenance: classificationProvenanceSchema.optional(),
32
104
  });
33
105
  const areaSchema = z.object({
34
106
  id: z.string().min(1),
@@ -54,6 +126,7 @@ export const repoIntelligenceWireSchema = z.object({
54
126
  affectedAreas: z.array(areaSchema).optional(),
55
127
  hotspots: z.array(hotspotWireSchema).optional(),
56
128
  frameworks: z.array(z.string().min(1)).optional(),
129
+ semanticDiagnostics: z.array(semanticDiagnosticSchema).optional(),
57
130
  });
58
131
  function formatZodIssues(error) {
59
132
  return error.issues.map((i) => `${i.path.join(".") || "(root)"}: ${i.message}`);
@@ -0,0 +1,29 @@
1
+ import type { RepoIntelligence } from "./repoIntelligenceSchema.js";
2
+ export type DependencyClass = "runtime" | "tooling" | "test" | "lint" | "format" | "build" | "ci" | "unknown";
3
+ export type PackageRole = "typechecker" | "compiler" | "bundler" | "linter" | "formatter" | "test_runner" | "http_framework" | "auth" | "queue" | "orm" | "unknown";
4
+ export type LockfileKind = "production" | "development" | "optional" | "unknown";
5
+ export type RuntimeImpact = "none" | "possible" | "confirmed" | "unknown";
6
+ export type ExpectedImpact = "runtime" | "build_time" | "typecheck" | "test_time" | "development_only" | "unknown";
7
+ export type EvidenceStrength = "high" | "medium" | "low";
8
+ export type ClassificationSource = "registry" | "graph" | "lockfile" | "heuristic" | "unknown";
9
+ export type SemanticDiagnostic = {
10
+ packageName: string;
11
+ ruleId: string;
12
+ before: Record<string, unknown>;
13
+ after: Record<string, unknown>;
14
+ reason: string;
15
+ };
16
+ export type SanitizeRepoIntelligenceResult = {
17
+ wire: RepoIntelligence;
18
+ diagnostics: SemanticDiagnostic[];
19
+ degradedPackages: string[];
20
+ };
21
+ type PackageRow = RepoIntelligence["packages"][string];
22
+ /**
23
+ * Hard gate: normalize contradictory package intelligence before wire emit.
24
+ */
25
+ export declare function sanitizeRepoIntelligenceSemantics(draft: RepoIntelligence): SanitizeRepoIntelligenceResult;
26
+ /** Returns true when wire is safe for runtime narrative tier1. */
27
+ export declare function isRuntimeNarrativeSafe(row: PackageRow | undefined): boolean;
28
+ export {};
29
+ //# sourceMappingURL=repoIntelligenceSemantics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repoIntelligenceSemantics.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceSemantics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,OAAO,GACP,IAAI,GACJ,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,aAAa,GACb,UAAU,GACV,SAAS,GACT,QAAQ,GACR,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,MAAM,GACN,OAAO,GACP,KAAK,GACL,SAAS,CAAC;AAEd,MAAM,MAAM,YAAY,GACpB,YAAY,GACZ,aAAa,GACb,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAE1E,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,YAAY,GACZ,WAAW,GACX,WAAW,GACX,kBAAkB,GAClB,SAAS,CAAC;AAEd,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEzD,MAAM,MAAM,oBAAoB,GAC5B,UAAU,GACV,OAAO,GACP,UAAU,GACV,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAyBF,KAAK,UAAU,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AA+IvD;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,gBAAgB,GACtB,8BAA8B,CAoBhC;AAED,kEAAkE;AAClE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAa3E"}
@@ -0,0 +1,146 @@
1
+ const TOOLING_CLASSES = new Set([
2
+ "tooling",
3
+ "test",
4
+ "lint",
5
+ "format",
6
+ "build",
7
+ "ci",
8
+ ]);
9
+ const RUNTIME_VERIFICATION = new Set([
10
+ "auth_flow",
11
+ "route_handlers",
12
+ "routes",
13
+ "handlers",
14
+ "serialization",
15
+ "hooks",
16
+ "plugins",
17
+ "session",
18
+ "auth",
19
+ "queue",
20
+ "workers",
21
+ ]);
22
+ function cloneWire(wire) {
23
+ return structuredClone(wire);
24
+ }
25
+ function isToolingClass(dc) {
26
+ return dc != null && TOOLING_CLASSES.has(dc);
27
+ }
28
+ function stripRuntimeVerification(focus) {
29
+ if (!focus?.length)
30
+ return [];
31
+ return focus.filter((f) => !RUNTIME_VERIFICATION.has(f));
32
+ }
33
+ function applyS1(row) {
34
+ return row.runtimeSurface === "runtime" && row.reachability === "unreachable";
35
+ }
36
+ function applyS2(row) {
37
+ return (row.runtimeImpact === "none" && row.reachability === "on_runtime_paths");
38
+ }
39
+ function applyS3(row) {
40
+ return (isToolingClass(row.dependencyClass) && row.runtimeImpact === "confirmed");
41
+ }
42
+ function applyS4(row) {
43
+ return (row.runtimeImpact === "confirmed" && (row.usage?.files?.length ?? 0) === 0);
44
+ }
45
+ function applyS5(row) {
46
+ if (!row.suppressRuntimeNarrative)
47
+ return false;
48
+ const focus = row.verificationFocus ?? [];
49
+ return focus.some((f) => RUNTIME_VERIFICATION.has(f));
50
+ }
51
+ function sanitizePackageRow(packageName, row) {
52
+ const diagnostics = [];
53
+ let degraded = false;
54
+ const next = { ...row };
55
+ const record = (ruleId, before, after, reason) => {
56
+ diagnostics.push({ packageName, ruleId, before, after, reason });
57
+ degraded = true;
58
+ };
59
+ if (applyS1(next)) {
60
+ const before = {
61
+ runtimeSurface: next.runtimeSurface,
62
+ reachability: next.reachability,
63
+ };
64
+ next.runtimeSurface = "build";
65
+ next.reachability = "build_only";
66
+ next.runtimeImpact = next.runtimeImpact ?? "none";
67
+ next.suppressRuntimeNarrative = true;
68
+ record("S1", before, { runtimeSurface: next.runtimeSurface, reachability: next.reachability }, "runtime_surface_unreachable");
69
+ }
70
+ if (applyS3(next)) {
71
+ const before = { runtimeImpact: next.runtimeImpact };
72
+ next.runtimeImpact = "none";
73
+ next.suppressRuntimeNarrative = true;
74
+ record("S3", before, { runtimeImpact: next.runtimeImpact }, "tooling_confirmed_without_proof");
75
+ }
76
+ if (applyS4(next)) {
77
+ const before = { runtimeImpact: next.runtimeImpact };
78
+ next.runtimeImpact = "none";
79
+ next.evidenceStrength = "low";
80
+ next.suppressRuntimeNarrative = true;
81
+ record("S4", before, { runtimeImpact: next.runtimeImpact }, "confirmed_without_imports");
82
+ }
83
+ if (applyS2(next)) {
84
+ const before = { reachability: next.reachability };
85
+ next.reachability = "unknown";
86
+ record("S2", before, { reachability: next.reachability }, "none_but_on_runtime_paths");
87
+ }
88
+ if (applyS5(next)) {
89
+ const before = { verificationFocus: next.verificationFocus };
90
+ next.verificationFocus = stripRuntimeVerification(next.verificationFocus);
91
+ record("S5", before, { verificationFocus: next.verificationFocus }, "runtime_focus_while_suppressed");
92
+ }
93
+ if (next.runtimeSurface === "runtime" &&
94
+ next.reachability === "unreachable") {
95
+ next.runtimeSurface = "unknown";
96
+ next.reachability = "unknown";
97
+ next.suppressRuntimeNarrative = true;
98
+ degraded = true;
99
+ }
100
+ if (next.suppressRuntimeNarrative && next.runtimeImpact === "confirmed") {
101
+ next.runtimeImpact = "unknown";
102
+ degraded = true;
103
+ }
104
+ return { row: next, diagnostics, degraded };
105
+ }
106
+ /**
107
+ * Hard gate: normalize contradictory package intelligence before wire emit.
108
+ */
109
+ export function sanitizeRepoIntelligenceSemantics(draft) {
110
+ const wire = cloneWire(draft);
111
+ const diagnostics = [];
112
+ const degradedPackages = [];
113
+ for (const [packageName, row] of Object.entries(wire.packages)) {
114
+ const result = sanitizePackageRow(packageName, row);
115
+ wire.packages[packageName] = result.row;
116
+ diagnostics.push(...result.diagnostics);
117
+ if (result.degraded)
118
+ degradedPackages.push(packageName);
119
+ }
120
+ if (diagnostics.length > 0) {
121
+ wire.semanticDiagnostics = [
122
+ ...(wire.semanticDiagnostics ?? []),
123
+ ...diagnostics,
124
+ ];
125
+ }
126
+ return { wire, diagnostics, degradedPackages };
127
+ }
128
+ /** Returns true when wire is safe for runtime narrative tier1. */
129
+ export function isRuntimeNarrativeSafe(row) {
130
+ if (!row)
131
+ return false;
132
+ if (row.suppressRuntimeNarrative === true)
133
+ return false;
134
+ if (row.runtimeImpact === "none")
135
+ return false;
136
+ if (row.runtimeSurface === "runtime" && row.reachability === "unreachable") {
137
+ return false;
138
+ }
139
+ if (row.runtimeImpact === "confirmed" || row.runtimeImpact === "possible") {
140
+ return true;
141
+ }
142
+ if (row.runtimeImpact === "unknown")
143
+ return false;
144
+ // ABI 1 wire without semantic fields: allow non-contradictory surface/reach pairs.
145
+ return row.runtimeSurface != null && row.reachability != null;
146
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=repoIntelligenceSemantics.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repoIntelligenceSemantics.test.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceSemantics.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { isRuntimeNarrativeSafe, sanitizeRepoIntelligenceSemantics, } from "./repoIntelligenceSemantics.js";
3
+ function basePkg(overrides = {}) {
4
+ return {
5
+ runtimeSurface: "runtime",
6
+ reachability: "unreachable",
7
+ usage: { packageName: "typescript", files: [] },
8
+ ...overrides,
9
+ };
10
+ }
11
+ describe("sanitizeRepoIntelligenceSemantics", () => {
12
+ it("S1: neutralizes runtime + unreachable", () => {
13
+ const draft = {
14
+ packages: {
15
+ typescript: basePkg({
16
+ runtimeImpact: "unknown",
17
+ }),
18
+ },
19
+ };
20
+ const { wire, diagnostics } = sanitizeRepoIntelligenceSemantics(draft);
21
+ expect(wire.packages.typescript?.runtimeSurface).not.toBe("runtime");
22
+ expect(wire.packages.typescript?.reachability).not.toBe("unreachable");
23
+ expect(wire.packages.typescript?.suppressRuntimeNarrative).toBe(true);
24
+ expect(diagnostics.some((d) => d.ruleId === "S1")).toBe(true);
25
+ });
26
+ it("S3: tooling class cannot stay confirmed", () => {
27
+ const draft = {
28
+ packages: {
29
+ typescript: basePkg({
30
+ dependencyClass: "tooling",
31
+ runtimeImpact: "confirmed",
32
+ runtimeSurface: "build",
33
+ reachability: "build_only",
34
+ }),
35
+ },
36
+ };
37
+ const { wire } = sanitizeRepoIntelligenceSemantics(draft);
38
+ expect(wire.packages.typescript?.runtimeImpact).toBe("none");
39
+ });
40
+ it("S4: confirmed without imports downgrades", () => {
41
+ const draft = {
42
+ packages: {
43
+ fastify: basePkg({
44
+ runtimeImpact: "confirmed",
45
+ usage: { packageName: "fastify", files: [] },
46
+ }),
47
+ },
48
+ };
49
+ const { wire } = sanitizeRepoIntelligenceSemantics(draft);
50
+ expect(wire.packages.fastify?.runtimeImpact).toBe("none");
51
+ });
52
+ });
53
+ describe("isRuntimeNarrativeSafe", () => {
54
+ it("returns false for suppressed runtime narrative", () => {
55
+ expect(isRuntimeNarrativeSafe({
56
+ runtimeSurface: "runtime",
57
+ reachability: "on_runtime_paths",
58
+ usage: { packageName: "x", files: ["src/a.ts"] },
59
+ suppressRuntimeNarrative: true,
60
+ runtimeImpact: "none",
61
+ })).toBe(false);
62
+ });
63
+ });
@@ -47,6 +47,13 @@ export type ScanNarrativeFacts = {
47
47
  frameworks: string[];
48
48
  };
49
49
  } | null;
50
+ /** From sanitized repoIntelligence primary package semantics (ABI 2). */
51
+ packageSemantics: {
52
+ runtimeImpact: "none" | "possible" | "confirmed" | "unknown" | null;
53
+ expectedImpact: "runtime" | "build_time" | "typecheck" | "test_time" | "development_only" | "unknown" | null;
54
+ suppressRuntimeNarrative: boolean;
55
+ verificationFocus: string[];
56
+ } | null;
50
57
  blastRadius: {
51
58
  level: BlastRadiusLevel;
52
59
  changedPackageCount?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"scanNarrativeFacts.d.ts","sourceRoot":"","sources":["../src/scanNarrativeFacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,yBAAyB,GACjC,iBAAiB,GACjB,UAAU,GACV,gBAAgB,GAChB,cAAc,CAAC;AAEnB,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1E,MAAM,MAAM,gBAAgB,GACxB,kBAAkB,GAClB,YAAY,GAC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EAAE,MAAM,CAAC,CAAA;SAAE,CAAC;KACrE,CAAC,CAAC;IAEH,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBAqBxC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,2BAA2B,KAAK,CAAC"}
@@ -10,6 +10,7 @@ export const EMPTY_SCAN_NARRATIVE_FACTS = {
10
10
  frameworks: [],
11
11
  runtimeSurface: null,
12
12
  reachability: null,
13
+ packageSemantics: null,
13
14
  blastRadius: null,
14
15
  affectedAreas: [],
15
16
  hotspots: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mergesignal/shared",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "MergeSignal shared scan contract, presentation policy, and trusted validation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",