/** * `deterministic:scope_drift` (DES-trigger-registry §4.3 row 4 "scope-drift", §4.4; TR-W7). * * Set logic over two facts the engine computed, nothing parsed: the creator floor's * `repoChecksEvaluated.changed` (TR-W1b — every path the unit changed, its dispatch baseline tree * against the tree the checks ran on; any carrier, any way of editing) against the run's declared * scope, `plan.accepted.touch` (TR-W1a — the accepted proposal's touch unioned with every earlier * accepted rev's; a BUS row the registry PULLS, the first entry that listens on the bus). A path the * floor names that no touch entry covers is one flag per (attempt, path); the emitter rolls them up * per attempt past the entry's rate (§4.7). Drift flags clear only by dismissal. * * Touch entries are files or directory prefixes ending `/` (§4.4). Nothing else is inferred: an entry * without a trailing slash names ONE file, never a prefix (a declared `src` does not cover `src/x.ts`; * a declared `src/` does). Both sides are normalised (`./`, doubled slashes) before the comparison so * a spelling difference is never drift. * * Order is not assumed. A plan is accepted minutes before its creator floors run, but the plan row is * polled off the bus while the floor arrives on the fan-in, so a floor that lands first is KEPT * (bounded) and judged when the plan row arrives — anchored to the floor's own time and replay * provenance (TR-W6's kept-frame rule). The newest accepted rev is the scope (core already unions the * revs); a lower rev replayed late never narrows it. * * Coverage (§4.7, G7): * - "no declared scope" when `touch_source` is `none`, or absent — an old row reads as none, and an * engine before TR-W1a cannot be told apart from a plan that declared nothing, so the reason * names both. A DECLARED empty set (a source with no paths) is not none: it covers nothing, so * every change is outside it and the run is checked; * - not checked when the TOUCH set itself was cut at 64: what lies outside the listed paths cannot * be known, so nothing is flagged rather than flagging what may be in scope; * - a truncated CHANGE list is still judged on the paths it names, and the fact says it was cut * (§4.4: "a truncated list still names its first 200 paths and says so"). */ import type { WatchCheck } from '../types.js'; /** The bus row the check joins to (TR-W1a). The entry's `join` names it; the loader checks the grammar. */ export declare const PLAN_ACCEPTED_TYPE = "wicked.team.plan.accepted"; /** `plan.accepted.touch` is cut at this many paths by the engine (`ACCEPTED_TOUCH_CAP`). */ export declare const TOUCH_CAP = 64; export interface ScopeDriftThreshold { /** An attempt raises only when at least this many of its changed paths lie outside the scope. */ min_paths: number; } /** Repo-relative, forward slashes: no leading `./` or `/`, no doubled slashes. */ export declare function normalisePath(p: string): string; /** True when some touch entry covers `path`: an equal file, or a directory prefix ending `/` (§4.4). */ export declare function inScope(path: string, touch: readonly string[]): boolean; export declare const scopeDriftCheck: WatchCheck, ScopeDriftThreshold>; //# sourceMappingURL=scope-drift.d.ts.map