import type { TestTextAnchor } from "../schema/model.js"; /** * Upper bound on a file scanned for an anchor's symbol/text. Generated bundles * and emitted schemas can run to megabytes; reading one to answer "is this name * still here?" costs more than the answer is worth, so oversized files are * treated as UNKNOWN (never as missing). */ export declare const MAX_SYMBOL_SCAN_BYTES = 2000000; /** * One filesystem pass answering both questions an anchor can be wrong about: * does its file exist, and does that file still carry the thing it names. * * WHY THIS IS SHARED (Proposal 016 T6 / D1). `check` has asked the second * question since A7 (`anchor-symbol`), but `conformance` only ever stat'd the * file, so a renamed symbol left the report card untouched: on a real target, * the model's ONLY `met` node stood on 5 test anchors that named nothing in * their files, and `check` said so while the score said 1 met. Two modules * answering the same question two ways is how a report card ends up * contradicting the checker that runs beside it, so there is now one answer * and both consume it. * * FOUR WAYS TO NOT KNOW, and none of them is "stale": * - the path is not a TS/JS source file (docs, SQL, config); * - the file is over `MAX_SYMBOL_SCAN_BYTES`; * - the file cannot be read (a directory, a permission); * - `fileMentionsSymbol` declines to judge. * Every one of these leaves the anchor OUT of the stale sets, because the * whole design of this tier is that it may only say "definitely gone" (see * symbol.ts on why the rule is deliberately weak). An advisory signal that * guesses gets muted, and a muted signal detects nothing. */ export interface AnchorPresence { /** Repo-relative paths that exist on disk (the same set conformance stat'd before). */ existingFiles: Set; /** Anchor strings whose file exists but no longer mentions the symbol. */ staleSymbolAnchors: Set; /** `testTextAnchorLabel` keys whose file exists but no longer contains the text. */ staleTextAnchors: Set; } export interface AnchorPresenceRequest { /** `path#symbol` (or table) anchor strings. Table anchors are ignored — no file. */ anchors: Iterable; /** `{file, text}` test anchors, matched with the crux matcher. */ textAnchors?: Iterable | undefined; } /** * Resolve every anchor's file existence and symbol/text presence under * `repoRoot`, reading each distinct file AT MOST ONCE. * * The dedup is what keeps this inside the deterministic tier's sub-second, * zero-LLM, zero-network budget: a model anchors N nodes into far fewer files * (a real 60-node model: 191 anchors over 96 files), and the previous * per-anchor `readFile` in `checkAnchorExistence` re-read the same worker file * once per anchor on it. */ export declare function resolveAnchorPresence(repoRoot: string, request: AnchorPresenceRequest): Promise; //# sourceMappingURL=presence.d.ts.map