omp-conductor 0.19.7 → 0.20.1
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/REFERENCE.md +10 -1
- package/agents/to-spec.md +76 -9
- package/package.json +1 -1
- package/schema/config.schema.json +4 -0
- package/src/admission.ts +58 -14
- package/src/arm-challenge.ts +255 -85
- package/src/ask.ts +130 -615
- package/src/board.ts +7 -1
- package/src/brief-upgrade.ts +24 -0
- package/src/briefs/console.md +258 -0
- package/src/briefs/correction.md +203 -0
- package/src/briefs/orchestrator.md +167 -97
- package/src/briefs/policy.md +19 -16
- package/src/briefs/to-spec.md +76 -9
- package/src/briefs/worker.md +50 -16
- package/src/cli.ts +4 -0
- package/src/command-manifest.ts +54 -8
- package/src/commands/arm.ts +115 -49
- package/src/commands/console.ts +70 -0
- package/src/commands/context.ts +2 -0
- package/src/commands/epic.ts +132 -0
- package/src/commands/extend.ts +9 -1
- package/src/commands/intake.ts +44 -14
- package/src/commands/stats.ts +19 -4
- package/src/commands/worker.ts +9 -1
- package/src/config-schema.ts +13 -0
- package/src/config.ts +27 -0
- package/src/daemon/ack.ts +159 -0
- package/src/daemon/admission-pass.ts +135 -0
- package/src/daemon/brief.ts +461 -0
- package/src/daemon/deps.ts +539 -0
- package/src/daemon/dispatch.ts +1779 -0
- package/src/daemon/drain.ts +185 -0
- package/src/daemon/groom-pass.ts +422 -0
- package/src/daemon/http.ts +417 -0
- package/src/daemon/integrity.ts +108 -0
- package/src/daemon/panes.ts +180 -0
- package/src/daemon/review.ts +1888 -0
- package/src/daemon/runtime.ts +788 -0
- package/src/daemon/settle-pass.ts +606 -0
- package/src/daemon/supervision.ts +438 -0
- package/src/daemon/tick.ts +968 -0
- package/src/daemon/views.ts +751 -0
- package/src/daemon.ts +105 -7923
- package/src/dashboard/app.js +58 -0
- package/src/dashboard/controls.ts +22 -3
- package/src/dashboard/server.ts +4 -0
- package/src/diff-flags.ts +135 -9
- package/src/doctor.ts +2 -2
- package/src/failure-class.ts +257 -2
- package/src/fleet.ts +295 -176
- package/src/groom.ts +461 -0
- package/src/http-token.ts +142 -0
- package/src/knowledge.ts +229 -0
- package/src/mining.ts +316 -0
- package/src/orchestrator-tick.ts +689 -1670
- package/src/ready-gate.ts +267 -0
- package/src/settlement.ts +107 -11
- package/src/setup-host.ts +32 -9
- package/src/setup-wizard.ts +55 -7
- package/src/setup.ts +229 -3
- package/src/stats.ts +257 -2
- package/src/status-render.ts +169 -14
- package/src/store.ts +618 -28
- package/src/to-spec.ts +426 -44
- package/src/tracker/github.ts +50 -0
- package/src/types.ts +434 -18
- package/src/verbs/protocol.ts +28 -0
- package/src/verbs/server.ts +330 -39
- package/src/wake.ts +19 -2
- package/src/worker.ts +570 -1
package/src/tracker/github.ts
CHANGED
|
@@ -486,6 +486,40 @@ export function prVerificationFrom(
|
|
|
486
486
|
return { status: "green", reason: `${checks.length} checks succeeded or were skipped`, headSha };
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
+
/**
|
|
490
|
+
* Whether one raw `gh pr view --json ...statusCheckRollup` payload collected
|
|
491
|
+
* zero rollup contexts (#999).
|
|
492
|
+
*
|
|
493
|
+
* {@link prVerificationFrom} maps zero collected checks to `pending` — "GitHub
|
|
494
|
+
* has not reported any checks yet" — which is the right refusal when it is
|
|
495
|
+
* true, and a silent stall when it is not. It is not always true: a head whose
|
|
496
|
+
* PR was opened by `github-actions[bot]` carries a second, empty
|
|
497
|
+
* `action_required` check suite beside the completed one, and the rollup read
|
|
498
|
+
* can resolve that empty suite and collect nothing while 18 check-runs
|
|
499
|
+
* (one of them failed) sit on the same SHA. So the caller uses this to treat
|
|
500
|
+
* an empty rollup as *unresolvable* and re-prove from the REST plane, which
|
|
501
|
+
* flattens every page of both `check_runs` and `statuses` for the exact head
|
|
502
|
+
* and sees all of them.
|
|
503
|
+
*
|
|
504
|
+
* A missing rollup counts as zero collected, exactly as
|
|
505
|
+
* {@link prVerificationFrom}'s `?? []` does. A body this predicate cannot read
|
|
506
|
+
* — unparseable, not a JSON object (a bare list is not a `pr view` payload),
|
|
507
|
+
* or a rollup that is not a list — is not its problem: it answers false so the
|
|
508
|
+
* existing verdict stands unchanged.
|
|
509
|
+
*/
|
|
510
|
+
export function rollupCollectedNoChecks(raw: string): boolean {
|
|
511
|
+
let parsed: unknown;
|
|
512
|
+
try {
|
|
513
|
+
parsed = JSON.parse(raw) as unknown;
|
|
514
|
+
} catch {
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return false;
|
|
518
|
+
const rollup = (parsed as GhPrVerification).statusCheckRollup;
|
|
519
|
+
if (rollup === undefined || rollup === null) return true;
|
|
520
|
+
return Array.isArray(rollup) && rollup.length === 0;
|
|
521
|
+
}
|
|
522
|
+
|
|
489
523
|
function failedCheck(raw: string): GhCheck | undefined {
|
|
490
524
|
const checks = (JSON.parse(raw) as GhPrVerification).statusCheckRollup ?? [];
|
|
491
525
|
return checks.find((check) => checkVerdict(check) === "failed");
|
|
@@ -2024,6 +2058,22 @@ export function makeTracker(
|
|
|
2024
2058
|
"state,isDraft,headRefOid,statusCheckRollup",
|
|
2025
2059
|
]);
|
|
2026
2060
|
const verification = prVerificationFrom(raw, expectedHead, opts);
|
|
2061
|
+
if (verification.status === "pending" && rollupCollectedNoChecks(raw)) {
|
|
2062
|
+
// An empty rollup is not proof that the head has no checks (#999):
|
|
2063
|
+
// a PR opened by `github-actions[bot]` carries a second, empty
|
|
2064
|
+
// `action_required` suite beside the completed one, the rollup read
|
|
2065
|
+
// resolves that suite, collects nothing, and this verdict reads
|
|
2066
|
+
// "GitHub has not reported any checks yet" over a head with 18
|
|
2067
|
+
// check-runs and a failure among them. A commit that carries an
|
|
2068
|
+
// empty suite beside a completed one is not a commit with no
|
|
2069
|
+
// checks, so zero collected contexts is unresolvable rather than
|
|
2070
|
+
// decisive: re-prove from REST, which flattens every page of both
|
|
2071
|
+
// `check_runs` and `statuses` for the exact head. REST that cannot
|
|
2072
|
+
// answer leaves this pending exactly as it stands — fail-closed,
|
|
2073
|
+
// never green by omission.
|
|
2074
|
+
const rest = await verifyPrRest(runGh, cache, url, expectedHead, opts, hooks.onNotModified);
|
|
2075
|
+
return rest ?? verification;
|
|
2076
|
+
}
|
|
2027
2077
|
if (verification.status !== "failed") return verification;
|
|
2028
2078
|
|
|
2029
2079
|
const detailsUrl = failedCheck(raw)?.detailsUrl;
|