@buildr-ai/buildr 0.1.0-rc.24 → 0.1.0-rc.26
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/application-payload.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "buildr.application-payload/v1",
|
|
3
3
|
"packageName": "@buildr-ai/buildr",
|
|
4
|
-
"buildrVersion": "0.1.0-rc.
|
|
4
|
+
"buildrVersion": "0.1.0-rc.26",
|
|
5
5
|
"protocolIdentity": "buildr.web-protocol/v1",
|
|
6
|
-
"sourceCommit": "
|
|
6
|
+
"sourceCommit": "46158e982bcd405b18eb60152462458a12855345",
|
|
7
7
|
"enginesNode": ">=24.15.0 <25",
|
|
8
8
|
"productionDependencies": [
|
|
9
9
|
{
|
|
10
10
|
"name": "ajv",
|
|
11
|
-
"version": "8.
|
|
11
|
+
"version": "8.18.0",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"licensePath": "resources/licenses/dependencies/ajv-LICENSE"
|
|
14
14
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"path": "resources/product/package.json",
|
|
55
55
|
"mode": 420,
|
|
56
56
|
"size": 769,
|
|
57
|
-
"sha256": "
|
|
57
|
+
"sha256": "a2ae471618eefddf861ce20236e8fdd9f57d45468b3ddd38f6f676431289cd21"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"path": "resources/product/package/targets/runtime/skills/buildr/SKILL.md",
|
|
@@ -599,15 +599,15 @@
|
|
|
599
599
|
{
|
|
600
600
|
"path": "resources/runtime/read-worker.cjs",
|
|
601
601
|
"mode": 420,
|
|
602
|
-
"size":
|
|
603
|
-
"sha256": "
|
|
602
|
+
"size": 3655968,
|
|
603
|
+
"sha256": "ee159f2499e927ef762c9f124ccb9342161598d68906035ad8e9df31d0566d58"
|
|
604
604
|
},
|
|
605
605
|
{
|
|
606
606
|
"path": "runtime/buildr.cjs",
|
|
607
607
|
"mode": 420,
|
|
608
|
-
"size":
|
|
609
|
-
"sha256": "
|
|
608
|
+
"size": 3719112,
|
|
609
|
+
"sha256": "4c3b941d84c6aa1729dffa03088a8704676803cceafe9a807269177a1d60e3ac"
|
|
610
610
|
}
|
|
611
611
|
],
|
|
612
|
-
"applicationPayloadDigest": "sha256-
|
|
612
|
+
"applicationPayloadDigest": "sha256-6d898f5c79ce2247f5e93bf80f0f103b5910a1ba2dadd239192a5bce09e4eeb4"
|
|
613
613
|
}
|
package/installation-origin.json
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"channel": "npm",
|
|
4
4
|
"runtimeRole": "host",
|
|
5
5
|
"package": "@buildr-ai/buildr",
|
|
6
|
-
"version": "0.1.0-rc.
|
|
6
|
+
"version": "0.1.0-rc.26",
|
|
7
7
|
"protocolIdentity": "buildr.web-protocol/v1",
|
|
8
|
-
"applicationPayloadDigest": "sha256-
|
|
9
|
-
"sourceCommit": "
|
|
8
|
+
"applicationPayloadDigest": "sha256-6d898f5c79ce2247f5e93bf80f0f103b5910a1ba2dadd239192a5bce09e4eeb4",
|
|
9
|
+
"sourceCommit": "46158e982bcd405b18eb60152462458a12855345",
|
|
10
10
|
"sourceTag": null,
|
|
11
|
-
"installUnit": "@buildr-ai/buildr@0.1.0-rc.
|
|
12
|
-
"ownershipIdentity": "sha256-
|
|
11
|
+
"installUnit": "@buildr-ai/buildr@0.1.0-rc.26",
|
|
12
|
+
"ownershipIdentity": "sha256-249def5f6ad8b07d80a69bbcae5f28b81026938d5e91de999dfb604c73790b48"
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildr-ai/buildr",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.26",
|
|
4
4
|
"description": "Buildr CLI for managing Agent workspace assets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"node": ">=24.15.0 <25"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"ajv": "8.
|
|
31
|
+
"ajv": "8.18.0",
|
|
32
32
|
"yaml": "^2.9.0"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -16032,6 +16032,7 @@ var require_pattern = __commonJS({
|
|
|
16032
16032
|
"use strict";
|
|
16033
16033
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
16034
16034
|
var code_1 = require_code2();
|
|
16035
|
+
var util_1 = require_util();
|
|
16035
16036
|
var codegen_1 = require_codegen();
|
|
16036
16037
|
var error3 = {
|
|
16037
16038
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
@@ -16044,10 +16045,18 @@ var require_pattern = __commonJS({
|
|
|
16044
16045
|
$data: true,
|
|
16045
16046
|
error: error3,
|
|
16046
16047
|
code(cxt) {
|
|
16047
|
-
const { data, $data, schema: schema7, schemaCode, it } = cxt;
|
|
16048
|
+
const { gen, data, $data, schema: schema7, schemaCode, it } = cxt;
|
|
16048
16049
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
16049
|
-
|
|
16050
|
-
|
|
16050
|
+
if ($data) {
|
|
16051
|
+
const { regExp } = it.opts.code;
|
|
16052
|
+
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
16053
|
+
const valid = gen.let("valid");
|
|
16054
|
+
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
16055
|
+
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
16056
|
+
} else {
|
|
16057
|
+
const regExp = (0, code_1.usePattern)(cxt, schema7);
|
|
16058
|
+
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
16059
|
+
}
|
|
16051
16060
|
}
|
|
16052
16061
|
};
|
|
16053
16062
|
exports2.default = def;
|
|
@@ -46363,6 +46372,22 @@ function registerTaskFinishApplication(runtime2) {
|
|
|
46363
46372
|
const requestedTargetBranch = optionValue(command2.args, "--target-branch", null);
|
|
46364
46373
|
const requestedRemote = optionValue(command2.args, "--remote", null);
|
|
46365
46374
|
const currentIdentityMatchesRequest = current?.run?.identity?.task === task && (!requestedAgent || current.run.identity.agent === requestedAgent) && (!requestedTargetBranch || current.run.identity.targetBranch === requestedTargetBranch) && (!requestedRemote || current.run.identity.remote === requestedRemote);
|
|
46375
|
+
const preparedCompletionMatchesRun = current?.preparedCompletion?.task === current?.run?.identity?.task && current.preparedCompletion.runId === current.run.runId && current.preparedCompletion.handoffIdentity === current.run.identity.handoffIdentity && current.preparedCompletion.candidateIdentity === current.run.identity.candidateIdentity && current.preparedCompletion.candidateGeneration === current.run.identity.candidateGeneration && current.preparedCompletion.contentTargetIdentity === current.run.identity.contentTargetIdentity;
|
|
46376
|
+
const terminalPersistenceMismatch = currentIdentityMatchesRequest && current.run.status === "complete" && current.run.completion?.status === "complete" && current.preparedCompletion?.status === "complete" && preparedCompletionMatchesRun && current.lease == null && current.run.phases.every((phase2) => ["passed", "not-applicable"].includes(phase2.status)) && current.run.completion?.persistence?.code === "task_finish_current_query_fields_mismatch";
|
|
46377
|
+
if (terminalPersistenceMismatch) {
|
|
46378
|
+
const recoveredRun = structuredClone(current.run);
|
|
46379
|
+
recoveredRun.completion = structuredClone(current.preparedCompletion);
|
|
46380
|
+
const result6 = finishResult(recoveredRun);
|
|
46381
|
+
runtime2.finalizeTaskFinishPersistence(root, {
|
|
46382
|
+
run: recoveredRun,
|
|
46383
|
+
result: result6,
|
|
46384
|
+
completion: recoveredRun.completion
|
|
46385
|
+
});
|
|
46386
|
+
return print9({
|
|
46387
|
+
...inspectFinishRun({ root, runId: recoveredRun.runId, runtime: runtime2 }),
|
|
46388
|
+
persistenceRecovered: true
|
|
46389
|
+
}, command2.args);
|
|
46390
|
+
}
|
|
46366
46391
|
if (currentIdentityMatchesRequest && current.run.status === "complete" && current.run.completion?.status === "complete" && current.run.developmentHandoff) {
|
|
46367
46392
|
const result6 = reconcileTaskFinishDelivery({
|
|
46368
46393
|
runtime: runtime2,
|
|
@@ -49578,6 +49603,7 @@ function currentRecord(run2, { preparedCompletion = null, lease = null } = {}) {
|
|
|
49578
49603
|
function terminalRecord(run2, result5, completion2) {
|
|
49579
49604
|
const normalized = assertRun(run2);
|
|
49580
49605
|
const storedResult = compactResult(result5);
|
|
49606
|
+
const identityDigest = normalized.identityDigest || digest22(normalized.identity);
|
|
49581
49607
|
const fullCompletion = {
|
|
49582
49608
|
...clone6(completion2) || {},
|
|
49583
49609
|
task: normalized.identity.task,
|
|
@@ -49593,40 +49619,18 @@ function terminalRecord(run2, result5, completion2) {
|
|
|
49593
49619
|
completedAt: result5?.completedAt || timestamp8()
|
|
49594
49620
|
};
|
|
49595
49621
|
const phases2 = assertPhases(storedResult.phases);
|
|
49622
|
+
const queryFields = terminalQueryFields(fullCompletion, identityDigest);
|
|
49596
49623
|
return {
|
|
49597
49624
|
record: {
|
|
49598
49625
|
task_id: normalized.identity.task,
|
|
49599
49626
|
run_id: normalized.runId,
|
|
49600
49627
|
schema_version: CURRENT_SCHEMA,
|
|
49601
|
-
|
|
49602
|
-
identity_digest: normalized.identityDigest || digest22(normalized.identity),
|
|
49603
|
-
current_phase: "cleanup",
|
|
49604
|
-
handoff_identity: normalized.identity.handoffIdentity,
|
|
49605
|
-
candidate_identity: normalized.identity.candidateIdentity,
|
|
49606
|
-
candidate_generation: normalized.identity.candidateGeneration,
|
|
49607
|
-
content_target_identity: normalized.identity.contentTargetIdentity,
|
|
49608
|
-
target_branch: normalized.identity.targetBranch,
|
|
49609
|
-
target_remote: normalized.identity.remote || null,
|
|
49610
|
-
carrier_identity: normalized.deliveryCarrier?.identity || fullCompletion.carrierIdentity || null,
|
|
49611
|
-
repository_set_identity: repositorySetIdentity(normalized, storedResult),
|
|
49612
|
-
carrier_set_identity: carrierSetIdentity(normalized, storedResult, fullCompletion),
|
|
49613
|
-
delivery_set_identity: deliverySetIdentity(normalized, storedResult, fullCompletion),
|
|
49614
|
-
...associationValues(fullCompletion),
|
|
49615
|
-
primary_failure_phase: null,
|
|
49616
|
-
primary_failure_operation: null,
|
|
49617
|
-
primary_failure_class: null,
|
|
49618
|
-
primary_failure_code: null,
|
|
49619
|
-
primary_failure_status: null,
|
|
49620
|
-
primary_failure_exit_code: null,
|
|
49621
|
-
primary_failure_diagnostic_digest: null,
|
|
49622
|
-
resume_phase: null,
|
|
49623
|
-
resume_token: null,
|
|
49624
|
-
cleanup_status: fullCompletion.cleanup?.status || normalized.completion?.cleanup?.status || null,
|
|
49628
|
+
...queryFields,
|
|
49625
49629
|
lease_target_identity: null,
|
|
49626
49630
|
lease_token: null,
|
|
49627
49631
|
lease_expires_at: null,
|
|
49628
49632
|
phases_json: JSON.stringify(phases2),
|
|
49629
|
-
payload_json: JSON.stringify({ kind: "terminal", identityDigest
|
|
49633
|
+
payload_json: JSON.stringify({ kind: "terminal", identityDigest, completion: completionDetail(fullCompletion) }),
|
|
49630
49634
|
created_at: normalized.createdAt || fullCompletion.completedAt,
|
|
49631
49635
|
updated_at: timestamp8(),
|
|
49632
49636
|
completed_at: fullCompletion.completedAt
|
|
@@ -49654,8 +49658,7 @@ function decodeRow(row) {
|
|
|
49654
49658
|
const completion2 = clone6(payload2.completion);
|
|
49655
49659
|
completion2.result = { ...completion2.result || {}, phases: phases2 };
|
|
49656
49660
|
if (row.status !== "complete" || completion2.task !== row.task_id || completion2.runId !== row.run_id || completion2.status !== "complete") throw error("task_finish_terminal_payload_mismatch", "Task Finish terminal普通列与payload不一致。", 500, { taskId: row.task_id, runId: row.run_id });
|
|
49657
|
-
const expected = terminalQueryFields(completion2);
|
|
49658
|
-
expected.identity_digest = payload2.identityDigest || expected.identity_digest || row.identity_digest;
|
|
49661
|
+
const expected = terminalQueryFields(completion2, payload2.identityDigest || row.identity_digest);
|
|
49659
49662
|
assertQueryFields(row, expected);
|
|
49660
49663
|
return { kind: "terminal", completion: completion2, phases: phases2 };
|
|
49661
49664
|
}
|
|
@@ -49725,18 +49728,18 @@ function assertQueryFields(row, expected) {
|
|
|
49725
49728
|
const mismatches = QUERY_FIELDS.filter((field) => (row[field] ?? null) !== (expected[field] ?? null));
|
|
49726
49729
|
if (mismatches.length) throw error("task_finish_current_query_fields_mismatch", `Task Finish current普通列与payload不一致:${mismatches.join(", ")}。`, 500, { taskId: row.task_id, runId: row.run_id, mismatches });
|
|
49727
49730
|
}
|
|
49728
|
-
function terminalQueryFields(completion2) {
|
|
49731
|
+
function terminalQueryFields(completion2, identityDigest = null) {
|
|
49729
49732
|
const result5 = completion2.result || {};
|
|
49730
49733
|
return {
|
|
49731
|
-
identity_digest:
|
|
49734
|
+
identity_digest: identityDigest,
|
|
49732
49735
|
status: "complete",
|
|
49733
49736
|
current_phase: "cleanup",
|
|
49734
49737
|
handoff_identity: completion2.handoffIdentity,
|
|
49735
49738
|
candidate_identity: completion2.candidateIdentity,
|
|
49736
49739
|
candidate_generation: completion2.candidateGeneration,
|
|
49737
49740
|
content_target_identity: completion2.contentTargetIdentity,
|
|
49738
|
-
target_branch: completion2.targetBranch,
|
|
49739
|
-
target_remote: result5.identity?.remote
|
|
49741
|
+
target_branch: result5.identity?.targetBranch ?? completion2.targetBranch ?? null,
|
|
49742
|
+
target_remote: result5.identity?.remote ?? null,
|
|
49740
49743
|
carrier_identity: completion2.carrierIdentity || result5.carrier?.identity || null,
|
|
49741
49744
|
repository_set_identity: result5.repositorySetIdentity || result5.identity?.repositorySetIdentity || null,
|
|
49742
49745
|
carrier_set_identity: result5.carrierSetIdentity || completion2.carrierSetIdentity || null,
|
|
@@ -53402,6 +53405,7 @@ function createTaskFinishCliContributions(application = null) {
|
|
|
53402
53405
|
"Usage: buildr task finish reconcile --task <task-id> [--agent <agent>] [--target-branch <branch>] [--remote <name>] [--target <canonical-workspace>] [--detail <compact|full|self-bootstrap>] [--json]",
|
|
53403
53406
|
"",
|
|
53404
53407
|
"从current Development handoff解析交付身份;优先复用Task Environment repository set,缺失或已清理时从Task scope、registries与实际Git topology构造只读上下文,再读取真实远端ref逐仓库验证Task Contribution包含关系。",
|
|
53408
|
+
"若matching completed run仅因terminal query fields持久化校验失败而保留current,reconcile只复用受验证prepared completion原子补写terminal state,不重复观察远端、交付或cleanup。",
|
|
53405
53409
|
"不接受success、evidence、commit message、run token或手写proof;不会push、force push、改写共享历史或创建Delivery Carrier。",
|
|
53406
53410
|
"逐repository立即保存已证明Delivery;全部适用repository成立后提交Task交付终态。activation、Environment cleanup与diagnostics独立处理;无current Environment时cleanup不声称cleaned。"
|
|
53407
53411
|
],
|
package/runtime/buildr.cjs
CHANGED
|
@@ -18020,6 +18020,7 @@ var require_pattern = __commonJS({
|
|
|
18020
18020
|
"use strict";
|
|
18021
18021
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18022
18022
|
var code_1 = require_code2();
|
|
18023
|
+
var util_1 = require_util();
|
|
18023
18024
|
var codegen_1 = require_codegen();
|
|
18024
18025
|
var error3 = {
|
|
18025
18026
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
@@ -18032,10 +18033,18 @@ var require_pattern = __commonJS({
|
|
|
18032
18033
|
$data: true,
|
|
18033
18034
|
error: error3,
|
|
18034
18035
|
code(cxt) {
|
|
18035
|
-
const { data, $data, schema: schema7, schemaCode, it } = cxt;
|
|
18036
|
+
const { gen, data, $data, schema: schema7, schemaCode, it } = cxt;
|
|
18036
18037
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
18037
|
-
|
|
18038
|
-
|
|
18038
|
+
if ($data) {
|
|
18039
|
+
const { regExp } = it.opts.code;
|
|
18040
|
+
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
18041
|
+
const valid = gen.let("valid");
|
|
18042
|
+
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
18043
|
+
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
18044
|
+
} else {
|
|
18045
|
+
const regExp = (0, code_1.usePattern)(cxt, schema7);
|
|
18046
|
+
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
18047
|
+
}
|
|
18039
18048
|
}
|
|
18040
18049
|
};
|
|
18041
18050
|
exports2.default = def;
|
|
@@ -37329,6 +37338,22 @@ function registerTaskFinishApplication(runtime) {
|
|
|
37329
37338
|
const requestedTargetBranch = optionValue2(command2.args, "--target-branch", null);
|
|
37330
37339
|
const requestedRemote = optionValue2(command2.args, "--remote", null);
|
|
37331
37340
|
const currentIdentityMatchesRequest = current?.run?.identity?.task === task && (!requestedAgent || current.run.identity.agent === requestedAgent) && (!requestedTargetBranch || current.run.identity.targetBranch === requestedTargetBranch) && (!requestedRemote || current.run.identity.remote === requestedRemote);
|
|
37341
|
+
const preparedCompletionMatchesRun = current?.preparedCompletion?.task === current?.run?.identity?.task && current.preparedCompletion.runId === current.run.runId && current.preparedCompletion.handoffIdentity === current.run.identity.handoffIdentity && current.preparedCompletion.candidateIdentity === current.run.identity.candidateIdentity && current.preparedCompletion.candidateGeneration === current.run.identity.candidateGeneration && current.preparedCompletion.contentTargetIdentity === current.run.identity.contentTargetIdentity;
|
|
37342
|
+
const terminalPersistenceMismatch = currentIdentityMatchesRequest && current.run.status === "complete" && current.run.completion?.status === "complete" && current.preparedCompletion?.status === "complete" && preparedCompletionMatchesRun && current.lease == null && current.run.phases.every((phase2) => ["passed", "not-applicable"].includes(phase2.status)) && current.run.completion?.persistence?.code === "task_finish_current_query_fields_mismatch";
|
|
37343
|
+
if (terminalPersistenceMismatch) {
|
|
37344
|
+
const recoveredRun = structuredClone(current.run);
|
|
37345
|
+
recoveredRun.completion = structuredClone(current.preparedCompletion);
|
|
37346
|
+
const result6 = finishResult(recoveredRun);
|
|
37347
|
+
runtime.finalizeTaskFinishPersistence(root, {
|
|
37348
|
+
run: recoveredRun,
|
|
37349
|
+
result: result6,
|
|
37350
|
+
completion: recoveredRun.completion
|
|
37351
|
+
});
|
|
37352
|
+
return print9({
|
|
37353
|
+
...inspectFinishRun({ root, runId: recoveredRun.runId, runtime }),
|
|
37354
|
+
persistenceRecovered: true
|
|
37355
|
+
}, command2.args);
|
|
37356
|
+
}
|
|
37332
37357
|
if (currentIdentityMatchesRequest && current.run.status === "complete" && current.run.completion?.status === "complete" && current.run.developmentHandoff) {
|
|
37333
37358
|
const result6 = reconcileTaskFinishDelivery({
|
|
37334
37359
|
runtime,
|
|
@@ -40544,6 +40569,7 @@ function currentRecord(run2, { preparedCompletion = null, lease = null } = {}) {
|
|
|
40544
40569
|
function terminalRecord(run2, result5, completion2) {
|
|
40545
40570
|
const normalized = assertRun(run2);
|
|
40546
40571
|
const storedResult = compactResult(result5);
|
|
40572
|
+
const identityDigest = normalized.identityDigest || digest23(normalized.identity);
|
|
40547
40573
|
const fullCompletion = {
|
|
40548
40574
|
...clone6(completion2) || {},
|
|
40549
40575
|
task: normalized.identity.task,
|
|
@@ -40559,40 +40585,18 @@ function terminalRecord(run2, result5, completion2) {
|
|
|
40559
40585
|
completedAt: result5?.completedAt || timestamp8()
|
|
40560
40586
|
};
|
|
40561
40587
|
const phases2 = assertPhases(storedResult.phases);
|
|
40588
|
+
const queryFields = terminalQueryFields(fullCompletion, identityDigest);
|
|
40562
40589
|
return {
|
|
40563
40590
|
record: {
|
|
40564
40591
|
task_id: normalized.identity.task,
|
|
40565
40592
|
run_id: normalized.runId,
|
|
40566
40593
|
schema_version: CURRENT_SCHEMA,
|
|
40567
|
-
|
|
40568
|
-
identity_digest: normalized.identityDigest || digest23(normalized.identity),
|
|
40569
|
-
current_phase: "cleanup",
|
|
40570
|
-
handoff_identity: normalized.identity.handoffIdentity,
|
|
40571
|
-
candidate_identity: normalized.identity.candidateIdentity,
|
|
40572
|
-
candidate_generation: normalized.identity.candidateGeneration,
|
|
40573
|
-
content_target_identity: normalized.identity.contentTargetIdentity,
|
|
40574
|
-
target_branch: normalized.identity.targetBranch,
|
|
40575
|
-
target_remote: normalized.identity.remote || null,
|
|
40576
|
-
carrier_identity: normalized.deliveryCarrier?.identity || fullCompletion.carrierIdentity || null,
|
|
40577
|
-
repository_set_identity: repositorySetIdentity(normalized, storedResult),
|
|
40578
|
-
carrier_set_identity: carrierSetIdentity(normalized, storedResult, fullCompletion),
|
|
40579
|
-
delivery_set_identity: deliverySetIdentity(normalized, storedResult, fullCompletion),
|
|
40580
|
-
...associationValues(fullCompletion),
|
|
40581
|
-
primary_failure_phase: null,
|
|
40582
|
-
primary_failure_operation: null,
|
|
40583
|
-
primary_failure_class: null,
|
|
40584
|
-
primary_failure_code: null,
|
|
40585
|
-
primary_failure_status: null,
|
|
40586
|
-
primary_failure_exit_code: null,
|
|
40587
|
-
primary_failure_diagnostic_digest: null,
|
|
40588
|
-
resume_phase: null,
|
|
40589
|
-
resume_token: null,
|
|
40590
|
-
cleanup_status: fullCompletion.cleanup?.status || normalized.completion?.cleanup?.status || null,
|
|
40594
|
+
...queryFields,
|
|
40591
40595
|
lease_target_identity: null,
|
|
40592
40596
|
lease_token: null,
|
|
40593
40597
|
lease_expires_at: null,
|
|
40594
40598
|
phases_json: JSON.stringify(phases2),
|
|
40595
|
-
payload_json: JSON.stringify({ kind: "terminal", identityDigest
|
|
40599
|
+
payload_json: JSON.stringify({ kind: "terminal", identityDigest, completion: completionDetail(fullCompletion) }),
|
|
40596
40600
|
created_at: normalized.createdAt || fullCompletion.completedAt,
|
|
40597
40601
|
updated_at: timestamp8(),
|
|
40598
40602
|
completed_at: fullCompletion.completedAt
|
|
@@ -40620,8 +40624,7 @@ function decodeRow(row) {
|
|
|
40620
40624
|
const completion2 = clone6(payload2.completion);
|
|
40621
40625
|
completion2.result = { ...completion2.result || {}, phases: phases2 };
|
|
40622
40626
|
if (row.status !== "complete" || completion2.task !== row.task_id || completion2.runId !== row.run_id || completion2.status !== "complete") throw error("task_finish_terminal_payload_mismatch", "Task Finish terminal普通列与payload不一致。", 500, { taskId: row.task_id, runId: row.run_id });
|
|
40623
|
-
const expected = terminalQueryFields(completion2);
|
|
40624
|
-
expected.identity_digest = payload2.identityDigest || expected.identity_digest || row.identity_digest;
|
|
40627
|
+
const expected = terminalQueryFields(completion2, payload2.identityDigest || row.identity_digest);
|
|
40625
40628
|
assertQueryFields(row, expected);
|
|
40626
40629
|
return { kind: "terminal", completion: completion2, phases: phases2 };
|
|
40627
40630
|
}
|
|
@@ -40691,18 +40694,18 @@ function assertQueryFields(row, expected) {
|
|
|
40691
40694
|
const mismatches = QUERY_FIELDS.filter((field) => (row[field] ?? null) !== (expected[field] ?? null));
|
|
40692
40695
|
if (mismatches.length) throw error("task_finish_current_query_fields_mismatch", `Task Finish current普通列与payload不一致:${mismatches.join(", ")}。`, 500, { taskId: row.task_id, runId: row.run_id, mismatches });
|
|
40693
40696
|
}
|
|
40694
|
-
function terminalQueryFields(completion2) {
|
|
40697
|
+
function terminalQueryFields(completion2, identityDigest = null) {
|
|
40695
40698
|
const result5 = completion2.result || {};
|
|
40696
40699
|
return {
|
|
40697
|
-
identity_digest:
|
|
40700
|
+
identity_digest: identityDigest,
|
|
40698
40701
|
status: "complete",
|
|
40699
40702
|
current_phase: "cleanup",
|
|
40700
40703
|
handoff_identity: completion2.handoffIdentity,
|
|
40701
40704
|
candidate_identity: completion2.candidateIdentity,
|
|
40702
40705
|
candidate_generation: completion2.candidateGeneration,
|
|
40703
40706
|
content_target_identity: completion2.contentTargetIdentity,
|
|
40704
|
-
target_branch: completion2.targetBranch,
|
|
40705
|
-
target_remote: result5.identity?.remote
|
|
40707
|
+
target_branch: result5.identity?.targetBranch ?? completion2.targetBranch ?? null,
|
|
40708
|
+
target_remote: result5.identity?.remote ?? null,
|
|
40706
40709
|
carrier_identity: completion2.carrierIdentity || result5.carrier?.identity || null,
|
|
40707
40710
|
repository_set_identity: result5.repositorySetIdentity || result5.identity?.repositorySetIdentity || null,
|
|
40708
40711
|
carrier_set_identity: result5.carrierSetIdentity || completion2.carrierSetIdentity || null,
|
|
@@ -65988,6 +65991,7 @@ function createTaskFinishCliContributions(application = null) {
|
|
|
65988
65991
|
"Usage: buildr task finish reconcile --task <task-id> [--agent <agent>] [--target-branch <branch>] [--remote <name>] [--target <canonical-workspace>] [--detail <compact|full|self-bootstrap>] [--json]",
|
|
65989
65992
|
"",
|
|
65990
65993
|
"从current Development handoff解析交付身份;优先复用Task Environment repository set,缺失或已清理时从Task scope、registries与实际Git topology构造只读上下文,再读取真实远端ref逐仓库验证Task Contribution包含关系。",
|
|
65994
|
+
"若matching completed run仅因terminal query fields持久化校验失败而保留current,reconcile只复用受验证prepared completion原子补写terminal state,不重复观察远端、交付或cleanup。",
|
|
65991
65995
|
"不接受success、evidence、commit message、run token或手写proof;不会push、force push、改写共享历史或创建Delivery Carrier。",
|
|
65992
65996
|
"逐repository立即保存已证明Delivery;全部适用repository成立后提交Task交付终态。activation、Environment cleanup与diagnostics独立处理;无current Environment时cleanup不声称cleaned。"
|
|
65993
65997
|
],
|