@miraland-labs/conduit-bridge 0.16.198 → 0.16.203
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/dist/cli.js +1 -1
- package/dist/ensure-test-evidence.js +7 -3
- package/dist/investigation.js +20 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -628,7 +628,7 @@ async function runner() {
|
|
|
628
628
|
const waitingForRehearsalLock = rehearsalWaiting && gateRehearsalLockHeld();
|
|
629
629
|
rehearsalLockWaiting = waitingForRehearsalLock;
|
|
630
630
|
if (waitingForRehearsalLock && !reportedRehearsalLockWait) {
|
|
631
|
-
console.log(`Claim deferred
|
|
631
|
+
console.log(`Claim deferred: gate rehearsal due in ${rehearsalPlan?.due?.workspace}, another runner on this computer is rehearsing`);
|
|
632
632
|
}
|
|
633
633
|
reportedRehearsalLockWait = waitingForRehearsalLock;
|
|
634
634
|
const preflight = workspace
|
|
@@ -1019,7 +1019,12 @@ export async function ensureTestEvidence(input) {
|
|
|
1019
1019
|
// Downgrade those results here, with the same rule as parseAgentReport (driver.ts): the criterion
|
|
1020
1020
|
// becomes unknown / not_attempted, so the quality loop assesses the completed work.
|
|
1021
1021
|
const mappedCriteria = new Set(evidence.flatMap((item) => item.acceptance_criteria.map(criterionKey)));
|
|
1022
|
+
const witnessedCriteria = new Set(witnessed.flatMap((item) => item.acceptance_criteria.map(criterionKey)));
|
|
1022
1023
|
const acceptanceResults = input.report.acceptance_results.map((item) => {
|
|
1024
|
+
if (witnessedCriteria.has(criterionKey(item.criterion))) {
|
|
1025
|
+
const { unverified_reason, unverified_detail, ...verified } = item;
|
|
1026
|
+
return { ...verified, status: "met" };
|
|
1027
|
+
}
|
|
1023
1028
|
if (item.status !== "met" || mappedCriteria.has(criterionKey(item.criterion)))
|
|
1024
1029
|
return item;
|
|
1025
1030
|
return {
|
|
@@ -1032,9 +1037,8 @@ export async function ensureTestEvidence(input) {
|
|
|
1032
1037
|
...input.report,
|
|
1033
1038
|
limitations,
|
|
1034
1039
|
verification: [
|
|
1035
|
-
...input.report.verification,
|
|
1036
|
-
...commands.
|
|
1037
|
-
.map((command) => `${command} — exit 0`),
|
|
1040
|
+
...input.report.verification.filter((item) => !commands.some((command) => textNamesCommand(item, command))),
|
|
1041
|
+
...commands.map((command) => `${command} — exit 0`),
|
|
1038
1042
|
],
|
|
1039
1043
|
acceptance_results: acceptanceResults,
|
|
1040
1044
|
evidence,
|
package/dist/investigation.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { redactSecrets, redactSecretsDeep } from "./secret-redaction.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
|
-
import { boundedTail, runBoundedVerificationCommand } from "./ensure-test-evidence.js";
|
|
10
|
+
import { boundedTail, runBoundedVerificationCommand, VERIFICATION_TIMEOUT_MS } from "./ensure-test-evidence.js";
|
|
11
11
|
import { markAttemptActive } from "./preflight.js";
|
|
12
12
|
import { createAttemptWorktree, removeAttemptWorktree } from "./attempt-worktree.js";
|
|
13
13
|
import { buildWorkspaceBrief, ensureCommitAvailable, normalizeRepositoryUrl } from "./brief.js";
|
|
@@ -418,6 +418,10 @@ export const BRIDGE_PACKAGE_NAME = "@miraland-labs/conduit-bridge";
|
|
|
418
418
|
export const BRIDGE_SRC_PREFIX = "packages/conduit-bridge/src/";
|
|
419
419
|
export const PROBE_RUN_ENTRY = "packages/conduit-bridge/src/probe-run.ts";
|
|
420
420
|
export const DELIVERED_PROBE_SELF_CHECK_TAIL = "delivered probe instrument failed its self-check";
|
|
421
|
+
export const DELIVERED_PROBE_RUN_FAILED_TAIL = "delivered probe instrument failed its real run";
|
|
422
|
+
export function deliveredProbeTimeoutMs(probes) {
|
|
423
|
+
return probes.slice(0, PROBE_MAX).reduce((bound, probe) => bound + (probe.test?.trim() ? VERIFICATION_TIMEOUT_MS : PROBE_TIMEOUT_MS), PROBE_TIMEOUT_MS);
|
|
424
|
+
}
|
|
421
425
|
export const KNOWN_ANSWER_PROBES = [
|
|
422
426
|
{ key: "[known-holds]", lang: "sh", source: "echo 'PROBE HOLDS'\nexit 0", checks: "known answer: holds" },
|
|
423
427
|
{ key: "[known-fails]", lang: "sh", source: "echo 'PROBE FAILS'\nexit 1", checks: "known answer: fails" },
|
|
@@ -640,8 +644,8 @@ const deliveredWitnessSchema = z.object({
|
|
|
640
644
|
function stampInstrument(witnesses, instrument) {
|
|
641
645
|
return witnesses.map((witness) => ({ ...witness, instrument }));
|
|
642
646
|
}
|
|
643
|
-
function
|
|
644
|
-
const tail =
|
|
647
|
+
function markDeliveredProbeBroken(witnesses, label, reason) {
|
|
648
|
+
const tail = `${label}: ${boundedTail(reason, PROBE_TAIL_CHARS - label.length - 2)}`;
|
|
645
649
|
return stampInstrument(witnesses.map((witness) => ({
|
|
646
650
|
...witness,
|
|
647
651
|
verdict: "broken",
|
|
@@ -683,7 +687,7 @@ async function execDeliveredProbeRun(argv, stdin, workspace, timeoutMs) {
|
|
|
683
687
|
}
|
|
684
688
|
export async function runDeliveredProbeInstrument(input) {
|
|
685
689
|
const entry = join(input.workspace, PROBE_RUN_ENTRY);
|
|
686
|
-
const timeoutMs =
|
|
690
|
+
const timeoutMs = deliveredProbeTimeoutMs(input.probes);
|
|
687
691
|
const stdin = JSON.stringify({ probes: input.probes });
|
|
688
692
|
const argv = ["node", ...probeNodeFlags(), "--import", tsxLoader, entry];
|
|
689
693
|
const result = await (input.exec ?? execDeliveredProbeRun)(argv, stdin, input.workspace, timeoutMs);
|
|
@@ -710,15 +714,23 @@ export async function runDeliveryVerificationProbesForAttempt(input) {
|
|
|
710
714
|
let selfCheckDetail = null;
|
|
711
715
|
try {
|
|
712
716
|
const check = await runDelivered({ workspace: input.workspace, probes: KNOWN_ANSWER_PROBES });
|
|
713
|
-
if (knownAnswerProbesPassed(check)) {
|
|
714
|
-
|
|
717
|
+
if (!knownAnswerProbesPassed(check)) {
|
|
718
|
+
selfCheckDetail = `gave ${check.map((witness) => witness.verdict).join(", ")}`;
|
|
715
719
|
}
|
|
716
|
-
selfCheckDetail = `gave ${check.map((witness) => witness.verdict).join(", ")}`;
|
|
717
720
|
}
|
|
718
721
|
catch (error) {
|
|
719
722
|
selfCheckDetail = redactSecrets(error instanceof Error ? error.message : String(error));
|
|
720
723
|
}
|
|
721
|
-
|
|
724
|
+
if (selfCheckDetail !== null) {
|
|
725
|
+
return markDeliveredProbeBroken(await runRunning(), DELIVERED_PROBE_SELF_CHECK_TAIL, selfCheckDetail);
|
|
726
|
+
}
|
|
727
|
+
try {
|
|
728
|
+
return stampInstrument(await runDelivered({ workspace: input.workspace, probes: input.probes }), "delivered");
|
|
729
|
+
}
|
|
730
|
+
catch (error) {
|
|
731
|
+
const detail = redactSecrets(error instanceof Error ? error.message : String(error));
|
|
732
|
+
return markDeliveredProbeBroken(await runRunning(), DELIVERED_PROBE_RUN_FAILED_TAIL, detail);
|
|
733
|
+
}
|
|
722
734
|
}
|
|
723
735
|
async function settle(client, investigationId, body) {
|
|
724
736
|
await client.request(`/runner/v1/investigations/${investigationId}/settle`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miraland-labs/conduit-bridge",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.203",
|
|
4
4
|
"description": "Conduit Bridge CLI — join, connect, disconnect, multi-driver lanes, and run Claude Code / Codex / Cursor / OpenCode / Pi / Kiro / Antigravity / Grok Build agents for a Conduit organization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|