fix(governor): address PR review feedback

Reject null governor policy values, remove the unused per-board
cadence knob, and await governor shutdown cleanly. Also scope the
agent query to governor-managed rows and drop temporary migration
server defaults.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Abhimanyu Saharan
2026-03-08 01:07:10 +05:30
parent 6a1e92cda6
commit 0e6a933c3f
8 changed files with 62 additions and 54 deletions

View File

@@ -73,7 +73,6 @@ type GovernorActivityTriggerType = "A" | "B";
type AutoHeartbeatGovernorPolicy = {
enabled: boolean;
run_interval_seconds: number;
ladder: string[];
lead_cap_every: string;
activity_trigger_type: GovernorActivityTriggerType;
@@ -1278,31 +1277,6 @@ export default function EditBoardPage() {
</div>
<div className="grid gap-4 md:grid-cols-2">
<div className="space-y-2">
<label className="text-sm font-medium text-slate-900">
Run interval (seconds)
</label>
<Input
type="number"
min={30}
step={1}
value={currentGovernorPolicy.run_interval_seconds}
onChange={(event) => {
const next = Number.parseInt(event.target.value, 10);
setGovernorPolicyDraft({
...currentGovernorPolicy,
run_interval_seconds: Number.isNaN(next)
? 300
: Math.max(30, next),
});
}}
disabled={isLoading || saveGovernorPolicyMutation.isPending}
/>
<p className="text-xs text-slate-500">
Hint for cadence; backend enforces 30s minimum.
</p>
</div>
<div className="space-y-2">
<label className="text-sm font-medium text-slate-900">
Activity trigger type
@@ -1382,8 +1356,6 @@ export default function EditBoardPage() {
setGovernorPolicySaveSuccess(null);
saveGovernorPolicyMutation.mutate({
enabled: currentGovernorPolicy.enabled,
run_interval_seconds:
currentGovernorPolicy.run_interval_seconds,
ladder: currentGovernorPolicy.ladder,
lead_cap_every: currentGovernorPolicy.lead_cap_every,
activity_trigger_type: