@staix/agent-mem 0.26.1 → 0.26.3
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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +4 -1
- package/package.json +1 -1
- package/src/cli.ts +31 -1
- package/src/commands-table.ts +3 -1
- package/src/memory/bridge.ts +3 -1
- package/src/memory/config.ts +11 -1
- package/src/memory/shard-sync-history.ts +5 -1
- package/src/memory/sync-placement-active.ts +21 -0
- package/src/memory/sync-placement-bound.ts +39 -0
- package/src/memory/sync-placement-capture.ts +27 -9
- package/src/memory/sync-placement-dependencies.ts +6 -4
- package/src/memory/sync-placement-inspection.ts +1 -1
- package/src/memory/sync-placement-journal-storage.ts +70 -15
- package/src/memory/sync-placement-materialize.ts +20 -9
- package/src/memory/sync-placement-projection.ts +10 -1
- package/src/memory/sync-placement-publication-plan.ts +4 -2
- package/src/memory/sync-placement-transport.ts +100 -41
- package/src/memory/sync-progress.ts +192 -0
- package/src/memory/sync.ts +14 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Curated memory with append-only JSONL logs, a derived SQLite index, short- and long-term tiers, a typed graph, goals with leases, and git sync between machines. Extracted from [agent-hub](https://github.com/STAIxBWLB/agent-hub), with compatible storage and entry IDs.
|
|
4
4
|
|
|
5
5
|
<!-- facts:version -->
|
|
6
|
-
Version: 0.26.
|
|
6
|
+
Version: 0.26.3. Requires Bun 1.4.2 or later; no runtime dependencies.
|
|
7
7
|
<!-- /facts:version -->
|
|
8
8
|
|
|
9
9
|
## Quick start
|
|
@@ -114,6 +114,7 @@ The machine-local file `amem.config.json` in the memory home (see `amem status`
|
|
|
114
114
|
- `denyPaths`: substrings of a path that are never captured and that decline any note, candidate or MCP answer naming them. `piiPatterns`: case-insensitive literal substrings (never regular expressions) that decline a value and redact a capture excerpt. Each list holds up to 64 entries of up to 256 bytes.
|
|
115
115
|
- `records`: optional boolean, enabled by default. `false` disables the static native SessionStart instruction and new Claude, Codex, Pi and Kimi `Record` extraction; a repository may disable it but cannot re-enable a machine opt-out. See [assistant records](#assistant-records-313).
|
|
116
116
|
- `briefBytes`, `excerptBytes`, `capturePaths` can only lower the built-in ceilings (the 1200-byte SessionStart context, 2000-character capture excerpt, 32 captured paths). `capture.capMb` and `capture.retentionDays` are the lowest layer of the capture size and retention bounds: a shard's own `config.json` and the home's `capture-config.json` still override them.
|
|
117
|
+
- `privateRemotes`: up to 16 exact remote URLs of a self-hosted Git server that you state are private. `amem sync` (all forms) and repository promotion treat an exact match as a private remote; any other non-GitHub URL stays unknown and is refused. It is your statement, not a check: amem cannot see who can read that server. GitHub URLs are always asked of GitHub (listing one is an error), a URL with a password is an error, and only the home's own file may carry this key.
|
|
117
118
|
- A file with an unknown key, a bad value, a link, or more than 64 KiB is an error that names the file. An unreadable policy is never treated as no policy.
|
|
118
119
|
- `<private>...</private>` spans are dropped before anything else reads the text, at every write boundary (capture, MCP candidates and work lists, notes, goals, promotion and import), so they are never screened, counted or stored. Tags match like HTML (case-insensitive, with attributes or spaces, and `<private/>` opens a span); an unclosed span drops the rest of the text.
|
|
119
120
|
|
|
@@ -618,6 +619,8 @@ amem migrate --sync-placement --abandon --json
|
|
|
618
619
|
|
|
619
620
|
Dry-run shows root versions/pins and safe policy counts, never row text or patterns, and writes nothing. Initial writer errors name the root category and cause, with upgrade/setup instructions. If a pre-marker interruption retained an intent and its inputs changed, person `--abandon` removes only its owned initial metadata so a fresh preview/apply can follow. It cannot remove a v3 marker, active fence or journal history. After apply, choose the private remote on the first v3 sync (`amem sync --remote <private-git-url>`); ordinary and cadence sync then read the immutable root locator and measure the installs afresh. Allowed originals can publish while declined originals remain in the local append-only history, with counts in the sync receipt. No writer roots need to be repeated on sync.
|
|
620
621
|
|
|
622
|
+
A long first sync reports its phase, row counters and last progress on stderr when stderr is a terminal (`--progress json` for one versioned event per line, `--progress off` to silence it); stdout and `--json` output are unchanged. From another terminal, `amem sync --status` shows running, finished or interrupted operations without opening memory or taking a lock. One sync covers the selected project plus the user overlay. Activation and first sync share a 64 MiB/20000-row source envelope; a refusal names its phase, bound kind, limit and observed size.
|
|
623
|
+
|
|
621
624
|
On an active home, the same dry-run/apply commands explicitly renew the writer inventory on its existing epoch (#282). Declare the complete new 0.22.0-or-later roots after updating host pins and managed setup receipts. Ordinary and cadence sync then locate the new inventory and measure it afresh; original activation data, holds and prior receipts are unchanged. Pending publication or source-recovery work must first be finished with the inventoried install, for example after `dot ai rollback amem` or restoring the host's previous pin.
|
|
622
625
|
|
|
623
626
|
An interrupted renewal resumes only its exact intent. Before commit append starts, person `--abandon` can discard its unpublished metadata; after the first commit-log byte, only forward resume is supported. Unpublished intent staging requires explicit `--abandon`, then a fresh dry-run; it is never cleaned automatically. Compatible ordinary reads remain available while only renewal metadata is pending. After a crash, a retained `profile.lock` still blocks new reader admission until person `--resume` or, before commit append, `--abandon`. Never edit activation files, downgrade markers or start another epoch to discard a hold. See the [renewal contract](docs/contracts.md#same-epoch-writer-inventory-renewal-282). Real-home renewal and release remain separately authorized person operations.
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -83,6 +83,8 @@ export interface CliContext {
|
|
|
83
83
|
/** Whether stdout is a terminal, for the real stdout only (default `process.stdout.isTTY`). */
|
|
84
84
|
stdoutTTY?: boolean;
|
|
85
85
|
edit?: (initial: string) => string | Promise<string>;
|
|
86
|
+
/** Where `sync --progress` writes (default process.stderr) and whether that is a terminal; fixtures stand in for both. */
|
|
87
|
+
stderr?: (text: string) => void; stderrTTY?: boolean;
|
|
86
88
|
/** Test seam: the `sync --if-due` deadline in milliseconds (the CLI always uses 30 seconds). */
|
|
87
89
|
syncDeadlineMs?: number;
|
|
88
90
|
/** Called with the signal name when a person's signal ended `sync --if-due`, after its handlers are removed. `main` re-raises it once the output is written; absent, nothing happens. */
|
|
@@ -1072,6 +1074,12 @@ async function runCliCommand(argv: readonly string[], context: CliContext): Prom
|
|
|
1072
1074
|
// configured remote, nothing when the schedule or the failure backoff says it is not due (`--force` skips that), and it stops a running git step after 30 seconds.
|
|
1073
1075
|
const ifDue = sub === "sync" && options["--if-due"] === true, syncHome = memoryHome();
|
|
1074
1076
|
if (options["--force"] === true && !ifDue) throw new Error("--force only applies with sync --if-due");
|
|
1077
|
+
if (sub === "sync" && options["--status"] === true) {
|
|
1078
|
+
// #418: read-only status from the telemetry sidecars; no realm, lock, proof, journal or schedule is touched.
|
|
1079
|
+
if (Object.keys(options).some(name => name !== "--status" && name !== "--json")) throw new Error("sync --status takes only --json");
|
|
1080
|
+
const { readSyncStatus, renderSyncStatus } = await import("./memory/sync-progress.ts"), report = readSyncStatus(syncHome);
|
|
1081
|
+
return options["--json"] ? JSON.stringify(report, null, 2) : renderSyncStatus(report);
|
|
1082
|
+
}
|
|
1075
1083
|
if (sub === "sync") { assertFormatFloor(syncHome, "sync"); const refusal = placementRuntimeRefusal(syncHome); if (refusal) throw new Error("amem sync: " + refusal); }
|
|
1076
1084
|
if (ifDue) {
|
|
1077
1085
|
if (options["--remote"] === undefined && !remoteConfigured(syncHome)) return options["--json"] ? JSON.stringify({ ok: true, skipped: "no sync remote configured" }) : "no sync remote configured: nothing to do";
|
|
@@ -1091,6 +1099,11 @@ async function runCliCommand(argv: readonly string[], context: CliContext): Prom
|
|
|
1091
1099
|
if (args[index] === "--capture-days") { captureArgs.add(index); captureArgs.add(index + 1); }
|
|
1092
1100
|
else if (args[index]?.startsWith("--capture-days=")) captureArgs.add(index);
|
|
1093
1101
|
}
|
|
1102
|
+
// `sync --progress` is the CLI's own rendering choice; the raw command, which hosts share, never sees it.
|
|
1103
|
+
if (sub === "sync") for (let index = 0; index < args.length; index++) {
|
|
1104
|
+
if (args[index] === "--progress") { captureArgs.add(index); captureArgs.add(index + 1); }
|
|
1105
|
+
else if (args[index]?.startsWith("--progress=")) captureArgs.add(index);
|
|
1106
|
+
}
|
|
1094
1107
|
// --filter and --explain select standalone CLI behavior; hosts keep their existing raw command arguments.
|
|
1095
1108
|
const legacySearch = options["--filter"] === true;
|
|
1096
1109
|
const explainSearch = sub === "search" && options["--explain"] === true;
|
|
@@ -1098,23 +1111,28 @@ async function runCliCommand(argv: readonly string[], context: CliContext): Prom
|
|
|
1098
1111
|
const memoryArgs = captureImport && !options["--json"] ? [...syncArgs, "--json"] : syncArgs;
|
|
1099
1112
|
let output: string;
|
|
1100
1113
|
let placementWriters: import("./sync-placement-writer-context.ts").PlacementWriterContext | undefined;
|
|
1114
|
+
let progress: import("./memory/sync-progress.ts").SyncProgress | undefined;
|
|
1101
1115
|
const stop = ifDue ? stopSignal(context.syncDeadlineMs ?? SYNC_IF_DUE_DEADLINE_MS, process) : undefined;
|
|
1102
1116
|
try {
|
|
1103
1117
|
if (sub === "sync" && (readPlacementRuntimeMarkers(syncHome).profile as { publicationFormat?:string } | undefined)?.publicationFormat === "agent-mem.sync-placement/v1") {
|
|
1104
1118
|
const { activePlacementWriterContext } = await import("./sync-placement-writer-context.ts");
|
|
1119
|
+
progress = await placementProgress(syncHome, typeof options["--progress"] === "string" ? options["--progress"] as string : "auto", context);
|
|
1105
1120
|
placementWriters = activePlacementWriterContext(syncHome,fileURLToPath(new URL("..",import.meta.url)));
|
|
1106
1121
|
}
|
|
1107
1122
|
output = await withRepoRows(await rawMemoryCommand(memoryArgs, cwd, { person: identity.actor === "person", rankedSearch: identity.actor === "person" && !legacySearch, ...(explainSearch ? { explainSearch: true } : {}), project: boundProject(), open, readable: notes => identity.actor === "person" ? notes : notes.filter(view => view.project === boundProject() && policyOf().screenStandalone(view)), stale: createRecallStalenessProbe({ cwd: recallRoot ?? cwd, rootConfirmed, policy: () => configured }), outputReady: notes => outputReady(notes.map(view => view.id)), importPolicy: () => text => configured.declinesPersonal(text),
|
|
1108
|
-
sync: { ...(placementWriters ? { placementAttestation:placementWriters.attest } : {}), screen: row => configured.screenStandalone(row), policyVersion: () => JSON.stringify(configuredPolicyOptions(memoryHome(), policyCwd)), ...(stop ? { signal: stop.signal } : {}) }, // the repository-narrowed policy binds what sync publishes too
|
|
1123
|
+
sync: { ...(placementWriters ? { placementAttestation:placementWriters.attest } : {}), ...(progress ? { progress } : {}), screen: row => configured.screenStandalone(row), policyVersion: () => JSON.stringify(configuredPolicyOptions(memoryHome(), policyCwd)), ...(stop ? { signal: stop.signal } : {}) }, // the repository-narrowed policy binds what sync publishes too
|
|
1109
1124
|
onBridgeStatus: status => { receipt.bridgeStatus = status; },
|
|
1110
1125
|
// #188: ids-only listing of nearby machine-local rows; policy-refused rows are neither listed nor counted.
|
|
1111
1126
|
forgetNearby: note => forgetNearby({ base: memoryHome(), project: note.project, text: note.text, title: note.title, screen: value => configured.screenStandalone(value) }) }));
|
|
1112
1127
|
} catch (error) {
|
|
1128
|
+
if (sub === "sync") progress?.finish(stop?.cause() ? "cancelled" : "failed", stop?.cause() ? "cancelled" : "unavailable");
|
|
1113
1129
|
if (sub === "sync") stampSync((error as Error).message, stop?.cause());
|
|
1114
1130
|
if (sub === "sync" && placementWriters?.lastRefusal) throw Error(`${placementWriters.lastRefusal.message} ${(error as Error).message}`);
|
|
1115
1131
|
throw error;
|
|
1116
1132
|
}
|
|
1117
1133
|
finally {
|
|
1134
|
+
// A run that never reached the transport's receipt (an early refusal) must not stay "running".
|
|
1135
|
+
progress?.finish("failed", "unavailable");
|
|
1118
1136
|
stop?.dispose();
|
|
1119
1137
|
// A run its person ended ends like that signal (130, 143, 129, 131), as `amem doctor` does, also when `--json` reports it as a result instead of an error: the caller decides when.
|
|
1120
1138
|
const ended = stop?.cause() === "person" ? stop.signalName() : undefined;
|
|
@@ -1144,6 +1162,18 @@ async function runCliCommand(argv: readonly string[], context: CliContext): Prom
|
|
|
1144
1162
|
}
|
|
1145
1163
|
|
|
1146
1164
|
/** Color for human output only on an interactive stdout without NO_COLOR or TERM=dumb (#125). */
|
|
1165
|
+
/**
|
|
1166
|
+
* #418: one reporter per placement sync. The private sidecar backs `sync --status` in every mode; stderr gets human
|
|
1167
|
+
* lines or versioned JSON events. Each part fails alone and silently: telemetry never fails or alters the sync.
|
|
1168
|
+
*/
|
|
1169
|
+
async function placementProgress(home: string, mode: string, context: CliContext): Promise<import("./memory/sync-progress.ts").SyncProgress> {
|
|
1170
|
+
const { SyncProgress, renderSyncProgress, syncProgressSidecar } = await import("./memory/sync-progress.ts");
|
|
1171
|
+
const write = context.stderr ?? ((text: string) => { process.stderr.write(text); });
|
|
1172
|
+
const render = mode === "json" ? "json" : mode === "human" || mode === "auto" && (context.stderrTTY ?? process.stderr.isTTY) ? "human" : undefined;
|
|
1173
|
+
const parts = [syncProgressSidecar(home), ...(render ? [(snapshot: import("./memory/sync-progress.ts").SyncProgressSnapshot) => write((render === "json" ? JSON.stringify(snapshot) : renderSyncProgress(snapshot)) + "\n")] : [])];
|
|
1174
|
+
const live = new Set(parts.keys());
|
|
1175
|
+
return new SyncProgress({ sink: snapshot => { for (const index of live) try { parts[index]!(snapshot); } catch { live.delete(index); } } });
|
|
1176
|
+
}
|
|
1147
1177
|
function outputStyle(context: CliContext): Style { return style(colorEnabled(context.env ?? process.env, context.stdoutTTY ?? process.stdout.isTTY)); }
|
|
1148
1178
|
|
|
1149
1179
|
/** Native ingest remains capture-only and agent-reachable; this formats only its returned receipt. */
|
package/src/commands-table.ts
CHANGED
|
@@ -83,7 +83,9 @@ export const COMMANDS: Record<string, CommandDefinition> = {
|
|
|
83
83
|
rebuild: { description: "Rebuild the derived index", options: json, mutates: true },
|
|
84
84
|
dedupe: { description: "Preview duplicate reconciliation", options: { ...json, "--apply": flag("Append reconciliation operations") }, mutates: "apply" },
|
|
85
85
|
sync: { description: "Sync a private remote (--if-due: only when the schedule and the failure backoff allow it; --force ignores both)", options: { ...json, ...policy, "--remote": text("Private git URL"),
|
|
86
|
-
"--if-due": flag("Sync only when due (hourly after a success, 15 minutes doubling to a day after failures); stops after 30 seconds"), "--force": flag("With --if-due: ignore the schedule and the backoff")
|
|
86
|
+
"--if-due": flag("Sync only when due (hourly after a success, 15 minutes doubling to a day after failures); stops after 30 seconds"), "--force": flag("With --if-due: ignore the schedule and the backoff"),
|
|
87
|
+
"--progress": { description: "Placement sync progress on stderr: auto (human lines when stderr is a terminal, otherwise none), human, json (one versioned event per line) or off; stdout is unchanged", value: ["auto", "human", "json", "off"] },
|
|
88
|
+
"--status": flag("Read-only: show recorded placement sync operations (running, finished or interrupted) and exit; opens no memory, takes no lock") }, mutates: true, policyFree: true },
|
|
87
89
|
machine: { description: "Show or label this machine", options: { ...json, "--label": text("Machine label") }, mutates: "label" },
|
|
88
90
|
import: { description: "Import external memory", options: { ...json, ...policy, "--db": { description: "SQLite database file", value: "path" }, "--limit": text("Maximum observations"), "--restart": flag("Restart import cursor"), "--capture-days": text("Import recent claude-mem observations and summaries into capture") }, mutates: true, policyFree: true,
|
|
89
91
|
commands: {
|
package/src/memory/bridge.ts
CHANGED
|
@@ -62,11 +62,13 @@ export class SegmentReader {
|
|
|
62
62
|
/** Optional inspection limits do not change ordinary incremental-reader semantics. */
|
|
63
63
|
readonly sourceByteLimit?: number;
|
|
64
64
|
readonly sourceFileLimit?: number;
|
|
65
|
+
private readonly sourceRowLimit?: number;
|
|
65
66
|
constructor(private remainingBytes = Infinity, limits: { maxSourceBytes?: number; maxRows?: number } = {}) {
|
|
66
67
|
for (const value of [remainingBytes, limits.maxSourceBytes ?? Infinity, limits.maxRows ?? Infinity]) if (value !== Infinity && (!Number.isSafeInteger(value) || value < 0)) failure();
|
|
67
68
|
this.sourceByteLimit = limits.maxSourceBytes;
|
|
68
69
|
this.remainingSourceBytes = limits.maxSourceBytes ?? Infinity;
|
|
69
70
|
this.remainingRows = limits.maxRows ?? Infinity;
|
|
71
|
+
this.sourceRowLimit = limits.maxRows;
|
|
70
72
|
this.sourceFileLimit = limits.maxRows;
|
|
71
73
|
this.remainingFiles = limits.maxRows ?? Infinity;
|
|
72
74
|
}
|
|
@@ -113,7 +115,7 @@ export class SegmentReader {
|
|
|
113
115
|
if (!read(end).equals(bytes) || fstatSync(fd, { bigint: true }).size < opened.size) failure();
|
|
114
116
|
// Count physical nonblank source rows before any canonical source map can grow.
|
|
115
117
|
if (this.remainingRows !== Infinity) for (const line of completeLines(bytes)) if (line.toString("utf8").trim()) {
|
|
116
|
-
if (this.remainingRows < 1) throw new SegmentReadBudgetError({ kind: "rows", limit: this.
|
|
118
|
+
if (this.remainingRows < 1) throw new SegmentReadBudgetError({ kind: "rows", limit: this.sourceRowLimit!, observed: this.sourceRows + 1 });
|
|
117
119
|
this.remainingRows--; this.sourceRows++;
|
|
118
120
|
}
|
|
119
121
|
const after = lstatSync(path, { bigint: true });
|
package/src/memory/config.ts
CHANGED
|
@@ -17,7 +17,7 @@ export const CONFIG_FILE = "amem.config.json";
|
|
|
17
17
|
export const REPO_CONFIG_DIR = ".amem";
|
|
18
18
|
export const REPO_CONFIG_FILE = "config";
|
|
19
19
|
const MAX_CONFIG_BYTES = 64 * 1024;
|
|
20
|
-
const MACHINE_KEYS = ["home", "denyPaths", "piiPatterns", "briefBytes", "excerptBytes", "capturePaths", "capture", "records"] as const;
|
|
20
|
+
const MACHINE_KEYS = ["home", "denyPaths", "piiPatterns", "briefBytes", "excerptBytes", "capturePaths", "capture", "records", "privateRemotes"] as const;
|
|
21
21
|
const REPO_KEYS = ["denyPaths", "piiPatterns", "briefBytes", "excerptBytes", "capturePaths", "records"] as const;
|
|
22
22
|
|
|
23
23
|
export interface AmemConfig {
|
|
@@ -35,6 +35,8 @@ export interface AmemConfig {
|
|
|
35
35
|
capturePaths?: number;
|
|
36
36
|
/** The capture tier's own R6 bounds. Machine file only (a repository cannot widen the machine's disk use). */
|
|
37
37
|
capture: { capMb?: number; retentionDays?: number };
|
|
38
|
+
/** Exact non-GitHub remote URLs the person attests are private (#420). A statement, not a check. Machine file only. */
|
|
39
|
+
privateRemotes?: string[];
|
|
38
40
|
}
|
|
39
41
|
export interface ConfigSource { machine: string | null; repo: string | null }
|
|
40
42
|
export interface LoadedConfig { config: AmemConfig; source: ConfigSource }
|
|
@@ -93,6 +95,13 @@ function parseFile(raw: unknown, label: string, keys: readonly string[]): Partia
|
|
|
93
95
|
if (beside.length) return fail(label, `names a home, so it is only a pointer; put ${beside.join(", ")} in ${join(body.home, CONFIG_FILE)}`);
|
|
94
96
|
out.home = body.home;
|
|
95
97
|
}
|
|
98
|
+
if (body.privateRemotes !== undefined) {
|
|
99
|
+
const remotes = listOf(body.privateRemotes, "privateRemotes", label);
|
|
100
|
+
if (remotes.length > 16) return fail(label, "privateRemotes names more than 16 remotes");
|
|
101
|
+
// GitHub visibility is always asked of GitHub; a URL carrying a password would put a secret in the policy file.
|
|
102
|
+
for (const url of remotes) if (/^\s*(?:[a-z][a-z0-9+.-]*:\/\/)?(?:[^@/]*@)?github\.com(?:[:/]|$)/i.test(url) || /\/\/[^/@]*:[^/@]*@/.test(url)) return fail(label, "privateRemotes lists a GitHub URL or a URL with a password; GitHub visibility is asked of GitHub, and credentials never belong in this file");
|
|
103
|
+
out.privateRemotes = remotes;
|
|
104
|
+
}
|
|
96
105
|
if (body.capture !== undefined) {
|
|
97
106
|
const capture = body.capture;
|
|
98
107
|
if (!capture || typeof capture !== "object" || Array.isArray(capture) || Object.keys(capture).some(key => !["capMb", "retentionDays"].includes(key))) return fail(label, "capture takes only capMb and retentionDays");
|
|
@@ -155,6 +164,7 @@ export function loadAmemConfig(base: string, repoRoot?: string): LoadedConfig {
|
|
|
155
164
|
if (piiPatterns.length > 64) fail(machinePath, "piiPatterns and the repository's piiPatterns name more than 64 entries together");
|
|
156
165
|
const config: AmemConfig = { denyPaths, piiPatterns, capture: { ...(machine?.capture ?? {}) } };
|
|
157
166
|
if (machine?.home !== undefined) config.home = machine.home;
|
|
167
|
+
if (machine?.privateRemotes?.length) config.privateRemotes = machine.privateRemotes;
|
|
158
168
|
if (machine?.records !== undefined || repo?.records !== undefined) config.records = machine?.records !== false && repo?.records !== false;
|
|
159
169
|
for (const key of ["briefBytes", "excerptBytes", "capturePaths"] as const) { const value = lower(machine?.[key], repo?.[key]); if (value !== undefined) config[key] = value; }
|
|
160
170
|
return { config, source: { machine: machineRaw === undefined ? null : machinePath, repo: repoPath } };
|
|
@@ -69,6 +69,8 @@ export class ShardHistoryAuditor {
|
|
|
69
69
|
readonly #origins = new Map<string, ShardHistoryOrigin>();
|
|
70
70
|
readonly #manifestOrigins = new Map<string, { commit: string; blob: string }>();
|
|
71
71
|
readonly #parents = new Map<string, string[]>();
|
|
72
|
+
/** Root tree of each hash-verified commit: a commit object is immutable, so an audited commit is not re-read (#420). */
|
|
73
|
+
readonly #roots = new Map<string, string>();
|
|
72
74
|
#running = false;
|
|
73
75
|
constructor(options: ShardHistoryAuditorOptions) {
|
|
74
76
|
this.#ref = shardSyncRef(options.realm);
|
|
@@ -217,7 +219,9 @@ export class ShardHistoryAuditor {
|
|
|
217
219
|
for (const line of lines) {
|
|
218
220
|
const [commit, ...parents] = line.split(" ");
|
|
219
221
|
if (!oid(commit) || parents.some(parent => !oid(parent)) || seen.has(commit)) return fail(); seen.add(commit);
|
|
220
|
-
const
|
|
222
|
+
const known = this.#roots.get(commit), verifiedRoot = !this.#options.object ? undefined
|
|
223
|
+
: known !== undefined && canonicalJSON(this.#parents.get(commit)) === canonicalJSON(parents) ? known : await this.#commit(commit, parents);
|
|
224
|
+
if (verifiedRoot !== undefined) this.#roots.set(commit, verifiedRoot);
|
|
221
225
|
if (this.#audited.has(commit)) { if (commit === tip) latest = await this.#tree(commit, verifiedRoot); continue; }
|
|
222
226
|
const current = await this.#tree(commit, verifiedRoot);
|
|
223
227
|
for (const parent of parents) {
|
|
@@ -35,10 +35,30 @@ export function assertPlacementViewAdvance(home: string, activation: SyncPlaceme
|
|
|
35
35
|
if (old !== undefined && !chain.commitments.includes(old)) fail();
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Last verified binding keyed by the lstat stamps of every object the full read checks (#420). A sync calls this several
|
|
40
|
+
* times per fence check; an unchanged stamp is the same identity the full read already accepts between its own reads.
|
|
41
|
+
* ponytail: one entry per process; drop it if a same-size rewrite inside one timestamp tick must be caught across calls.
|
|
42
|
+
*/
|
|
43
|
+
const freeze = <T>(value: T): T => { if (value && typeof value === "object" && !Object.isFrozen(value)) { for (const inner of Object.values(value)) freeze(inner); Object.freeze(value); } return value; };
|
|
44
|
+
let bindingMemo: { key: string; value: Pick<ActivePlacementBinding, "epoch" | "activation"> } | undefined;
|
|
38
45
|
/** No mutation/reader registration/index open. Missing preparation is distinct from malformed retained evidence. */
|
|
39
46
|
export function readActivePlacementBinding(homeInput: string, profileInput: unknown, shardsInput: unknown): ActivePlacementBinding | undefined {
|
|
40
47
|
const profile = validatePlacementProfile(profileInput), shards = validatePlacementShards(shardsInput, profile);
|
|
41
48
|
const home = realPath(homeInput), root = lstatSync(home, { bigint: true }); owned(root, true);
|
|
49
|
+
const stampKey = () => {
|
|
50
|
+
const dir = join(home, "sync-placement", "epochs", profile.placementHead), stamps: string[] = [];
|
|
51
|
+
for (const [file, isDir] of [[home, true], [join(home, "sync-placement"), true], [join(home, "sync-placement", "epochs"), true], [dir, true], [join(dir, "epoch.json"), false],
|
|
52
|
+
[join(dir, "activation.json"), false], [join(home, "sync-placement", "active.json"), false], [join(home, "profile.json"), false], [join(home, "shards.json"), false]] as const) {
|
|
53
|
+
const st = lstatSync(file, { bigint: true, throwIfNoEntry: false }); if (!st) return undefined; owned(st, isDir);
|
|
54
|
+
stamps.push([st.dev, st.ino, st.size, st.mtimeNs, st.ctimeNs].map(String).join(":"));
|
|
55
|
+
}
|
|
56
|
+
return canonicalJSON([home, canonicalJSON(profile), canonicalJSON(shards), stamps]);
|
|
57
|
+
}, memoKey = stampKey();
|
|
58
|
+
if (memoKey !== undefined && bindingMemo?.key === memoKey) {
|
|
59
|
+
assertPlacementViewAdvance(home, bindingMemo.value.activation, profile, shards);
|
|
60
|
+
return { profile, shards, epoch: bindingMemo.value.epoch, activation: bindingMemo.value.activation };
|
|
61
|
+
}
|
|
42
62
|
const checks: (() => void)[] = [() => { const now = lstatSync(home, { bigint: true }); owned(now, true); if (now.dev !== root.dev || now.ino !== root.ino) fail(); }];
|
|
43
63
|
const directory = (dir: string): boolean => {
|
|
44
64
|
const s = lstatSync(dir, { bigint: true, throwIfNoEntry: false }); if (!s) return false; owned(s, true);
|
|
@@ -71,5 +91,6 @@ export function readActivePlacementBinding(homeInput: string, profileInput: unkn
|
|
|
71
91
|
if (read(join(home, "profile.json"))?.text !== canonicalJSON(profile) + "\n" || read(join(home, "shards.json"))?.text !== canonicalJSON(shards) + "\n") fail();
|
|
72
92
|
assertPlacementViewAdvance(home, activation, profile, shards);
|
|
73
93
|
for (const check of checks) check();
|
|
94
|
+
if (memoKey !== undefined && stampKey() === memoKey) bindingMemo = { key: memoKey, value: { epoch: freeze(epoch), activation: freeze(activation) } };
|
|
74
95
|
return { profile, shards, epoch, activation };
|
|
75
96
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Placement sync size contract and its privacy-safe refusal receipt (#419). Numbers only: no row, path or policy text. */
|
|
2
|
+
import { types } from "node:util";
|
|
3
|
+
import { SyncPlacementJournalError } from "./sync-placement-journal-format.ts";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* One source envelope from activation to first sync: home-wide capture, the selected-source prefixes a publication
|
|
7
|
+
* plan binds, and the canonical rows materialization admits (selected sources plus verified incoming rows) share
|
|
8
|
+
* 64 MiB and 20000 rows. Journal limits are separate and unchanged (20000 records and 256 objects per epoch).
|
|
9
|
+
*/
|
|
10
|
+
export const PLACEMENT_SOURCE_MAX_BYTES = 64 * 1024 * 1024, PLACEMENT_SOURCE_MAX_ROWS = 20000;
|
|
11
|
+
|
|
12
|
+
export type PlacementSyncBoundPhase = "source-capture" | "materialization" | "publication-plan";
|
|
13
|
+
const KINDS = ["source-bytes", "source-rows", "journal-records", "journal-objects", "bytes", "rows", "source-files", "metadata-bytes", "row-bytes", "retained-identities"] as const;
|
|
14
|
+
export type PlacementSyncBoundKind = typeof KINDS[number];
|
|
15
|
+
export interface PlacementSyncBound { phase: PlacementSyncBoundPhase; kind: PlacementSyncBoundKind; limit: number; observed: number }
|
|
16
|
+
|
|
17
|
+
const phases: Record<PlacementSyncBoundPhase, string> = { "source-capture": "source capture", materialization: "materialization", "publication-plan": "publication planning" };
|
|
18
|
+
export function placementSyncBoundMessage(bound: PlacementSyncBound): string {
|
|
19
|
+
const remedy = bound.kind === "journal-records" || bound.kind === "journal-objects"
|
|
20
|
+
? "The active epoch journal cannot hold this publication; retain the inputs and report this bound."
|
|
21
|
+
: "Retain the inputs and report this bound; no row was omitted to fit.";
|
|
22
|
+
return `Placement sync refused before any publication attempt: ${phases[bound.phase]} exceeds its supported ${bound.kind} bound (observed ${bound.observed}, limit ${bound.limit}). No source, selector, epoch, journal or remote ref was changed. ${remedy}`;
|
|
23
|
+
}
|
|
24
|
+
/** Expected input refusal before a publication attempt exists. Code stays "bound" for existing callers. */
|
|
25
|
+
export class PlacementSyncBoundError extends SyncPlacementJournalError {
|
|
26
|
+
constructor(readonly bound: PlacementSyncBound) { super("bound"); this.message = placementSyncBoundMessage(bound); this.name = "PlacementSyncBoundError"; }
|
|
27
|
+
}
|
|
28
|
+
/** Only allowlisted own data properties of a journal bound error become a receipt; any other exception yields none. */
|
|
29
|
+
export function placementSyncBoundReceipt(error: unknown): PlacementSyncBound | undefined {
|
|
30
|
+
try {
|
|
31
|
+
if (!error || typeof error !== "object" || types.isProxy(error) || !(error instanceof SyncPlacementJournalError)) return undefined;
|
|
32
|
+
const own = (object: object, key: string): unknown => Object.getOwnPropertyDescriptor(object, key)?.value;
|
|
33
|
+
const raw = own(error, "bound"); if (own(error, "code") !== "bound" || !raw || typeof raw !== "object" || types.isProxy(raw)) return undefined;
|
|
34
|
+
const kind = own(raw, "kind"), limit = own(raw, "limit"), observed = own(raw, "observed"), phase = own(raw, "phase") ?? "source-capture";
|
|
35
|
+
if (typeof kind !== "string" || !(KINDS as readonly string[]).includes(kind) || typeof phase !== "string" || !Object.hasOwn(phases, phase)
|
|
36
|
+
|| typeof limit !== "number" || !Number.isSafeInteger(limit) || limit < 0 || typeof observed !== "number" || !Number.isSafeInteger(observed) || observed < 0) return undefined;
|
|
37
|
+
return { phase: phase as PlacementSyncBoundPhase, kind: kind as PlacementSyncBoundKind, limit, observed };
|
|
38
|
+
} catch { return undefined; }
|
|
39
|
+
}
|
|
@@ -22,6 +22,20 @@ import { assertPlacementRuntime } from "./sync-placement-guard.ts";
|
|
|
22
22
|
import { activationSourceMarkers, assertPlacementActivationOwner, type PlacementActivationOwner, type PlacementActivationCaptureProof } from "./sync-placement-activation-proof.ts";
|
|
23
23
|
import { readEffectiveSyncPlacementWriters, writerBoundPlacementContextHash, writerInventoryEvidence, type EffectiveSyncPlacementWriters } from "./sync-placement-effective-writers.ts";
|
|
24
24
|
import { SharedWriterRevisionError } from "./sync-placement-writer-revision-format.ts";
|
|
25
|
+
import { inspectionBoundReceipt, type InspectionBound } from "./inspection-bound.ts";
|
|
26
|
+
import { PLACEMENT_SOURCE_MAX_BYTES, PLACEMENT_SOURCE_MAX_ROWS } from "./sync-placement-bound.ts";
|
|
27
|
+
|
|
28
|
+
/** Home-wide source capture ceilings. Every file is read twice (bytes, then a stable recheck), so the read budget is 2x. */
|
|
29
|
+
export const PLACEMENT_CAPTURE_MAX_SOURCE_BYTES = PLACEMENT_SOURCE_MAX_BYTES, PLACEMENT_CAPTURE_MAX_ROWS = PLACEMENT_SOURCE_MAX_ROWS;
|
|
30
|
+
/** Source capture refusal before any effect. Code stays "bound" for existing callers; the message names the phase and bound. */
|
|
31
|
+
export class PlacementSourceBoundError extends SyncPlacementJournalError {
|
|
32
|
+
constructor(readonly bound?: InspectionBound) {
|
|
33
|
+
super("bound");
|
|
34
|
+
const detail = bound ? `${bound.kind} bound (observed ${bound.observed}, limit ${bound.limit})` : "read bound";
|
|
35
|
+
this.message = `Sync placement source capture exceeds its supported ${detail}; no journal, marker or source was changed. This is not journal corruption; retain the inputs and report this bound.`;
|
|
36
|
+
this.name = "PlacementSourceBoundError";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
25
39
|
|
|
26
40
|
/** Host authentication/compatibility facts are re-read at every effect boundary, never inferred from a session marker. */
|
|
27
41
|
export interface PlacementCapturePort {
|
|
@@ -64,12 +78,14 @@ function ownedDirectory(dir: string): BigIntStats {
|
|
|
64
78
|
if (!s.isDirectory() || s.isSymbolicLink() || s.uid !== BigInt(process.getuid!()) || (s.mode & 0o022n) !== 0n) fail();
|
|
65
79
|
return s;
|
|
66
80
|
}
|
|
67
|
-
/** ponytail: capture
|
|
68
|
-
*
|
|
81
|
+
/** ponytail: capture holds the whole home in memory, capped at 256 metadata objects and 64 MiB/20000 source rows
|
|
82
|
+
* across all realms (#414 raised 8 MiB; a 23 MB/10,248-row home was refused). Larger homes need a reviewed
|
|
83
|
+
* chunked/streaming activation proof; no input is silently omitted at this ceiling. */
|
|
69
84
|
function sourcePreview(homeInput: string, selected?: readonly PlacementRealm[], pending: readonly PlacementPendingSource[] = [], policyVersion?: string, ownerProof?: PlacementActivationCaptureProof, sourceOwner?:PlacementActivationOwner): PlacementSourcePreview {
|
|
70
85
|
let selection: PlacementRealm[] | undefined;
|
|
71
86
|
if (selected !== undefined) {
|
|
72
|
-
if (!Array.isArray(selected) || types.isProxy(selected)
|
|
87
|
+
if (!Array.isArray(selected) || types.isProxy(selected)) fail();
|
|
88
|
+
if (selected.length > 256) throw new PlacementSourceBoundError({ kind: "source-files", limit: 256, observed: selected.length });
|
|
73
89
|
const copied = memoryPolicySnapshot(selected); if (!copied) fail();
|
|
74
90
|
selection = copied.map(realm => validatePlacementKey({ realm, id: "0".repeat(32), rowHash: "0".repeat(64) }).realm);
|
|
75
91
|
if (!selection.length || new Set(selection.map(realm => canonicalJSON(realm))).size !== selection.length) fail();
|
|
@@ -87,7 +103,9 @@ function sourcePreview(homeInput: string, selected?: readonly PlacementRealm[],
|
|
|
87
103
|
const bytes = (file: string, optional = false): Buffer | undefined => {
|
|
88
104
|
const before = lstatSync(file, { bigint: true, throwIfNoEntry: false });
|
|
89
105
|
if (!before) { if (!optional) fail(); facts.push([file, null]); sourceChecks.push(() => { if(lstatSync(file,{throwIfNoEntry:false})) fail(); }); return undefined; }
|
|
90
|
-
if (++metadataObjects > 256
|
|
106
|
+
if (++metadataObjects > 256) throw new PlacementSourceBoundError({ kind: "source-files", limit: 256, observed: metadataObjects });
|
|
107
|
+
if (before.size > 262144n) throw new PlacementSourceBoundError({ kind: "metadata-bytes", limit: 262144, observed: Number(before.size) });
|
|
108
|
+
if (metadataBytes + Number(before.size) > 8 * 1024 * 1024) throw new PlacementSourceBoundError({ kind: "metadata-bytes", limit: 8 * 1024 * 1024, observed: metadataBytes + Number(before.size) });
|
|
91
109
|
if (!before.isFile() || before.isSymbolicLink() || before.nlink !== 1n || before.uid !== root.uid || (before.mode & 0o022n) !== 0n) fail();
|
|
92
110
|
const fd = openSync(file, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
93
111
|
try {
|
|
@@ -137,7 +155,7 @@ function sourcePreview(homeInput: string, selected?: readonly PlacementRealm[],
|
|
|
137
155
|
if(name==="profile.lock"&&sourceOwner){assertPlacementActivationOwner(sourceOwner,home);continue;}
|
|
138
156
|
if (lstatSync(join(home,name),{throwIfNoEntry:false})) fail();
|
|
139
157
|
}
|
|
140
|
-
const reader = new SegmentReader(
|
|
158
|
+
const reader = new SegmentReader(2 * PLACEMENT_CAPTURE_MAX_SOURCE_BYTES, { maxSourceBytes: PLACEMENT_CAPTURE_MAX_SOURCE_BYTES, maxRows: PLACEMENT_CAPTURE_MAX_ROWS });
|
|
141
159
|
const rows = new Map<string, PlacementSourceRow>(), specialRows = new Map<string, PlacementSpecialSourceRow>(), sourceRowsByRealm = new Map<string, readonly PruneSourceRow[]>();
|
|
142
160
|
const directories = [home], prefixes: PlacementPublicationSource[] = [];
|
|
143
161
|
const realms: SyncPlacementActivationContext["realms"][number][] = [];
|
|
@@ -147,7 +165,7 @@ function sourcePreview(homeInput: string, selected?: readonly PlacementRealm[],
|
|
|
147
165
|
directoryFact(dir); const listStamp = lstatSync(dir,{bigint:true});
|
|
148
166
|
sourceChecks.push(() => { if(!same(listStamp,lstatSync(dir,{bigint:true}))) fail(); });
|
|
149
167
|
const iterator = opendirSync(dir), names: string[] = [];
|
|
150
|
-
try { for (;;) { const item = iterator.readSync(); if (!item) break; if (names.length >= 256)
|
|
168
|
+
try { for (;;) { const item = iterator.readSync(); if (!item) break; if (names.length >= 256) throw new PlacementSourceBoundError({ kind: "source-files", limit: 256, observed: names.length + 1 }); names.push(item.name); } }
|
|
151
169
|
finally { iterator.closeSync(); }
|
|
152
170
|
names.sort(); facts.push([dir, names]); return names;
|
|
153
171
|
};
|
|
@@ -300,7 +318,7 @@ function previewSources(home:string,owner?:PlacementActivationOwner):PlacementSo
|
|
|
300
318
|
catch (error) {
|
|
301
319
|
if (error && typeof error === "object" && !types.isProxy(error)) {
|
|
302
320
|
if (error instanceof SyncPlacementJournalError) throw error;
|
|
303
|
-
if (error instanceof SegmentReadBudgetError)
|
|
321
|
+
if (error instanceof SegmentReadBudgetError) throw new PlacementSourceBoundError(inspectionBoundReceipt(error));
|
|
304
322
|
}
|
|
305
323
|
return fail();
|
|
306
324
|
}
|
|
@@ -352,7 +370,7 @@ export function captureSyncPlacementContext(home: string, port: PlacementCapture
|
|
|
352
370
|
if (error && typeof error === "object" && !types.isProxy(error)) {
|
|
353
371
|
if(error instanceof SharedWriterRevisionError){const code=Object.getOwnPropertyDescriptor(error,"code")?.value;if(code==="staging"||code==="pending")throw new SharedWriterRevisionError(code);}
|
|
354
372
|
if (error instanceof SyncPlacementJournalError) throw error;
|
|
355
|
-
if (error instanceof SegmentReadBudgetError)
|
|
373
|
+
if (error instanceof SegmentReadBudgetError) throw new PlacementSourceBoundError(inspectionBoundReceipt(error));
|
|
356
374
|
}
|
|
357
375
|
return fail();
|
|
358
376
|
}
|
|
@@ -366,7 +384,7 @@ export function captureSyncPlacementActivationContext(home: string, port: Placem
|
|
|
366
384
|
} catch (error) {
|
|
367
385
|
if (error && typeof error === "object" && !types.isProxy(error)) {
|
|
368
386
|
if (error instanceof SyncPlacementJournalError) throw error;
|
|
369
|
-
if (error instanceof SegmentReadBudgetError)
|
|
387
|
+
if (error instanceof SegmentReadBudgetError) throw new PlacementSourceBoundError(inspectionBoundReceipt(error));
|
|
370
388
|
}
|
|
371
389
|
return fail();
|
|
372
390
|
}
|
|
@@ -6,6 +6,7 @@ import { validatePruneRow } from "./prune.ts";
|
|
|
6
6
|
import { SUGGESTED } from "./store.ts";
|
|
7
7
|
import { placementKeyId, validatePlacementKey, type PlacementKey, type PlacementRealm } from "./sync-placement-journal-format.ts";
|
|
8
8
|
import type { OutboundVerdict, SyncPolicyCategory } from "./sync-screen.ts";
|
|
9
|
+
import { PLACEMENT_SOURCE_MAX_BYTES, PLACEMENT_SOURCE_MAX_ROWS } from "./sync-placement-bound.ts";
|
|
9
10
|
|
|
10
11
|
export interface DependencySource {
|
|
11
12
|
key: PlacementKey; row: unknown; sourcePlacement: "local" | "synced"; policy: OutboundVerdict; held: boolean;
|
|
@@ -85,11 +86,12 @@ function preflight(raw: unknown): void {
|
|
|
85
86
|
const source = descriptors(sources.own[String(i)]!.value), row = source.row;
|
|
86
87
|
if (!row || !("value" in row)) return fail();
|
|
87
88
|
bytes += size(row.value, 0) + 1;
|
|
88
|
-
if (bytes >
|
|
89
|
+
if (bytes > PLACEMENT_SOURCE_MAX_BYTES) fail();
|
|
89
90
|
}
|
|
90
91
|
for (const key of ["publicEndpoints", "verifiedPrunes"]) if (fields[key]) arrayFields(fields[key]!.value, 20000);
|
|
91
92
|
}
|
|
92
|
-
/** ponytail: descriptor-only JSON safety stops at
|
|
93
|
+
/** ponytail: descriptor-only JSON safety stops at depth 64, one million nodes and twice the 64 MiB source envelope
|
|
94
|
+
* (selected rows plus already-public endpoint evidence, which never exceeds the rows it backs; #419, 16 MiB before 0.26.3).
|
|
93
95
|
* A reviewed chunked endpoint interface is required before larger proofs can enter this compiler. */
|
|
94
96
|
function copyInput(value: unknown): unknown {
|
|
95
97
|
let bytes = 0, nodes = 0;
|
|
@@ -98,7 +100,7 @@ function copyInput(value: unknown): unknown {
|
|
|
98
100
|
if (++nodes > 1_000_000 || depth > 64) fail();
|
|
99
101
|
if (v === null || typeof v === "boolean") { bytes += 5; return v; }
|
|
100
102
|
if (typeof v === "number") { if (!Number.isFinite(v)) fail(); bytes += 24; return v; }
|
|
101
|
-
if (typeof v === "string") { bytes += Buffer.byteLength(v); if (bytes >
|
|
103
|
+
if (typeof v === "string") { bytes += Buffer.byteLength(v); if (bytes > 2 * PLACEMENT_SOURCE_MAX_BYTES) fail(); return v; }
|
|
102
104
|
if (!v || typeof v !== "object" || types.isProxy(v) || seen.has(v) || Object.getOwnPropertySymbols(v).length) fail();
|
|
103
105
|
const array = Array.isArray(v), proto = Object.getPrototypeOf(v);
|
|
104
106
|
if (array ? proto !== Array.prototype : proto !== Object.prototype && proto !== null) fail();
|
|
@@ -168,7 +170,7 @@ function compile(raw: PlacementDependencyInput): DependencyDecision[] {
|
|
|
168
170
|
const key = validatePlacementKey(item.key), row = object(item.row), id = placementKeyId(key);
|
|
169
171
|
if (!selected.has(realmId(key.realm)) || row.id !== key.id || hashJSON(row) !== key.rowHash) fail();
|
|
170
172
|
if (hashes.has(key.id) && hashes.get(key.id) !== key.rowHash) fail(); hashes.set(key.id, key.rowHash);
|
|
171
|
-
if (output && (sourceBytes += Buffer.byteLength(canonicalJSON(row) + "\n")) >
|
|
173
|
+
if (output && (sourceBytes += Buffer.byteLength(canonicalJSON(row) + "\n")) > PLACEMENT_SOURCE_MAX_BYTES + PLACEMENT_SOURCE_MAX_ROWS) fail();
|
|
172
174
|
let policy: OutboundVerdict = { ok: true };
|
|
173
175
|
if (output) {
|
|
174
176
|
const verdict = object(item.policy); keys(verdict, ["ok"], ["category"]);
|
|
@@ -64,7 +64,7 @@ const remedies: Record<SyncPlacementInspectionIncompleteReason, string> = {
|
|
|
64
64
|
"placement-not-active": "Placement is not active; complete the person-reviewed shard/public-prune migrations and separately authorized placement activation before inspecting placement.",
|
|
65
65
|
"binding-changed": "Selected placement bindings changed; inspect the retained activation to restore matching markers when required, then reopen the selected project/user handles and inspect again.",
|
|
66
66
|
"input-unavailable": "Selected source or placement-context inputs are unreadable, incomplete or unsupported; inspect retained source metadata and any recorded partial request, verify compatible writer pins, then inspect again.",
|
|
67
|
-
"input-bound": "Placement inspection exceeds its supported
|
|
67
|
+
"input-bound": "Placement inspection exceeds its supported 64 MiB/20000-row source-capture or retained-evidence bounds; request a person-reviewed bounded epoch transition before inspecting again.",
|
|
68
68
|
"input-changed": "The selected placement inspection context changed; wait for stable source, journal and policy bindings, then inspect again.",
|
|
69
69
|
"journal-unavailable": "The retained placement journal is incomplete or inconsistent; preserve it and resume its exact recorded request with a compatible runtime before inspecting again.",
|
|
70
70
|
"policy-unavailable": "The policy callback/version or configured/default-deny epoch is unavailable or changed; restore a stable policy and policyVersion before inspecting again.",
|