@miraland-labs/conduit-bridge 0.16.197 → 0.16.200
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 +19 -0
- package/dist/ensure-test-evidence.js +7 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -623,6 +623,14 @@ async function runner() {
|
|
|
623
623
|
: null;
|
|
624
624
|
if (rehearsalPlan)
|
|
625
625
|
reportedGateRehearsals = rehearsalPlan.reports;
|
|
626
|
+
const rehearsalWaiting = Boolean(workspace && onlineDriverIds(config).length && rehearsalPlan?.due
|
|
627
|
+
&& running.size === 0 && Object.keys(config.activeAttempts).length === 0 && !attemptsActiveOnComputer());
|
|
628
|
+
const waitingForRehearsalLock = rehearsalWaiting && gateRehearsalLockHeld();
|
|
629
|
+
rehearsalLockWaiting = waitingForRehearsalLock;
|
|
630
|
+
if (waitingForRehearsalLock && !reportedRehearsalLockWait) {
|
|
631
|
+
console.log(`Claim deferred: gate rehearsal due in ${rehearsalPlan?.due?.workspace}, another runner on this computer is rehearsing`);
|
|
632
|
+
}
|
|
633
|
+
reportedRehearsalLockWait = waitingForRehearsalLock;
|
|
626
634
|
const preflight = workspace
|
|
627
635
|
? await cachedBridgePreflight({ config, workspace, managedRoot, brief: currentBrief ?? undefined, refresh, agentTimeoutMs: timeoutMs })
|
|
628
636
|
: unavailableWorkspacePreflight({ config, managedRoot, agentTimeoutMs: timeoutMs });
|
|
@@ -739,6 +747,9 @@ async function runner() {
|
|
|
739
747
|
}
|
|
740
748
|
/** True while the gate rehearsal runs in the background. Waiting assignments do not interrupt it. */
|
|
741
749
|
let gateRehearsalRunning = false;
|
|
750
|
+
let claimsPaused;
|
|
751
|
+
let rehearsalLockWaiting = false;
|
|
752
|
+
let reportedRehearsalLockWait = false;
|
|
742
753
|
let gateRehearsalAbort = null;
|
|
743
754
|
let gateRehearsalDone = Promise.resolve();
|
|
744
755
|
/** An observation fingerprints the source checkout; a fast-forward under it reads as the observer writing. */
|
|
@@ -844,6 +855,13 @@ async function reportedRefresh(workspace, options = {}) {
|
|
|
844
855
|
}
|
|
845
856
|
return refresh;
|
|
846
857
|
}
|
|
858
|
+
function pausedClaimsPreflight() {
|
|
859
|
+
const reason = gateRehearsalRunning ? "gate_rehearsal" : rehearsalLockWaiting ? "gate_rehearsal_lock" : undefined;
|
|
860
|
+
claimsPaused = reason
|
|
861
|
+
? claimsPaused?.reason === reason ? claimsPaused : { reason, since: new Date().toISOString() }
|
|
862
|
+
: undefined;
|
|
863
|
+
return claimsPaused ? { claims_paused: claimsPaused } : {};
|
|
864
|
+
}
|
|
847
865
|
async function heartbeat(client, config, workspacePath, brief, preflight, intentProof, bootstrapResult) {
|
|
848
866
|
const online = onlineDriverIds(config);
|
|
849
867
|
const status = heartbeatStatusForDrivers(online);
|
|
@@ -867,6 +885,7 @@ async function heartbeat(client, config, workspacePath, brief, preflight, intent
|
|
|
867
885
|
...(assignmentPollBehindServer() ? { runner_behind_server: true } : {}),
|
|
868
886
|
...(process.env.CONDUIT_RUNNER_SERVICE === "container" ? { runner_service: "container" } : {}),
|
|
869
887
|
...(workspacePath && reportedGateRehearsals.length ? { gate_rehearsals: reportedGateRehearsals } : {}),
|
|
888
|
+
...pausedClaimsPreflight(),
|
|
870
889
|
};
|
|
871
890
|
const response = await client.request("/runner/v1/heartbeat", { method: "POST", body: JSON.stringify({
|
|
872
891
|
status,
|
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miraland-labs/conduit-bridge",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.200",
|
|
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": {
|