omp-conductor 0.18.1 → 0.19.0
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/README.md +106 -41
- package/REFERENCE.md +866 -31
- package/agents/to-spec.md +6 -2
- package/package.json +1 -1
- package/schema/config.schema.json +32 -1
- package/src/admission.ts +212 -26
- package/src/arm-challenge.ts +250 -57
- package/src/ask.ts +288 -1
- package/src/briefs/orchestrator.md +27 -13
- package/src/briefs/to-spec.md +6 -2
- package/src/cli.ts +127 -2
- package/src/command-help.ts +9 -1
- package/src/command-manifest.ts +52 -8
- package/src/commands/arm.ts +6 -2
- package/src/commands/context.ts +2 -0
- package/src/commands/intake.ts +4 -19
- package/src/commands/message.ts +26 -2
- package/src/commands/reconcile-units.ts +104 -0
- package/src/commands/release-composition.ts +232 -0
- package/src/commands/resume.ts +2 -27
- package/src/commands/setup.ts +101 -16
- package/src/commands/stats.ts +11 -30
- package/src/commands/tail.ts +31 -1
- package/src/commands/upgrade.ts +20 -3
- package/src/commands/verb.ts +2 -1
- package/src/commands/watch.ts +4 -17
- package/src/config-schema.ts +38 -6
- package/src/config.ts +103 -8
- package/src/credential-class.ts +366 -0
- package/src/daemon.ts +1368 -529
- package/src/dashboard/app.js +504 -2
- package/src/dashboard/controls.ts +336 -0
- package/src/dashboard/index.html +30 -0
- package/src/dashboard/server.ts +271 -30
- package/src/dashboard/style.css +116 -0
- package/src/dashboard/transcript.ts +173 -0
- package/src/decisions.ts +19 -11
- package/src/doctor.ts +431 -148
- package/src/escalate.ts +22 -11
- package/src/failure-class.ts +59 -0
- package/src/fleet.ts +587 -230
- package/src/host.ts +6 -455
- package/src/omp-settings.ts +19 -0
- package/src/omp.ts +40 -56
- package/src/orchestrator-tick.ts +564 -121
- package/src/pause.ts +233 -0
- package/src/session-host.ts +6 -41
- package/src/settlement.ts +159 -2
- package/src/setup-answers.ts +97 -0
- package/src/setup-host.ts +343 -1160
- package/src/setup-install.ts +204 -27
- package/src/setup-wizard.ts +252 -51
- package/src/setup.ts +87 -4
- package/src/spend-telemetry.ts +117 -0
- package/src/stats.ts +35 -0
- package/src/status-render.ts +485 -19
- package/src/store.ts +1229 -55
- package/src/telegram-freshness.ts +269 -0
- package/src/to-spec.ts +50 -2
- package/src/types.ts +759 -10
- package/src/unblock.ts +22 -0
- package/src/unit-reconcile.ts +303 -0
- package/src/upgrade-verify.ts +8 -1
- package/src/upgrade.ts +299 -12
- package/src/verbs/actions.ts +124 -10
- package/src/verbs/protocol.ts +70 -2
- package/src/verbs/server.ts +485 -11
- package/src/wake.ts +48 -0
- package/src/worker.ts +401 -14
package/src/decisions.ts
CHANGED
|
@@ -79,14 +79,21 @@ export const PR_LOOKUP_WINDOW_MS = 30 * 24 * 60 * 60_000;
|
|
|
79
79
|
* read by both `conductor_pr_review` and the `pr-review-ready` watch so they
|
|
80
80
|
* cannot drift.
|
|
81
81
|
*
|
|
82
|
-
* Ownership is the
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
82
|
+
* Ownership is the newest attempt of this project that recorded the PR within
|
|
83
|
+
* the recent-history window (`runsForProjectPr`), never the issue's newest
|
|
84
|
+
* row — a requeued continuation must not hide the PR its predecessor opened
|
|
85
|
+
* (#434). A `stopped` row is transparent to that selection (#870): stopping
|
|
86
|
+
* is terminal and the attempt will never touch the PR again, so a stopped
|
|
87
|
+
* duplicate must not shadow the older revisable owner of the same PR — the
|
|
88
|
+
* row ordering that stranded PR #870's blocking findings. Every other
|
|
89
|
+
* non-revisable state still decides as the newest owner: a live row
|
|
90
|
+
* (`running` / `claimed`) hides an older settled one because a worker is in
|
|
91
|
+
* flight (#844 — PR #838 was green while its newest owner was still
|
|
92
|
+
* `running`, and a watch keyed only to checks woke the orchestrator before
|
|
93
|
+
* `conductor_pr_review` was actionable), `pushed-pending` checks are still
|
|
94
|
+
* settling, `blocked` may resume, `orphaned` is reconciled back to live at
|
|
95
|
+
* startup, and `merged` means the PR lifecycle is over. When every row is
|
|
96
|
+
* `stopped`, the newest one answers and the predicate fails closed.
|
|
90
97
|
*
|
|
91
98
|
* `no-owner` and `not-revisable` both fail closed: a review can never act, so
|
|
92
99
|
* a watch must not wake, even when the checks are green.
|
|
@@ -97,9 +104,10 @@ export type PrReviewReadiness =
|
|
|
97
104
|
| { kind: "not-revisable"; run: RunRecord };
|
|
98
105
|
|
|
99
106
|
export function prReviewReadiness(store: Store, project: string, prUrl: string, now: number): PrReviewReadiness {
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
const runs = store.runsForProjectPr(project, prUrl, now - PR_LOOKUP_WINDOW_MS);
|
|
108
|
+
const owner = runs.find((attempt) => attempt.state !== "stopped") ?? runs.at(0);
|
|
109
|
+
if (owner === undefined) return { kind: "no-owner" };
|
|
110
|
+
return REVISABLE_RUN_STATES[owner.state] === true ? { kind: "ready", run: owner } : { kind: "not-revisable", run: owner };
|
|
103
111
|
}
|
|
104
112
|
|
|
105
113
|
/**
|