Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
TypeScript antigravity-skillsbusiness-knowledgeclaude-codeclaude-skillscodebase-analysiscodexcodex-skillsdeveloper-tools-ai-agentgemini-cli-skillskarpathy-llm-wikiknowledge-baseknowledge-graphmemoryopencode-skillspi-agentunderstandcodevibe-coding
fix(incremental): require scoped declaration coverage for deletions
Lum1104a84b3db5ca0f
diff --git a/docs/incremental/source-evidence-audit.md b/docs/incremental/source-evidence-audit.mdindex 48ef3061..11948226 100644--- a/docs/incremental/source-evidence-audit.md+++ b/docs/incremental/source-evidence-audit.md@@ -67,3 +67,9 @@ The regression corpus remains useful, but it is not the design specification. Ad- Check the existing 20-to-1, equal-count, true-deletion, repaired-output and durable-byte publication cases against the new source model.Commit the scope model, evidence adapter/comparator and contract tests by module. Request one overall review only after these invariants and the existing publication suites pass. Evaluate review findings against this contract; a finding must be reproduced, and its claimed semantics must not automatically redefine the feature.++## Implementation following this audit++The three ancestry algorithms and string sentinel have been removed. `symbol-scopes.ts` now assigns the shared scope tree and value regions; its binding queries work independently of graph extraction. Version 2 evidence uses tagged scopes, separate coverage gaps and effects, and fails closed on missing/unsupported coverage. The matcher excludes known local scopes and checks compatible gaps/effects before authorizing deletion. Public graph schema, IDs and publication/retry boundaries are unchanged.++Scope composition tests cover nested fields across declared/assigned/wrapped classes, internal-name alpha-renaming, local installers, shadowing and declaration-order changes. Integration tests retain the original deletion/omission distinctions and add coverage-profile failures. The historical defects above remain recorded as the reason for the replacement, not as descriptions of the new model.diff --git a/docs/incremental/symbol-loss-validation.md b/docs/incremental/symbol-loss-validation.mdindex 48a380b8..34578ac1 100644--- a/docs/incremental/symbol-loss-validation.md+++ b/docs/incremental/symbol-loss-validation.md@@ -14,9 +14,9 @@ The source-evidence layer mixed structural declarations, runtime-installed names2. Source identities are `(path, kind, owner, name)`. Ownership comes from extractor receiver metadata or AST scope; same-line containment is never used to guess a receiver. Locations disambiguate within a revision; they are not cross-revision identity. Duplicate source identities and competing graph mappings remain unknown.3. A unique current declaration plus a unique current graph binding preserves the old symbol. A declaration without a matching graph node reports `still-present`.4. Missing identities become `unknown` if parsing, baseline identity, evidence version, or current ID ownership cannot be verified. Empty extraction never proves deletion.-5. Supplemental evidence describes possible declarations using `kind`, `owner`, `name`, optional name suffix, location and reason. A null field is explicitly unknown, never an empty/free scope. Only evidence compatible with the missing identity prevents deletion. Ordinary reads, strings and parameter names are not declarations. Literal symbol names are not normalized as graph-ID delimiters (for example, #run differs from .run).+5. Version 2 evidence separates declaration coverage gaps from possible runtime effects. Entries carry `kind`, `scope`, `name`, optional name suffix, location and reason. Scope is a tagged value: `file`, `class` with a name, `local` with an AST scope ID, or `unknown`. Local scope is never wildcard uncertainty; local IDs are not compared across revisions or exposed as graph IDs. Only evidence compatible with the missing identity prevents deletion. Ordinary reads, strings and parameter names are not declarations. Literal symbol names are not normalized as graph-ID delimiters (for example, #run differs from .run).6. Verified standard installers preserve exact names and owners (including Ruby readers versus writers). Dynamic keys have unknown names; unresolved, shadowed or reassigned receivers have unknown owners; arbitrary evaluation/installer aliases or shadowed installer APIs may require file-wide uncertainty. Unbound class expressions retain a distinct internal lexical scope; expressions exposed through unresolved assignments retain uncertainty. The gate does not execute code or restore old semantic data.-7. If the uniquely mapped old identity is absent and no compatible uncertainty remains, report `deleted`. A different class's same-name declaration is not that identity. Reusing the old graph ID for a different owner remains an identity conflict until the analyzer supplies distinct descriptors.+7. If the uniquely mapped old identity is absent under a recognized declaration-coverage profile and no compatible coverage gap or runtime effect remains, report `deleted`. Validating the evidence schema alone does not establish coverage. A different class's same-name declaration is not that identity. Reusing the old graph ID for a different owner remains an identity conflict until the analyzer supplies distinct descriptors.8. Any unresolved entry blocks publication. One targeted repair may regenerate complete affected files. Failed repair leaves all three durable baseline files unchanged.## Verification matrix@@ -31,11 +31,19 @@ Each source transition is checked independently from publication mechanics.| Scope | same class; another class; free scope; unresolved/shadowed/reassigned receiver; unrelated local/import aliases; bound installer alias; arbitrary evaluation || Syntax | JS/TS/JSX/TSX methods/properties/class expressions/assignments/property APIs; Ruby accessors/alias declarations/method installers; Python attributes/installers; Go/Rust/C++ receiver extraction || Negative evidence | unrelated string, parameter, normal read/call; static installer for another symbol; another owner's accessor |-| Invalid evidence | unsupported parser, parse recovery/error, empty extraction, missing evidence version, ambiguous old mapping |+| Invalid evidence | unsupported parser/coverage adapter, parse recovery/error, empty extraction, missing evidence version/coverage profile, ambiguous old mapping || Publication | 20-to-1 omission; equal counts; merge/direct-finalize refusal; retry success/failure; stable prepare baseline; stale shards; deleted/excluded files; both data directories; current edge endpoint reuse |Tests must assert positive and negative outcomes for each recognizer rather than only adding the latest reported failure. Existing publication tests continue to verify actual persisted bytes and fresh edge identities. Full Linux/Windows CI and one overall Codex review follow the integrated local matrix.+## Scope and coverage implementation++`symbol-scopes.ts` builds the shared lexical scope table and value regions. Bindings are indexed before references and assignment targets are resolved, so declaration order cannot invent an outer class identity. Class-expression internal names bind only inside that class. Class/function bodies and field initializers end the surrounding value region. Local class references do not depend on the best-effort extractor inventory.++`symbol-evidence.ts` connects that table to structural declarations and runtime effects. `symbol-coverage.ts` records unhandled named declaration surfaces and opaque expansion constructs. An unextracted callable/class is a coverage gap even after a successful parse; a reference or parameter name is not. Missing or malformed coverage is rejected. The comparator consumes this evidence without walking an AST.++The current declaration-coverage adapters cover JavaScript/JSX, TypeScript/TSX, Ruby, Python, Go, Rust and C++. Other grammars may parse and preserve known graph descriptors, but cannot automatically authorize an omitted symbol's deletion until a coverage adapter is supplied. Unsupported expansion/qualification remains uncertain; this is a conservative deletion gate, not a compiler or runtime equivalence checker.+## Interpretation limitsThe comparison uses identities represented by the same parser/extractor in both revisions, rather than compiler-wide type equivalence or arbitrary execution. Unextractable old identities, opaque names/owners, and unsupported receiver qualification remain unknown. Supplemental fields describe potential callability when the extractor only provides a property inventory. A changed source identity can be a confirmed deletion even if another owner now has the same name; reusing the old graph ID for that different identity is separately rejected.diff --git a/tests/skill/understand/test_incremental_symbols.test.mjs b/tests/skill/understand/test_incremental_symbols.test.mjsindex 4abb41de..8870952a 100644--- a/tests/skill/understand/test_incremental_symbols.test.mjs+++ b/tests/skill/understand/test_incremental_symbols.test.mjs@@ -22,7 +22,7 @@ describe('incremental symbol matching', () => {'attr_writer :name', 'attr_accessor :name', 'obj.attr', 'attr_writer "run"', 'attr_writer :"run"'])('allows unrelated Ruby deletion beside %s', accessor => {const before = parser.analyzeFileStrict('a.rb', 'class A\n def run; end\nend');const after = parser.analyzeFileStrict('a.rb', `class A\n def keep; end\n ${accessor}\nend`);- expect(after.symbolEvidence?.version).toBe(1);+ expect(after.symbolEvidence?.version).toBe(2);expect(compareFileSymbols(graph([node('A.run')]), graph([]), before, after).missing[0].status).toBe('deleted');});@@ -34,7 +34,7 @@ describe('incremental symbol matching', () => {const before = parser.analyzeFileStrict('a.rb', `class A\n def ${name}${name.endsWith('=') ? '(value)' : ''}; end\nend`);const after = parser.analyzeFileStrict('a.rb', `class A\n def keep; end\n ${accessor}\nend`);expect(before.status).toBe('succeeded');- expect(after.symbolEvidence?.version).toBe(1);+ expect(after.symbolEvidence?.version).toBe(2);expect(compareFileSymbols(graph([node(`A.${name}`)]), graph([]), before, after).missing[0].status).toBe('unknown');});@@ -51,7 +51,7 @@ describe('incremental symbol matching', () => {const after = parser.analyzeFileStrict(filePath, newSource);expect(before.status).toBe('succeeded');expect(after.status).toBe('succeeded');- expect(after.symbolEvidence?.possible.length).toBeGreaterThan(0);+ expect(after.symbolEvidence?.effects.length).toBeGreaterThan(0);const previous = graph([node('A.run', { filePath, id: `function:${filePath}:A.run` })]);expect(compareFileSymbols(previous, graph([]), before, after).missing[0].status).toBe('unknown');const ordinary = parser.analyzeFileStrict(filePath, extension === 'rb'diff --git a/tests/skill/understand/test_symbol_evidence_matrix.test.mjs b/tests/skill/understand/test_symbol_evidence_matrix.test.mjsindex fd81cc41..959737fb 100644--- a/tests/skill/understand/test_symbol_evidence_matrix.test.mjs+++ b/tests/skill/understand/test_symbol_evidence_matrix.test.mjs@@ -51,7 +51,7 @@ describe('scoped symbol evidence contract', () => {const status = possibleMatch && owner !== 'B' ? 'unknown' : 'deleted';expect(outcome.result.missing[0].status).toBe(status);if (status === 'unknown') {- expect(outcome.result.missing[0].evidence).toContainEqual(expect.objectContaining({ owner: owner === 'target' ? null : owner }));+ expect(outcome.result.missing[0].evidence).toContainEqual(expect.objectContaining({ scope: owner === 'target' ? {kind: 'unknown'} : {kind: 'class', name: owner} }));}});@@ -287,4 +287,57 @@ describe('scoped symbol evidence contract', () => {beforeSource: 'class A\n def run=(value); end\nend', name: 'A.run=',}).result.missing[0].status).toBe('unknown');});+ it.each(['ts', 'tsx', 'js', 'jsx'])('keeps nested/local %s scope composition independent of unrelated names', extension => {+ const outerForms = [body => `class B { ${body} }`, body => `const B = class { ${body} };`,+ body => `const B = class Named { ${body} };`, body => `const B = wrap(class Named { ${body} });`];+ for (const outer of outerForms) for (const inner of ['class', 'class A', 'class B']) {+ const code = outer(`static Nested = ${inner} { run() {} };`) + ' function keep() {}';+ expect(classify(extension, code).result.missing[0].status).toBe('deleted');+ }+ for (const internal of ['A', 'B', '']) {+ const code = `class A { keep() {} } class B {} const C = class ${internal} {}; Object.defineProperty(B.prototype, "run", {});`;+ expect(classify(extension, code).result.missing[0].status).toBe('deleted');+ }+ expect(classify(extension, 'function f() { class B {}; Object.defineProperty(B.prototype, "run", {}); }')+ .result.missing[0].status).toBe('deleted');+ expect(classify(extension, 'function f() { B = class Named { run() {} }; let B; } function keep() {}')+ .result.missing[0].status).toBe('deleted');+ });++ it.each([+ ['ts', 'for (const B of items) { Object.defineProperty(B.prototype, "run", {}); }'],+ ['ts', 'try {} catch (B) { Object.defineProperty(B.prototype, "run", {}); }'],+ ['py', 'for B in items: setattr(B, "run", value)'],+ ['py', 'with lock() as B: setattr(B, "run", value)'],+ ['py', 'try: pass\nexcept Exception as B: setattr(B, "run", value)'],+ ])('an unresolved %s binding cannot inherit an outer class identity', (extension, code) => {+ expect(classify(extension, shells[extension] + code).result.missing[0].status).toBe('unknown');+ });++ it('treats missing, malformed and unknown coverage profiles as unavailable evidence', () => {+ const state = classify('ts', shells.ts);+ for (const coverage of [undefined, {profile: 'future', gaps: []}, {profile: 'structural-declarations-v1', gaps: [null]}]) {+ expect(compareFileSymbols(state.previous, state.current, state.before, {+ ...state.after, symbolEvidence: {...state.after.symbolEvidence, coverage},+ }).missing[0].status).toBe('unknown');+ }+ });++ it('reports an unextracted declaration as a coverage gap rather than runtime evidence', () => {+ const state = classify('ts', 'function* run() {} function keep() {}', {+ beforeSource: 'function run() {}', name: 'run',+ });+ expect(state.after.symbolEvidence.coverage.gaps).toContainEqual(expect.objectContaining({name: 'run'}));+ expect(state.result.missing[0].status).toBe('unknown');+ expect(state.result.missing[0].evidence).toContainEqual(expect.objectContaining({name: 'run', reason: 'Callable declaration is not covered by structural extraction'}));+ });++ it('requires an audited coverage adapter even when a grammar parses successfully', () => {+ const state = classify('java', 'class A { void keep() {} }', {+ beforeSource: 'class A { void run() {} }',+ });+ expect(state.result.missing[0].status).toBe('unknown');+ expect(state.after.symbolEvidence.coverage.gaps).toContainEqual(expect.objectContaining({scope: {kind: 'unknown'}}));+ });+});diff --git a/understand-anything-plugin/skills/understand/SKILL.md b/understand-anything-plugin/skills/understand/SKILL.mdindex 6d339eea..d040f628 100644--- a/understand-anything-plugin/skills/understand/SKILL.md+++ b/understand-anything-plugin/skills/understand/SKILL.md@@ -416,9 +416,9 @@ Before dropping dangling endpoints, merge records normalized edge candidates froCandidate endpoints use the current analysis's node and ownership descriptors before any baseline alias is applied: an ID reused by a different current symbol must keep its current meaning. During repair, incoming edges are deferred outside the ordinary retained batch until those original HEAD descriptors can be matched against replacement nodes, so temporary ID reuse cannot create a false edge during merge.-The strict parser emits versioned, scoped symbol evidence. Each possible declaration records its kind, owner, name, source location, and reason. Unknown owners/names are explicit; a known declaration or installer on `B` cannot preserve a missing `A` symbol. Static keys retain their exact names, including the distinction between Ruby readers and writers. Dynamic keys, unresolved receiver bindings, installer aliases, and arbitrary evaluation only block identities compatible with that uncertainty. The report includes the matching evidence for investigation.+The strict parser emits versioned, scoped symbol evidence with separate declaration-coverage gaps and runtime effects. Each entry records its kind, scope, name, source location, and reason. File, named-class, local, and unknown scopes are distinct; local scopes never act as wildcard uncertainty. Unknown names are explicit; a known declaration or installer on `B` cannot preserve a missing `A` symbol. Static keys retain their exact names, including the distinction between Ruby readers and writers. Dynamic keys, unresolved receiver bindings, installer aliases, and arbitrary evaluation only block identities compatible with that uncertainty. The report includes the matching evidence for investigation.-Source identity is `(file path, symbol kind, owner, name)`. Same-line functions/methods use AST scope instead of inferred line containment. Shadowed/reassigned receiver names are unconfirmed; ordinary reads, strings, and parameters are not declarations. If an old ID is reused for a different current identity, repair must supply distinct descriptors. Unsupported parsing, empty extraction, ambiguous identities, and stale evidence formats remain blocking.+Source identity is `(file path, symbol kind, owner, name)`. Same-line functions/methods use AST scope instead of inferred line containment. Shadowed/reassigned receiver names are unconfirmed; ordinary reads, strings, and parameters are not declarations. If an old ID is reused for a different current identity, repair must supply distinct descriptors. Unsupported parsing or declaration coverage, empty extraction, ambiguous identities, and stale evidence formats remain blocking. Declaration ownership, reference bindings, and expression value regions all use one lexical scope index.The decision rules, limits, and cross-product test matrix are documented in `docs/incremental/symbol-loss-validation.md` in the repository. This validation uses structural source identities and recognized declaration/installer syntax; it does not execute programs or perform whole-program metaprogramming/type analysis.@@ -434,7 +434,7 @@ This helper revalidates the candidate, records attempt 1/1 for the base/head comIf repair preparation, the repair dispatch, or the second merge fails, **STOP** and retain diagnostics. Do not publish or advance `knowledge-graph.json`, `fingerprints.json`, or `meta.json`. Never concatenate old nodes or old semantic edges into the candidate to satisfy the gate. Other merge failures without eligible unresolved files stop immediately. On success, continue to the applicable architecture/tour phases.-Parser limitation: languages without a deterministic structural parser (including `.sh`, `.ps1`, and `.bat`) cannot have missing symbols automatically confirmed as deleted. Such omissions remain `unknown`, even for genuine deletions, and stop publication pending manual investigation or parser support. Supplemental LLM source inspection and regex guesses are not deletion evidence. Callables without explicit class containment require source identity verification even when their IDs/names stay unchanged and neither graph emits class nodes; unsupported or unextractable callables therefore also block in this case. Dots in an opaque ID are not ownership evidence. Stable explicit class ownership can establish preservation without parsing. Identical current descriptors within one HEAD may preserve repair references; this does not waive verification of the previous published symbols across revisions.+Parser limitation: automatic deletion requires both a deterministic parser and a declaration-coverage adapter. Current adapters cover JavaScript/JSX, TypeScript/TSX, Ruby, Python, Go, Rust, and C++; other grammars remain conservative even if parsing succeeds. Languages without a deterministic structural parser (including `.sh`, `.ps1`, and `.bat`) cannot have missing symbols automatically confirmed as deleted. Such omissions remain `unknown`, even for genuine deletions, and stop publication pending manual investigation or parser support. Supplemental LLM source inspection and regex guesses are not deletion evidence. Callables without explicit class containment require source identity verification even when their IDs/names stay unchanged and neither graph emits class nodes; unsupported or unextractable callables therefore also block in this case. Dots in an opaque ID are not ownership evidence. Stable explicit class ownership can establish preservation without parsing. Identical current descriptors within one HEAD may preserve repair references; this does not waive verification of the previous published symbols across revisions.---diff --git a/understand-anything-plugin/skills/understand/validate-incremental-symbols.mjs b/understand-anything-plugin/skills/understand/validate-incremental-symbols.mjsindex a6da2b6c..53b2d9dd 100644--- a/understand-anything-plugin/skills/understand/validate-incremental-symbols.mjs+++ b/understand-anything-plugin/skills/understand/validate-incremental-symbols.mjs@@ -55,29 +55,41 @@ function symbolKey(symbol) {return JSON.stringify([symbol.kind, symbol.owner, symbol.name]);}+function validScope(scope) {+ return scope && (['file', 'unknown'].includes(scope.kind)+ || scope.kind === 'class' && typeof scope.name === 'string' && scope.name.length > 0+ || scope.kind === 'local' && Number.isInteger(scope.id));+}+function validRange(range) {+ return Array.isArray(range) && range.length === 2 && range.every(Number.isInteger)+ && range[0] > 0 && range[1] >= range[0];+}function validSupplement(evidence) {const supplement = evidence?.symbolEvidence;- return supplement?.version === 1 && Array.isArray(supplement.possible)- && Array.isArray(supplement.functions)- && supplement.functions.every(fn => fn && typeof fn.name === 'string' && (fn.owner === null || typeof fn.owner === 'string')- && Array.isArray(fn.lineRange) && fn.lineRange.length === 2 && fn.lineRange.every(Number.isInteger))- && supplement.possible.every(item => item && [null, 'callable', 'class'].includes(item.kind)- && (item.owner === null || typeof item.owner === 'string')- && (item.name === null || typeof item.name === 'string')- && typeof item.reason === 'string' && Array.isArray(item.lineRange)- && item.lineRange.length === 2 && item.lineRange.every(Number.isInteger)- && (item.nameSuffix === undefined || typeof item.nameSuffix === 'string'));+ const validEntry = item => item && [null, 'callable', 'class'].includes(item.kind)+ && validScope(item.scope) && (item.name === null || typeof item.name === 'string')+ && typeof item.reason === 'string' && validRange(item.lineRange)+ && (item.nameSuffix === undefined || typeof item.nameSuffix === 'string');+ const validDeclaration = item => item && typeof item.name === 'string'+ && validScope(item.scope) && validRange(item.lineRange);+ return supplement?.version === 2 && Array.isArray(supplement.effects) && supplement.effects.every(validEntry)+ && Array.isArray(supplement.functions) && supplement.functions.every(validDeclaration)+ && Array.isArray(supplement.classes) && supplement.classes.every(validDeclaration)+ && supplement.coverage?.profile === 'structural-declarations-v1'+ && Array.isArray(supplement.coverage.gaps) && supplement.coverage.gaps.every(validEntry);}--function compatibleEvidence(evidence, symbol) {- return evidence.symbolEvidence.possible.filter(item => {+function scopeOwner(scope) {+ return scope.kind === 'class' ? scope.name : scope.kind === 'file' ? '' : null;+}+function compatibleEvidence(records, symbol) {+ return records.filter(item => {+ if (item.scope.kind === 'local') return false;if (item.kind !== null && item.kind !== symbol.kind) return false;- if (item.owner !== null && qualifiedName(item.owner) !== qualifiedName(symbol.owner)) return false;- // These are actual parser/runtime names, not graph-ID spelling hints.- // In particular, a private #run is distinct from the literal key .run.+ const owner = scopeOwner(item.scope);+ if (item.scope.kind !== 'unknown' && qualifiedName(owner) !== qualifiedName(symbol.owner)) return false;+ // Actual source names are not graph-ID spelling hints.const names = [symbol.name];- // An unresolved receiver may denote singleton/qualified method scopes.- if (item.owner === null) names.push(names[0].split('.').at(-1));+ if (item.scope.kind === 'unknown') names.push(names[0].split('.').at(-1));if (item.name !== null && !names.includes(item.name)) return false;return !item.nameSuffix || names.some(name => name.endsWith(item.nameSuffix));});@@ -93,7 +105,7 @@ function sourceSymbols(evidence) {// Supplementary identities come from AST scope, never guessed by line-range// containment (which cannot distinguish same-line free functions/methods).for (const fn of evidence.symbolEvidence.functions) {- symbols.push({ kind: 'callable', owner: fn.owner, name: fn.name, lineRange: fn.lineRange });+ if (fn.scope.kind !== 'local') symbols.push({ kind: 'callable', owner: scopeOwner(fn.scope), name: fn.name, lineRange: fn.lineRange });}for (const fn of functions.filter(fn => fn.owner === undefined)) {if (!evidence.symbolEvidence.functions.some(candidate => candidate.name === fn.name@@ -102,7 +114,11 @@ function sourceSymbols(evidence) {}}for (const cls of classes) {- symbols.push({ kind: 'class', owner: '', name: cls.name, lineRange: cls.lineRange });+ const declaration = evidence.symbolEvidence.classes.find(item => item.name === cls.name+ && JSON.stringify(item.lineRange) === JSON.stringify(cls.lineRange));+ if (declaration?.scope.kind === 'local') continue;+ const classVerified = declaration?.scope.kind === 'file';+ symbols.push({ kind: 'class', owner: classVerified ? '' : null, name: cls.name, lineRange: cls.lineRange });const used = new Map();for (const name of cls.methods) {const count = used.get(name) ?? 0;@@ -114,7 +130,7 @@ function sourceSymbols(evidence) {if (classes.filter(other => other.name === cls.name).length === 1 && count < detailed.length) continue;const unknownOwner = symbols.some(symbol => symbol.kind === 'callable'&& symbol.name === name && symbol.owner === null);- symbols.push({ kind: 'callable', owner: unknownOwner ? null : cls.name, name, lineRange: cls.lineRange });+ symbols.push({ kind: 'callable', owner: unknownOwner || !classVerified ? null : cls.name, name, lineRange: cls.lineRange });}}return symbols;@@ -190,13 +206,13 @@ export function compareFileSymbols(previous, current, baseEvidence, headEvidenceconst newMappings = newSymbols.map(node => resolveSymbol(node, current, headSource));const missing = [];const replacements = [];- const completeEvidence = validSupplement(baseEvidence) && validSupplement(headEvidence);+ const evidenceValid = validSupplement(baseEvidence) && validSupplement(headEvidence);for (let index = 0; index < oldSymbols.length; index++) {const node = oldSymbols[index];if (hasPreservedIdentity(node, previous, current, sameRevision)) continue;const entry = { id: node.id, name: node.name, type: node.type, status: 'unknown', reason: '' };const old = oldMappings[index];- if (baseEvidence?.status === 'succeeded' && headEvidence?.status === 'succeeded' && !completeEvidence) {+ if (baseEvidence?.status === 'succeeded' && headEvidence?.status === 'succeeded' && !evidenceValid) {entry.reason = 'Strict parser lacks valid scoped symbol evidence; rebuild the core package';} else if (!old || baseEvidence?.status !== 'succeeded' || headEvidence?.status !== 'succeeded') {entry.reason = 'Old symbol cannot be mapped uniquely, or source parsing is unavailable/failed';@@ -233,11 +249,14 @@ export function compareFileSymbols(previous, current, baseEvidence, headEvidence} else if (headSource.some(symbol => symbol.kind === old.kind && symbol.name === old.name && symbol.owner !== null&& qualifiedName(symbol.owner).replace(/\s+/g, '') === qualifiedName(old.owner).replace(/\s+/g, ''))) {entry.reason = 'Receiver formatting may describe the old identity; type equivalence is not verified';- } else if (!completeEvidence) {+ } else if (!evidenceValid) {entry.reason = 'Strict parser lacks valid scoped symbol evidence; rebuild the core package';} else {- const uncertain = [...compatibleEvidence(baseEvidence, old).filter(item => item.reason === 'Unresolved declaration name'),- ...compatibleEvidence(headEvidence, old)];+ const uncertain = [+ ...compatibleEvidence(baseEvidence.symbolEvidence.coverage.gaps, old).filter(item => item.reason === 'Unresolved declaration name'),+ ...compatibleEvidence(headEvidence.symbolEvidence.coverage.gaps, old),+ ...compatibleEvidence(headEvidence.symbolEvidence.effects, old),+ ];const reusedIndex = newSymbols.findIndex(candidate => candidate.id === node.id);if (uncertain.length) {entry.reason = 'Compatible source evidence prevents confirming deletion';@@ -247,7 +266,7 @@ export function compareFileSymbols(previous, current, baseEvidence, headEvidenceentry.reason = 'The old graph ID is reused by a different or unresolved source identity';} else {entry.status = 'deleted';- entry.reason = 'Both revisions parsed; old identity is absent with no compatible declaration uncertainty';+ entry.reason = 'Old identity is absent under the declaration coverage profile, with no compatible gaps or effects';}}}