@lazyingart/agintiflow 0.20.243 → 0.20.245
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/package.json +4 -2
- package/scripts/smoke-context-budget-recovery.js +169 -44
- package/scripts/smoke-integration-production-mount.js +1 -1
- package/scripts/smoke-integration-production-runtime-bundle.js +39 -2
- package/scripts/smoke-integration-retained-idempotency-store.js +938 -0
- package/scripts/smoke-integration-retained-native-session-repository-state.js +1 -1
- package/scripts/smoke-progressive-tool-selection.js +30 -0
- package/src/agent-runner.js +59 -6
- package/src/integration-cli.js +3 -1
- package/src/integration-production-runtime-bundle.js +84 -19
- package/src/integration-retained-idempotency-store.js +2029 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.245",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgInTiFlow is a project-aware agent workspace for hybrid wet-dry R&D, hardware-aware intelligence, software automation, and industrial workflows.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"scripts/smoke-supervision-ledger.js",
|
|
68
68
|
"scripts/smoke-integration-production-mount.js",
|
|
69
69
|
"scripts/smoke-integration-production-runtime-bundle.js",
|
|
70
|
+
"scripts/smoke-integration-retained-idempotency-store.js",
|
|
70
71
|
"scripts/smoke-integration-storage-authority.js",
|
|
71
72
|
"scripts/smoke-integration-retained-durable-common.js",
|
|
72
73
|
"scripts/smoke-integration-retained-file-lock.js",
|
|
@@ -205,6 +206,7 @@
|
|
|
205
206
|
"smoke:supervision-ledger": "node scripts/smoke-supervision-ledger.js",
|
|
206
207
|
"smoke:integration-production-mount": "node scripts/smoke-integration-production-mount.js",
|
|
207
208
|
"smoke:integration-production-runtime-bundle": "node scripts/smoke-integration-production-runtime-bundle.js",
|
|
209
|
+
"smoke:integration-retained-idempotency-store": "node scripts/smoke-integration-retained-idempotency-store.js",
|
|
208
210
|
"smoke:integration-storage-authority": "node scripts/smoke-integration-storage-authority.js",
|
|
209
211
|
"smoke:integration-retained-durable-common": "node scripts/smoke-integration-retained-durable-common.js",
|
|
210
212
|
"smoke:integration-retained-file-lock": "node scripts/smoke-integration-retained-file-lock.js",
|
|
@@ -221,7 +223,7 @@
|
|
|
221
223
|
"storage:migrate": "node bin/aginti-cli.js storage migrate",
|
|
222
224
|
"publish:env": "node scripts/npm-publish-from-env.js publish --access public",
|
|
223
225
|
"publish:env:whoami": "node scripts/npm-publish-from-env.js whoami",
|
|
224
|
-
"test": "npm run check && npm run smoke:integration-production-mount && npm run smoke:integration-production-runtime-bundle && npm run smoke:integration-storage-authority && npm run smoke:integration-retained-durable-common && npm run smoke:integration-retained-file-lock && npm run smoke:integration-retained-event-ledger && npm run smoke:integration-retained-event-ledger-bundle && npm run smoke:integration-retained-repository-kernel && npm run smoke:integration-retained-session-state-store && npm run smoke:integration-retained-native-session-repository-state && npm run smoke:integration-retained-native-execution-evidence && npm run smoke:integration-retained-runtime-repository-surface && npm run smoke:integration-retained-runtime-repository-phase-b && npm run smoke:integration-runtime-repository-contract && npm run smoke:integration-runtime-authority && npm run smoke:localllm-provider && npm run smoke:localllm-model-tiers && npm run smoke:localllm-code-routing && npm run smoke:local-failure-recovery && npm run smoke:localllm-auto-max && npm run smoke:local-resource-policy && npm run smoke:context-budget-recovery && npm run smoke:session-runtime && npm run smoke:runtime-core && npm run smoke:progressive-tools && npm run smoke:truthful-completion && npm run smoke:document-artifact-quality && npm run smoke:writing-specialist-routing && npm run eval:local-first-agent && npm run eval:provider-attribution && npm run smoke:runtime-compat && npm run smoke:autoupdate && npm run smoke:web-api && npm run smoke:math-rendering && npm run smoke:web-ui && npm run smoke:web-autostart && npm run smoke:webapp-command && npm run smoke:web-port-fallback && npm run smoke:docker-command && npm run smoke:coding-tools && npm run smoke:dynamic-step-budget && npm run smoke:execution-policy && npm run smoke:aaps-adapter && npm run smoke:auxiliary-tools && npm run smoke:perception-research && npm run smoke:deep-research && npm run smoke:public-research && npm run smoke:safe-chat && npm run smoke:auth && npm run smoke:agentlink && npm run smoke:canvas-artifacts && npm run smoke:capabilities && npm run smoke:mcp && npm run smoke:model-roles && npm run smoke:platform && npm run smoke:permission-modes && npm run smoke:skills && npm run smoke:skillmesh && npm run smoke:supervision-ledger && npm run smoke:tmux-tools && npm run smoke:long-jobs && npm run smoke:run-stdin && npm run smoke:cli-chat && npm run smoke:inbox",
|
|
226
|
+
"test": "npm run check && npm run smoke:integration-production-mount && npm run smoke:integration-production-runtime-bundle && npm run smoke:integration-retained-idempotency-store && npm run smoke:integration-storage-authority && npm run smoke:integration-retained-durable-common && npm run smoke:integration-retained-file-lock && npm run smoke:integration-retained-event-ledger && npm run smoke:integration-retained-event-ledger-bundle && npm run smoke:integration-retained-repository-kernel && npm run smoke:integration-retained-session-state-store && npm run smoke:integration-retained-native-session-repository-state && npm run smoke:integration-retained-native-execution-evidence && npm run smoke:integration-retained-runtime-repository-surface && npm run smoke:integration-retained-runtime-repository-phase-b && npm run smoke:integration-runtime-repository-contract && npm run smoke:integration-runtime-authority && npm run smoke:localllm-provider && npm run smoke:localllm-model-tiers && npm run smoke:localllm-code-routing && npm run smoke:local-failure-recovery && npm run smoke:localllm-auto-max && npm run smoke:local-resource-policy && npm run smoke:context-budget-recovery && npm run smoke:session-runtime && npm run smoke:runtime-core && npm run smoke:progressive-tools && npm run smoke:truthful-completion && npm run smoke:document-artifact-quality && npm run smoke:writing-specialist-routing && npm run eval:local-first-agent && npm run eval:provider-attribution && npm run smoke:runtime-compat && npm run smoke:autoupdate && npm run smoke:web-api && npm run smoke:math-rendering && npm run smoke:web-ui && npm run smoke:web-autostart && npm run smoke:webapp-command && npm run smoke:web-port-fallback && npm run smoke:docker-command && npm run smoke:coding-tools && npm run smoke:dynamic-step-budget && npm run smoke:execution-policy && npm run smoke:aaps-adapter && npm run smoke:auxiliary-tools && npm run smoke:perception-research && npm run smoke:deep-research && npm run smoke:public-research && npm run smoke:safe-chat && npm run smoke:auth && npm run smoke:agentlink && npm run smoke:canvas-artifacts && npm run smoke:capabilities && npm run smoke:mcp && npm run smoke:model-roles && npm run smoke:platform && npm run smoke:permission-modes && npm run smoke:skills && npm run smoke:skillmesh && npm run smoke:supervision-ledger && npm run smoke:tmux-tools && npm run smoke:long-jobs && npm run smoke:run-stdin && npm run smoke:cli-chat && npm run smoke:inbox",
|
|
225
227
|
"pack:dry-run": "npm pack --dry-run",
|
|
226
228
|
"smoke:capabilities": "node scripts/smoke-capabilities.js"
|
|
227
229
|
},
|
|
@@ -125,57 +125,155 @@ const sentPlan = capturedPayload.messages.map((message) => message.content || ""
|
|
|
125
125
|
assert.ok(sentPlan.includes(HEAD), "plan request lost the exact task head");
|
|
126
126
|
assert.ok(sentPlan.includes(TAIL), "plan request lost the latest task tail");
|
|
127
127
|
|
|
128
|
+
const compactionState = {
|
|
129
|
+
goal: hugeGoal,
|
|
130
|
+
plan: "Use the existing routine and verify its artifact.",
|
|
131
|
+
messages: [
|
|
132
|
+
{ role: "system", content: "SYSTEM-HEAD\n" + "policy ".repeat(10000) + "\nSYSTEM-TAIL" },
|
|
133
|
+
{ role: "user", content: "first request" },
|
|
134
|
+
{
|
|
135
|
+
role: "user",
|
|
136
|
+
content:
|
|
137
|
+
"The runtime proactively compacted a long agent history before the provider context became inefficient or unstable. OLD-COMPACTION-MUST-NOT-RECUR",
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
role: "assistant",
|
|
141
|
+
content: "",
|
|
142
|
+
tool_calls: [
|
|
143
|
+
{
|
|
144
|
+
id: "deep-research-complete",
|
|
145
|
+
type: "function",
|
|
146
|
+
function: {
|
|
147
|
+
name: "deep_research",
|
|
148
|
+
arguments: '{"query":"reliability evidence","outputPath":"reports/reliability.md"}',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
role: "tool",
|
|
155
|
+
tool_call_id: "deep-research-complete",
|
|
156
|
+
content: JSON.stringify({
|
|
157
|
+
ok: true,
|
|
158
|
+
toolName: "deep_research",
|
|
159
|
+
version: 14,
|
|
160
|
+
researchId: "reliability-evidence-v14",
|
|
161
|
+
status: "completed",
|
|
162
|
+
stage: "completed",
|
|
163
|
+
reportPath: "reports/reliability.md",
|
|
164
|
+
artifactPath: ".aginti/deep-research-reliability.json",
|
|
165
|
+
queryCount: 10,
|
|
166
|
+
sourceCount: 16,
|
|
167
|
+
answer: "RESEARCH-COMPACTION-SUMMARY",
|
|
168
|
+
coverage: { requiredFirstPartyVerified: true },
|
|
169
|
+
audit: { citationCoverage: 1 },
|
|
170
|
+
}),
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
role: "assistant",
|
|
174
|
+
content: "",
|
|
175
|
+
tool_calls: [
|
|
176
|
+
{
|
|
177
|
+
id: "evidence-chunk-one",
|
|
178
|
+
type: "function",
|
|
179
|
+
function: {
|
|
180
|
+
name: "read_file",
|
|
181
|
+
arguments: '{"path":"reports/reliability.md","startLine":1,"lineLimit":50}',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
role: "tool",
|
|
188
|
+
tool_call_id: "evidence-chunk-one",
|
|
189
|
+
content: JSON.stringify({
|
|
190
|
+
ok: true,
|
|
191
|
+
toolName: "read_file",
|
|
192
|
+
path: "reports/reliability.md",
|
|
193
|
+
startLine: 1,
|
|
194
|
+
lineLimit: 50,
|
|
195
|
+
lineCount: 100,
|
|
196
|
+
bytes: 8000,
|
|
197
|
+
sha256: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
198
|
+
contentTruncated: false,
|
|
199
|
+
content: `EVIDENCE-CHUNK-ONE measured retry findings\n${"retry evidence ".repeat(220)}`,
|
|
200
|
+
}),
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
role: "assistant",
|
|
204
|
+
content: "",
|
|
205
|
+
tool_calls: [
|
|
206
|
+
{
|
|
207
|
+
id: "evidence-chunk-two",
|
|
208
|
+
type: "function",
|
|
209
|
+
function: {
|
|
210
|
+
name: "read_file",
|
|
211
|
+
arguments: '{"path":"reports/reliability.md","startLine":51,"lineLimit":50}',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
role: "tool",
|
|
218
|
+
tool_call_id: "evidence-chunk-two",
|
|
219
|
+
content: JSON.stringify({
|
|
220
|
+
ok: true,
|
|
221
|
+
toolName: "read_file",
|
|
222
|
+
path: "reports/reliability.md",
|
|
223
|
+
startLine: 51,
|
|
224
|
+
lineLimit: 50,
|
|
225
|
+
lineCount: 100,
|
|
226
|
+
bytes: 8000,
|
|
227
|
+
sha256: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
228
|
+
contentTruncated: false,
|
|
229
|
+
content: `EVIDENCE-CHUNK-TWO limitations and recommendations\n${"limitation evidence ".repeat(180)}`,
|
|
230
|
+
}),
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
role: "tool",
|
|
234
|
+
content: JSON.stringify({
|
|
235
|
+
ok: true,
|
|
236
|
+
toolName: "read_file",
|
|
237
|
+
path: "/evidence/Musia/SKILL.md",
|
|
238
|
+
bytes: 2048,
|
|
239
|
+
sha256: "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
|
|
240
|
+
contentTruncated: false,
|
|
241
|
+
content: [
|
|
242
|
+
"---",
|
|
243
|
+
"name: musia-music-production",
|
|
244
|
+
"description: Create and review songs through the established Musia production workflow.",
|
|
245
|
+
"---",
|
|
246
|
+
"# Musia Music Production",
|
|
247
|
+
"Use the existing CLI and preserve the reviewed song artifacts.",
|
|
248
|
+
].join("\n"),
|
|
249
|
+
commandEvidence: [{ command: "node bin/musia.js doctor --json" }],
|
|
250
|
+
pathEvidence: [{ path: "bin/musia.js" }],
|
|
251
|
+
}),
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
role: "tool",
|
|
255
|
+
content: JSON.stringify({
|
|
256
|
+
ok: true,
|
|
257
|
+
toolName: "list_files",
|
|
258
|
+
path: "/evidence/LALACHAN/scripts",
|
|
259
|
+
entries: [{ path: "scripts/xyq_cdp_browser.py" }, { path: "scripts/wait_downloaded_mp4.sh" }],
|
|
260
|
+
}),
|
|
261
|
+
},
|
|
262
|
+
{ role: "user", content: "latest interruption: send the finished PDF to this exact chat" },
|
|
263
|
+
],
|
|
264
|
+
};
|
|
128
265
|
const runtimeMessages = buildContextBudgetCompactionMessages(
|
|
129
|
-
|
|
130
|
-
goal: hugeGoal,
|
|
131
|
-
plan: "Use the existing routine and verify its artifact.",
|
|
132
|
-
messages: [
|
|
133
|
-
{ role: "system", content: "SYSTEM-HEAD\n" + "policy ".repeat(10000) + "\nSYSTEM-TAIL" },
|
|
134
|
-
{ role: "user", content: "first request" },
|
|
135
|
-
{
|
|
136
|
-
role: "user",
|
|
137
|
-
content:
|
|
138
|
-
"The runtime proactively compacted a long agent history before the provider context became inefficient or unstable. OLD-COMPACTION-MUST-NOT-RECUR",
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
role: "tool",
|
|
142
|
-
content: JSON.stringify({
|
|
143
|
-
ok: true,
|
|
144
|
-
toolName: "read_file",
|
|
145
|
-
path: "/evidence/Musia/SKILL.md",
|
|
146
|
-
bytes: 2048,
|
|
147
|
-
sha256: "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
|
|
148
|
-
contentTruncated: false,
|
|
149
|
-
content: [
|
|
150
|
-
"---",
|
|
151
|
-
"name: musia-music-production",
|
|
152
|
-
"description: Create and review songs through the established Musia production workflow.",
|
|
153
|
-
"---",
|
|
154
|
-
"# Musia Music Production",
|
|
155
|
-
"Use the existing CLI and preserve the reviewed song artifacts.",
|
|
156
|
-
].join("\n"),
|
|
157
|
-
commandEvidence: [{ command: "node bin/musia.js doctor --json" }],
|
|
158
|
-
pathEvidence: [{ path: "bin/musia.js" }],
|
|
159
|
-
}),
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
role: "tool",
|
|
163
|
-
content: JSON.stringify({
|
|
164
|
-
ok: true,
|
|
165
|
-
toolName: "list_files",
|
|
166
|
-
path: "/evidence/LALACHAN/scripts",
|
|
167
|
-
entries: [{ path: "scripts/xyq_cdp_browser.py" }, { path: "scripts/wait_downloaded_mp4.sh" }],
|
|
168
|
-
}),
|
|
169
|
-
},
|
|
170
|
-
{ role: "user", content: "latest interruption: send the finished PDF to this exact chat" },
|
|
171
|
-
],
|
|
172
|
-
},
|
|
266
|
+
compactionState,
|
|
173
267
|
config,
|
|
174
268
|
{ title: "", url: "" },
|
|
175
269
|
3,
|
|
176
270
|
{ reason: "test context recovery" }
|
|
177
271
|
);
|
|
178
272
|
const runtimeText = runtimeMessages.map((message) => message.content || "").join("\n");
|
|
273
|
+
const retainedNativeDeepResearch = runtimeMessages.find((message) =>
|
|
274
|
+
Array.isArray(message.tool_calls) &&
|
|
275
|
+
message.tool_calls.some((call) => call?.function?.name === "deep_research")
|
|
276
|
+
);
|
|
179
277
|
assert.ok(
|
|
180
278
|
estimateMessageTokens(runtimeMessages) <= 12288,
|
|
181
279
|
"runtime compaction exceeded the bounded LocalLLM retry target"
|
|
@@ -193,8 +291,35 @@ assert.ok(runtimeText.includes("sha256=1234567890abcdef"));
|
|
|
193
291
|
assert.ok(runtimeText.includes("content=complete"));
|
|
194
292
|
assert.ok(runtimeText.includes("node bin/musia.js doctor --json"));
|
|
195
293
|
assert.ok(runtimeText.includes("scripts/xyq_cdp_browser.py"));
|
|
294
|
+
assert.ok(retainedNativeDeepResearch, "native compaction lost the completed deep_research call");
|
|
295
|
+
assert.ok(runtimeText.includes("reliability-evidence-v14"));
|
|
296
|
+
assert.ok(runtimeText.includes('"version":14'));
|
|
297
|
+
assert.ok(runtimeText.includes("RESEARCH-COMPACTION-SUMMARY"));
|
|
298
|
+
assert.ok(runtimeText.includes("EVIDENCE-CHUNK-ONE"));
|
|
299
|
+
assert.ok(runtimeText.includes("EVIDENCE-CHUNK-TWO"));
|
|
300
|
+
assert.ok(runtimeText.includes("range=lines 1-50"));
|
|
301
|
+
assert.ok(runtimeText.includes("range=lines 51-100"));
|
|
196
302
|
assert.ok(!runtimeText.includes("OLD-COMPACTION-MUST-NOT-RECUR"));
|
|
197
303
|
assert.match(runtimeText, /Do not reread a listed source solely because compaction occurred/);
|
|
198
304
|
assert.match(runtimeText, /never restart a full-file read loop after compaction/);
|
|
199
305
|
|
|
306
|
+
const deepSeekRuntimeMessages = buildContextBudgetCompactionMessages(
|
|
307
|
+
compactionState,
|
|
308
|
+
{ ...config, provider: "deepseek", model: "deepseek-chat" },
|
|
309
|
+
{ title: "", url: "" },
|
|
310
|
+
3,
|
|
311
|
+
{ reason: "test DeepSeek context recovery" }
|
|
312
|
+
);
|
|
313
|
+
const deepSeekRuntimeText = deepSeekRuntimeMessages.map((message) => message.content || "").join("\n");
|
|
314
|
+
assert.ok(deepSeekRuntimeText.includes("Tool: deep_research"));
|
|
315
|
+
assert.ok(deepSeekRuntimeText.includes("reliability-evidence-v14"));
|
|
316
|
+
assert.ok(deepSeekRuntimeText.includes('"version":14'));
|
|
317
|
+
assert.ok(deepSeekRuntimeText.includes("RESEARCH-COMPACTION-SUMMARY"));
|
|
318
|
+
assert.ok(deepSeekRuntimeText.includes("EVIDENCE-CHUNK-ONE"));
|
|
319
|
+
assert.ok(deepSeekRuntimeText.includes("EVIDENCE-CHUNK-TWO"));
|
|
320
|
+
assert.ok(
|
|
321
|
+
estimateMessageTokens(deepSeekRuntimeMessages) <= 12288,
|
|
322
|
+
"DeepSeek runtime compaction exceeded the bounded retry target"
|
|
323
|
+
);
|
|
324
|
+
|
|
200
325
|
console.log("context budget recovery smoke passed");
|
|
@@ -1105,7 +1105,7 @@ async function main() {
|
|
|
1105
1105
|
assert.equal(summary.runtimeBundle.firstBlocker?.component, "idempotencyStore");
|
|
1106
1106
|
assert.equal(
|
|
1107
1107
|
summary.runtimeBundle.firstBlocker?.code,
|
|
1108
|
-
"
|
|
1108
|
+
"INTEGRATION_IDEMPOTENCY_TRUSTED_RECOVERY_RECEIPT_AUTHORITY_UNAVAILABLE"
|
|
1109
1109
|
);
|
|
1110
1110
|
} else {
|
|
1111
1111
|
assert.equal(summary.runtimeBundle.firstBlocker?.component, "storageAuthority");
|
|
@@ -12,6 +12,9 @@ import {
|
|
|
12
12
|
openIntegrationProductionRuntimeBundle,
|
|
13
13
|
preflightIntegrationProductionRuntimeBundle,
|
|
14
14
|
} from "../src/integration-production-runtime-bundle.js";
|
|
15
|
+
import {
|
|
16
|
+
INTEGRATION_RETAINED_IDEMPOTENCY_SNAPSHOT_FILE,
|
|
17
|
+
} from "../src/integration-retained-idempotency-store.js";
|
|
15
18
|
import { contractDigest } from "../src/integration-policy.js";
|
|
16
19
|
|
|
17
20
|
const UID = process.getuid();
|
|
@@ -73,6 +76,7 @@ async function provisionRuntimeRoot(stateRoot, { omitEventLock = false } = {}) {
|
|
|
73
76
|
await ensureLockFile(paths.repositoryLock);
|
|
74
77
|
await ensureLockFile(paths.sessionLock);
|
|
75
78
|
if (!omitEventLock) await ensureLockFile(paths.eventLedgerLock);
|
|
79
|
+
await ensureLockFile(paths.idempotencyLock);
|
|
76
80
|
return paths;
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -215,6 +219,9 @@ async function run() {
|
|
|
215
219
|
path.join(os.tmpdir(), "aginti-production-runtime-lock-replacement-")
|
|
216
220
|
);
|
|
217
221
|
const failedRoot = await fs.mkdtemp(path.join(os.tmpdir(), "aginti-production-runtime-failed-"));
|
|
222
|
+
const idempotencyCorruptionRoot = await fs.mkdtemp(
|
|
223
|
+
path.join(os.tmpdir(), "aginti-production-runtime-idempotency-corrupt-")
|
|
224
|
+
);
|
|
218
225
|
try {
|
|
219
226
|
const paths = await provisionRuntimeRoot(stateRoot);
|
|
220
227
|
assert.equal(paths.repository, path.join(stateRoot, "runtime-authority", "repository"));
|
|
@@ -230,7 +237,7 @@ async function run() {
|
|
|
230
237
|
assert.equal(check.firstBlocker.component, "idempotencyStore");
|
|
231
238
|
assert.equal(
|
|
232
239
|
check.firstBlocker.code,
|
|
233
|
-
"
|
|
240
|
+
"INTEGRATION_IDEMPOTENCY_TRUSTED_RECOVERY_RECEIPT_AUTHORITY_UNAVAILABLE"
|
|
234
241
|
);
|
|
235
242
|
assert.equal(check.components.storageAuthority.descriptorBound, true);
|
|
236
243
|
assert.equal(check.components.repository.descriptorBound, true);
|
|
@@ -240,7 +247,14 @@ async function run() {
|
|
|
240
247
|
assert.equal(check.components.eventLedger.runtimeAppendView, true);
|
|
241
248
|
assert.equal(check.components.eventLedger.sessionReadView, true);
|
|
242
249
|
assert.equal(check.components.idempotencyStore.namespaceDescriptorBound, true);
|
|
250
|
+
assert.equal(check.components.idempotencyStore.descriptorBound, true);
|
|
243
251
|
assert.equal(check.components.idempotencyStore.transactionalStore, false);
|
|
252
|
+
assert.equal(check.components.idempotencyStore.recoveryAuthorityBound, false);
|
|
253
|
+
assert.equal(check.components.idempotencyStore.trustedRecoveryReceiptAuthorityBound, false);
|
|
254
|
+
assert.equal(check.components.idempotencyStore.publicMutationResponseByteEnvelopeCovered, true);
|
|
255
|
+
assert.equal(check.components.idempotencyStore.boundedTransactionalSubstrate, true);
|
|
256
|
+
assert.equal(check.components.idempotencyStore.integrationApiCompatibleWhenRecoveryBound, false);
|
|
257
|
+
assert.notEqual(check.components.idempotencyStore.proofDigest, "0".repeat(64));
|
|
244
258
|
assert.equal(check.components.nativeExecutor.lexicalProofPresent, true);
|
|
245
259
|
assert.equal(check.components.nativeExecutor.retainedSessionStateBound, false);
|
|
246
260
|
assert.equal(check.components.nativeExecutor.artifactEvents, false);
|
|
@@ -266,7 +280,7 @@ async function run() {
|
|
|
266
280
|
assert.equal(bundle.attestation.capabilityEnabled, false);
|
|
267
281
|
assert.equal(bundle.attestation.httpServingEnabled, false);
|
|
268
282
|
assert.equal(bundle.attestation.runtimeActivated, false);
|
|
269
|
-
assert.
|
|
283
|
+
assert.notEqual(bundle.attestation.idempotencyProofDigest, "0".repeat(64));
|
|
270
284
|
assert.equal(bundle.attestation.blockers[0].component, "idempotencyStore");
|
|
271
285
|
assert.equal(bundle.attestation.limitations, INTEGRATION_PRODUCTION_RUNTIME_BUNDLE_LIMITATIONS);
|
|
272
286
|
assert.equal("start" in bundle, false);
|
|
@@ -366,6 +380,28 @@ async function run() {
|
|
|
366
380
|
assert.equal((await recoveredFromFactoryFailure.health()).healthy, true);
|
|
367
381
|
await recoveredFromFactoryFailure.close();
|
|
368
382
|
|
|
383
|
+
const corruptIdempotencyPaths = await provisionRuntimeRoot(idempotencyCorruptionRoot);
|
|
384
|
+
await fs.writeFile(
|
|
385
|
+
path.join(
|
|
386
|
+
corruptIdempotencyPaths.idempotency,
|
|
387
|
+
INTEGRATION_RETAINED_IDEMPOTENCY_SNAPSHOT_FILE
|
|
388
|
+
),
|
|
389
|
+
"{}\n",
|
|
390
|
+
{ mode: 0o600 }
|
|
391
|
+
);
|
|
392
|
+
await expectCode(
|
|
393
|
+
() => openIntegrationProductionRuntimeBundle({
|
|
394
|
+
stateRoot: idempotencyCorruptionRoot,
|
|
395
|
+
}),
|
|
396
|
+
"IDEMPOTENCY_STORE_CORRUPT"
|
|
397
|
+
);
|
|
398
|
+
const corruptIdempotencyCheck = await checkIntegrationProductionRuntimeBundle({
|
|
399
|
+
stateRoot: idempotencyCorruptionRoot,
|
|
400
|
+
});
|
|
401
|
+
assert.equal(corruptIdempotencyCheck.healthy, false);
|
|
402
|
+
assert.equal(corruptIdempotencyCheck.firstBlocker.component, "idempotencyStore");
|
|
403
|
+
assert.equal(corruptIdempotencyCheck.firstBlocker.code, "IDEMPOTENCY_STORE_CORRUPT");
|
|
404
|
+
|
|
369
405
|
const [cliSource, serverSource, bundleSource] = await Promise.all([
|
|
370
406
|
fs.readFile(new URL("../src/integration-cli.js", import.meta.url), "utf8"),
|
|
371
407
|
fs.readFile(new URL("../src/integration-server.js", import.meta.url), "utf8"),
|
|
@@ -384,6 +420,7 @@ async function run() {
|
|
|
384
420
|
await fs.rm(lockModeRoot, { recursive: true, force: true });
|
|
385
421
|
await fs.rm(lockReplacementRoot, { recursive: true, force: true });
|
|
386
422
|
await fs.rm(failedRoot, { recursive: true, force: true });
|
|
423
|
+
await fs.rm(idempotencyCorruptionRoot, { recursive: true, force: true });
|
|
387
424
|
}
|
|
388
425
|
|
|
389
426
|
process.stdout.write("integration production runtime bundle smoke: ok\n");
|