@tritard/waterbrother 0.16.110 → 0.16.111
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 +1 -1
- package/src/cli.js +1 -0
- package/src/gateway.js +12 -0
- package/src/shared-project.js +1 -0
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -3269,6 +3269,7 @@ async function runTelegramLocalVerification(cwd) {
|
|
|
3269
3269
|
return {
|
|
3270
3270
|
outcome: error?.killed || error?.signal === "SIGTERM" ? "timeout" : (passedCount > 0 ? "partial" : "failed"),
|
|
3271
3271
|
summary: `${label} failed${passedCount > 0 ? ` after ${passedCount} passing check${passedCount === 1 ? "" : "s"}` : ""}.`,
|
|
3272
|
+
failedCommand: label,
|
|
3272
3273
|
commands,
|
|
3273
3274
|
startedAt,
|
|
3274
3275
|
completedAt: new Date().toISOString(),
|
package/src/gateway.js
CHANGED
|
@@ -586,6 +586,9 @@ function formatVerificationResultMarkup(result = {}, verifier = null) {
|
|
|
586
586
|
if (verifier) {
|
|
587
587
|
lines.splice(1, 0, `verifier: <code>${escapeTelegramHtml(verifier.ownerName || verifier.label || verifier.ownerId || verifier.id || "unknown")}</code>`);
|
|
588
588
|
}
|
|
589
|
+
if (result.failedCommand) {
|
|
590
|
+
lines.push(`failed step: <code>${escapeTelegramHtml(String(result.failedCommand || ""))}</code>`);
|
|
591
|
+
}
|
|
589
592
|
if (Array.isArray(result.commands) && result.commands.length) {
|
|
590
593
|
lines.push("commands:");
|
|
591
594
|
for (const command of result.commands) {
|
|
@@ -598,6 +601,14 @@ function formatVerificationResultMarkup(result = {}, verifier = null) {
|
|
|
598
601
|
if (Array.isArray(result.logs) && result.logs.length) {
|
|
599
602
|
lines.push("", "<b>Top errors</b>", ...result.logs.slice(0, 6).map((line) => `• ${escapeTelegramHtml(line)}`));
|
|
600
603
|
}
|
|
604
|
+
if (String(result.outcome || "").trim() !== "passed") {
|
|
605
|
+
lines.push(
|
|
606
|
+
"",
|
|
607
|
+
"<b>Next actions</b>",
|
|
608
|
+
"• <code>rerun verification</code>",
|
|
609
|
+
"• <code>override verification</code>"
|
|
610
|
+
);
|
|
611
|
+
}
|
|
601
612
|
return lines.filter(Boolean).join("\n");
|
|
602
613
|
}
|
|
603
614
|
|
|
@@ -3584,6 +3595,7 @@ class TelegramGateway {
|
|
|
3584
3595
|
verifierAgentId: String(verifier?.id || "").trim(),
|
|
3585
3596
|
outcome,
|
|
3586
3597
|
summary: `${label} failed${passedCount > 0 ? ` after ${passedCount} passing check${passedCount === 1 ? "" : "s"}` : ""}.`,
|
|
3598
|
+
failedCommand: label,
|
|
3587
3599
|
commands,
|
|
3588
3600
|
startedAt,
|
|
3589
3601
|
completedAt: new Date().toISOString(),
|
package/src/shared-project.js
CHANGED
|
@@ -98,6 +98,7 @@ function normalizeVerificationResult(result = {}) {
|
|
|
98
98
|
verifierAgentId: String(result.verifierAgentId || "").trim(),
|
|
99
99
|
outcome: ["passed", "failed", "partial", "timeout"].includes(outcome) ? outcome : "failed",
|
|
100
100
|
summary: String(result.summary || "").trim(),
|
|
101
|
+
failedCommand: String(result.failedCommand || "").trim(),
|
|
101
102
|
commands,
|
|
102
103
|
startedAt: String(result.startedAt || new Date().toISOString()).trim(),
|
|
103
104
|
completedAt: String(result.completedAt || result.startedAt || new Date().toISOString()).trim(),
|