import type { AccessMemory } from "audit-tools/shared"; import type { RemediationState } from "./store.js"; import type { RemediationBlock } from "./types.js"; /** * Remediate-side parity of the audit access-memory harvest (context-efficiency * track, increment 2c): populate `access_memory.edited_count` from the files * remediation landed edits on, so continuity works in both orchestrators. * * Attribution is per-ITEM and restricted to `resolved` items — the only status * that lands an actual diff. `resolved_no_change` (verified but zero diff), skips * (`ignored`/`deemed_inappropriate`) and `blocked` items edit nothing and are * excluded. Each resolved item's edited surface is its `item_spec.touched_files` * (the declared surface of that specific item), falling back to its block's * `touched_files` only when the item carries no per-item surface. This is the * DECLARED edit surface, not a live git diff: it's the only CUMULATIVE, * git-independent source (worktree branches for earlier waves are already * merged/gone), and the ownership-disjoint scheduler + post-merge attribution hold * an item to that surface, so declared ≈ actual by construction. Re-derived fresh * from state each merge (no read-modify-write, no double-count, idempotent). * * Recency lives in STEP-ORDINAL space, never wall-clock: blocks are ordered * deterministically by `(phase_ordinal, block_id)` — the foundations→consumers * execution order — and an item's ordinal is its block's index in that order. * `total_ordinals` is the full block count, so recency (`last_ordinal / * total_ordinals`) is stable as more blocks complete. Pure + deterministic: same * state → byte-identical record. */ export declare function deriveRemediationAccessMemory(state: RemediationState): AccessMemory; /** * Read the remediation `access_memory.json` (written at the artifacts root by the * merge — see {@link deriveRemediationAccessMemory}) back for the continuity * consumer. Absent (first dispatch pass, before any merge) OR malformed ⇒ * `undefined` = no bias, matching the scorer's empty-map contract. Never throws — * a bad record degrades silently rather than failing dispatch (enforce-in-tooling, * crash-safe like the graph/extractor read path). */ export declare function readRemediationAccessMemory(artifactsDir: string): Promise; /** * Remediate-side continuity CONSUMER (context-efficiency track, increment 2d) — * the mirror of audit's `orderReviewPackets` bias. Turns the harvested * `access_memory` into a per-BLOCK continuity mass that biases file-ownership * sub-wave admission (`ownershipSubWaves`, via `OwnershipSchedulerNode.continuity`) * toward blocks whose files earlier waves already touched. * * Remediate has NO dependency graph at dispatch, so the shared scorer runs in its * seed-only mode (`graphBundle: undefined`) — a pure recency×frequency ordering * (edited-weighted), which is the valid weaker signal for a graphless consumer. * Each block's mass is the single-sourced {@link continuityMassForPaths} reducer * over its declared file surface, keyed by `block_id`. Returns an empty map when * there is no signal yet (no/empty access-memory) ⇒ the scheduler falls back to * its pure `block_id` ordering, byte-identical to pre-2d. */ export declare function computeBlockContinuityScores(accessMemory: AccessMemory | undefined, blocks: readonly RemediationBlock[], scopeForBlock: (block: RemediationBlock) => readonly string[]): Map; //# sourceMappingURL=accessMemory.d.ts.map