Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(society): drop the per-agent daily budget and the fine print in the agent pane (#1092)

Ruben Lütkeb1bfadd53137
diff --git a/dodaios/society/quests.py b/dodaios/society/quests.py
index 0ac07437a3..687f512b1f 100644
--- a/dodaios/society/quests.py
+++ b/dodaios/society/quests.py
@@ -83,7 +83,6 @@ GENERALIST: Final[dict[str, Any]] = {
"what remains open."
),
"permission_ceiling": "monitor",
- "daily_budget_usd": 2.0,
}
_WORD_RE: Final[re.Pattern[str]] = re.compile(r"[a-z0-9][a-z0-9\-]{2,}")
diff --git a/dodaios/society/scheduler.py b/dodaios/society/scheduler.py
index e302393983..d3ace24ada 100644
--- a/dodaios/society/scheduler.py
+++ b/dodaios/society/scheduler.py
@@ -8,8 +8,7 @@ board and applies, in order, for every ``ASSIGN``:
3. the delegation depth — an ASSIGN whose parent chain already holds two
ASSIGNs is refused (depth ≤ 2, no recursion);
4. the target — must resolve to exactly one active agent;
-5. the budgets — the global ``BudgetTracker`` pre-spawn check and the
- target's own ``daily_budget_usd`` against today's spend;
+5. the global ``BudgetTracker`` pre-spawn check;
6. the target's concurrency cap;
7. the per-trace message cap.
@@ -40,7 +39,7 @@ from .events import USER_ACTOR as _USER
from .events import MsgType, SocietyEnvelope, Tier
from .failure_reasons import FailureReason, classify_error, retry_action
from .roster import AgentRecord, AgentState, Roster
-from .store import SocietyStore, day_start_ms
+from .store import SocietyStore
log = logging.getLogger(__name__)
@@ -230,16 +229,6 @@ class SocietyScheduler:
except Exception as exc: # noqa: BLE001 — BudgetExceeded is the tracker's own type
await self._veto(env, FailureReason.BUDGET_EXHAUSTED, str(exc))
return
- if target.daily_budget_usd > 0:
- spent = await self._store.cost_since(target.agent_id, day_start_ms(env.ts_ms))
- if spent >= target.daily_budget_usd:
- await self._veto(
- env,
- FailureReason.BUDGET_EXHAUSTED,
- f"{display_name(target)} spent ${spent:.2f} of "
- f"${target.daily_budget_usd:.2f} today",
- )
- return
if self.active_runs(target.agent_id) >= target.max_concurrent_runs:
await self._veto(
env,
diff --git a/dodaios/society/seeds.py b/dodaios/society/seeds.py
index a9296b788d..ab769b80a2 100644
--- a/dodaios/society/seeds.py
+++ b/dodaios/society/seeds.py
@@ -53,7 +53,6 @@ STARTER_TEAM: Final[tuple[dict[str, Any], ...]] = (
"tasks and hand them to the right teammate."
),
"permission_ceiling": "monitor",
- "daily_budget_usd": 3.0,
},
{
"name": "Archivist",
@@ -65,7 +64,6 @@ STARTER_TEAM: Final[tuple[dict[str, Any], ...]] = (
"wiki already knows."
),
"permission_ceiling": "safe",
- "daily_budget_usd": 1.0,
},
)
diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentLimits.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentLimits.test.tsx
index 7cd591e0b3..9d30aa9612 100644
--- a/dodaios/ui/web/frontend/src/components/society/card/AgentLimits.test.tsx
+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentLimits.test.tsx
@@ -1,11 +1,11 @@
/**
* The limits and permissions in the agent pane's Tools & access tab — the
- * budget, ceiling, approval mode and concurrency a person can change after
+ * ceiling, approval mode and concurrency a person can change after
* the agent exists.
*
* What this pins is the part that would break silently: Save sends ONLY the
* fields that changed. The route re-derives an agent's focus whenever a title
- * or description arrives, so a budget edit that carried prose or tool lists
+ * or description arrives, so a limits edit that carried prose or tool lists
* along would quietly rewrite the tools the agent reaches for.
*/
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
@@ -114,13 +114,6 @@ describe("the agent pane's limits and permissions", () => {
expect(fetchMock.mock.calls.some((c) => (c[1] as RequestInit | undefined)?.method === "PATCH")).toBe(false);
});
- test("a budget edit sends the budget and nothing that would re-derive the tools", async () => {
- renderTab();
- fireEvent.change(await screen.findByTestId("agent-budget-input"), { target: { value: "7.5" } });
- fireEvent.click(screen.getByTestId("agent-pane-save"));
- await waitFor(() => expect(patchBody()).toEqual({ daily_budget_usd: 7.5 }));
- });
-
test("raising the legacy ceiling asks first, then saves it", async () => {
renderTab();
const ceiling = await screen.findByTestId("agent-pane-ceiling");
@@ -142,32 +135,6 @@ describe("the agent pane's limits and permissions", () => {
expect(screen.queryByTestId("agent-pane-widen")).toBeNull();
});
- test("an empty budget means no cap rather than a broken number", async () => {
- renderTab();
- fireEvent.change(await screen.findByTestId("agent-budget-input"), { target: { value: "" } });
- fireEvent.click(screen.getByTestId("agent-pane-save"));
- await waitFor(() => expect(patchBody().daily_budget_usd).toBe(0));
- });
-
- test("switching the cap off sends 0, which is the scheduler's no-cap", async () => {
- renderTab();
- fireEvent.click(await screen.findByTestId("agent-budget-switch"));
- expect(screen.queryByTestId("agent-budget-input")).toBeNull();
- fireEvent.click(screen.getByTestId("agent-pane-save"));
- await waitFor(() => expect(patchBody()).toEqual({ daily_budget_usd: 0 }));
- });
-
- test("a stored 0 reads as the cap switched off, and turning it on restores a number", async () => {
- renderTab({ dailyBudgetUsd: 0 });
- const toggle = await screen.findByTestId("agent-budget-switch");
- expect(toggle.getAttribute("aria-checked")).toBe("false");
- expect(screen.queryByTestId("agent-budget-input")).toBeNull();
- fireEvent.click(toggle);
- expect(screen.getByTestId("agent-budget-input")).toBeTruthy();
- fireEvent.click(screen.getByTestId("agent-pane-save"));
- await waitFor(() => expect(patchBody()).toEqual({ daily_budget_usd: 2 }));
- });
-
test("after a save, a later change to the agent is adopted rather than shadowed by a stale draft", async () => {
const client = new QueryClient({ defaultOptions: { queries: { retry: false, staleTime: Infinity } } });
const tree = (agent: SocietyAgent) => (
@@ -187,18 +154,18 @@ describe("the agent pane's limits and permissions", () => {
const saved: SocietyAgent = { ...AGENT, browserAllowedDomains: ["alpha.example", "zeta.example"] };
view.rerender(tree(saved));
await waitFor(() => expect(screen.queryByTestId("agent-pane-savebar")).toBeNull());
- // An approved proposal then moves the budget: the tab shows it, with nothing "unsaved".
- view.rerender(tree({ ...saved, dailyBudgetUsd: 5 }));
- await waitFor(() => expect((screen.getByTestId("agent-budget-input") as HTMLInputElement).value).toBe("5"));
+ // An approved proposal then moves the job count: the tab shows it, with nothing "unsaved".
+ view.rerender(tree({ ...saved, maxConcurrentRuns: 3 }));
+ await waitFor(() => expect((screen.getByTestId("agent-jobs-input") as HTMLInputElement).value).toBe("3"));
expect(screen.queryByTestId("agent-pane-savebar")).toBeNull();
});
test("Discard returns every field to the saved value", async () => {
renderTab();
- const input = (await screen.findByTestId("agent-budget-input")) as HTMLInputElement;
- fireEvent.change(input, { target: { value: "9" } });
+ const input = (await screen.findByTestId("agent-jobs-input")) as HTMLInputElement;
+ fireEvent.change(input, { target: { value: "4" } });
fireEvent.click(await screen.findByText("Discard"));
- expect((screen.getByTestId("agent-budget-input") as HTMLInputElement).value).toBe("2");
+ expect((screen.getByTestId("agent-jobs-input") as HTMLInputElement).value).toBe("1");
expect(screen.queryByTestId("agent-pane-savebar")).toBeNull();
});
});
diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx
index 27ec3e5f5b..9b1c9d3d2f 100644
--- a/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx
+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx
@@ -122,7 +122,6 @@ export function MemoryTab({
))}
</div>
)}
- <PaneHint>{t("society.profile_card.knowledge_hint")}</PaneHint>
</PaneSection>
<PaneSection
diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx
index 9368cf3ec8..bc610239d9 100644
--- a/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx
+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx
@@ -124,10 +124,6 @@ export function OverviewTab({ agent, sample, queue, onTab, onPage, onModelSaving
? t("society.agent_pane.tools_allowlist_detail").replace("{0}", String(agent.toolGrants.length))
: t("society.agent_pane.tools_all_detail");
- const perToken = agent.billedPerToken !== false;
- const capped = agent.dailyBudgetUsd > 0;
- const spent = agent.stats.spentTodayUsd;
- const share = capped ? Math.min(1, spent / agent.dailyBudgetUsd) : 0;
const lastActive = agent.stats.lastActiveMs
? new Date(agent.stats.lastActiveMs).toLocaleDateString(locale, { day: "numeric", month: "short" })
: t("society.card.never");
@@ -164,9 +160,7 @@ export function OverviewTab({ agent, sample, queue, onTab, onPage, onModelSaving
</button>
}
>
- {lead ? (
- <PaneHint>{t("society.card.instructions_hint")}</PaneHint>
- ) : agent.description.trim() ? (
+ {lead ? null : agent.description.trim() ? (
<button
type="button"
className="ap-instructions text-left"
@@ -262,20 +256,6 @@ export function OverviewTab({ agent, sample, queue, onTab, onPage, onModelSaving
<div className="ap-record" data-testid="agent-pane-record">
<p>{recordLine(t, locale, agent, lastActive)}</p>
- {/* A subscription or local model spends nothing per run: no dollar lines. */}
- {perToken ? (
- <p>
- {t("society.card.meter_today")}:{" "}
- {capped
- ? t("society.card.spent_of").replace("{0}", spent.toFixed(2)).replace("{1}", agent.dailyBudgetUsd.toFixed(2))
- : `$${spent.toFixed(2)} · ${t("society.card.no_cap")}`}
- </p>
- ) : null}
- {perToken && capped ? (
- <div className="ap-meter" data-full={share >= 1 ? "true" : undefined} role="img" aria-label={`${t("society.card.meter_today")}: $${spent.toFixed(2)}`}>
- <span className="ap-meter-fill" style={{ width: `${Math.round(share * 100)}%` }} />
- </div>
- ) : null}
</div>
</div>
);
@@ -329,7 +309,6 @@ function LeadModelRow() {
</span>
</div>
</div>
- <PaneHint>{t("society.card.brain_shared_hint")}</PaneHint>
</>
);
}
diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/SubPages.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/SubPages.tsx
index c022bf26c0..f4b18f6996 100644
--- a/dodaios/ui/web/frontend/src/components/society/card/pane/SubPages.tsx
+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/SubPages.tsx
@@ -49,7 +49,6 @@ export function InstructionsPage({ agent, sample }: { agent: SocietyAgent; sampl
return (
<div className="ap-body" data-testid="agent-pane-instructions-page">
<PaneSection>
- <PaneHint>{t("society.profile_card.instructions_hint")}</PaneHint>
<textarea
className="ap-input min-h-[240px]"
value={draft}
@@ -84,7 +83,6 @@ export function SkillsPage({ agent, sample }: { agent: SocietyAgent; sample: boo
const rows = skills.data ?? [];
return (
<div className="ap-body" data-testid="agent-pane-skills-page">
- <PaneHint>{t("society.agent_pane.skills_hint")}</PaneHint>
{rows.length === 0 ? (
<PaneHint>{skills.isLoading ? t("society.profile_card.loading") : t("society.agent_pane.skills_none")}</PaneHint>
) : (
@@ -109,7 +107,6 @@ export function FilesPage({ agent }: { agent: SocietyAgent }) {
const sandbox = agent.executionEnvironment === "sandbox";
return (
<div className="ap-body" data-testid="agent-pane-files-page">
- <PaneHint>{t(sandbox ? "society.sandbox.storage" : "society.agent_pane.files_hint")}</PaneHint>
<div className="ap-rows">
<div className="ap-row">
<span className="min-w-0 flex-1">
diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/ToolsTab.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/ToolsTab.tsx
index d08f1d2c95..bcde60df76 100644
--- a/dodaios/ui/web/frontend/src/components/society/card/pane/ToolsTab.tsx
+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/ToolsTab.tsx
@@ -1,6 +1,6 @@
/**
* Tools & access: everything that decides what this agent may touch, in one
- * draft with one Save. Reach and tools, approvals and rules, limits and its
+ * draft with one Save. Reach and tools, approvals and rules, jobs at once and its
* browser are edited together; a change that lets the agent do MORE asks once
* before it is saved. Placement (sandbox, computer) saves on its own, as it
* always did, because it moves the agent rather than tuning it.
@@ -14,7 +14,6 @@ import { useEffect, useMemo, useRef, useState } from "react";
import { useQuery } from "@tanstack/react-query";
import { Search } from "lucide-react";
-import { Switch } from "@/components/ui/switch";
import { useLocaleChunk, useT } from "@/i18n";
import { AGENT_APPROVAL_MODES, PERMISSION_CEILINGS, fetchSocietyProviders, type AgentApprovalMode, type BrowserMode } from "@/lib/societyApi";
import { societyDisplayName } from "@/lib/societyDisplayName";
@@ -122,11 +121,7 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole
return (
<div className="flex min-h-0 flex-1 flex-col" data-testid="agent-pane-tools">
<div className="ap-body">
- {lead ? (
- <PaneSection title={t("society.agent_pane.reach")}>
- <PaneHint>{t("society.agent_pane.lead_tools_hint")}</PaneHint>
- </PaneSection>
- ) : (
+ {lead ? null : (
<>
<PaneSection title={t("society.agent_pane.reach")}>
<Segmented<GrantMode>
@@ -141,9 +136,6 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole
]}
onChange={(mode) => setDraft((d) => setGrantMode(d, mode))}
/>
- <PaneHint>
- {t(draft.grantMode === "all" ? "society.agent_pane.reach_all_hint" : "society.agent_pane.reach_allowlist_hint")}
- </PaneHint>
</PaneSection>
<ToolList
draft={draft}
@@ -176,24 +168,18 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole
})}
onChange={(mode) => setDraft((d) => ({ ...d, approvalMode: mode }))}
/>
- <PaneHint>
- {draft.approvalMode ? t(`society.approval_mode.${draft.approvalMode}_hint`) : t("society.approval_mode.legacy_hint")}
- </PaneHint>
</>
) : null}
{lead || !agent.approvalMode ? (
- <div className="flex flex-col gap-2">
- <span className="ap-sublabel">{t("society.approval_mode.legacy_ceiling")}</span>
- <Segmented<PermissionCeiling>
- fill
- label={t("society.approval_mode.legacy_ceiling")}
- value={draft.permissionCeiling}
- disabled={disabled}
- testId="agent-pane-ceiling"
- options={ceilingOptions}
- onChange={(step) => setDraft((d) => ({ ...d, permissionCeiling: step }))}
- />
- </div>
+ <Segmented<PermissionCeiling>
+ fill
+ label={t("society.approval_mode.legacy_ceiling")}
+ value={draft.permissionCeiling}
+ disabled={disabled}
+ testId="agent-pane-ceiling"
+ options={ceilingOptions}
+ onChange={(step) => setDraft((d) => ({ ...d, permissionCeiling: step }))}
+ />
) : null}
</PaneSection>
@@ -225,43 +211,11 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole
testId="agent-pane-allow"
/>
</div>
- <PaneHint>{t("society.agent_pane.rules_hint")}</PaneHint>
</PaneSection>
) : null}
<PaneSection title={t("society.card.limits")} testId="agent-pane-limits">
<div className="ap-card">
- <div className="ap-line">
- <span className="ap-line-label">{t("society.card.budget_cap")}</span>
- <span className="ml-auto flex items-center gap-2">
- {draft.budgetOn ? (
- <span className="flex items-center gap-1 text-[14px]">
- <span className="text-muted-foreground">$</span>
- <input
- type="number"
- min={0}
- step={0.5}
- inputMode="decimal"
- disabled={disabled}
- value={draft.budget}
- onChange={(e) => setDraft((d) => ({ ...d, budget: e.target.value }))}
- data-testid="agent-budget-input"
- aria-label={t("society.card.budget_cap")}
- className="ap-input"
- />
- </span>
- ) : (
- <span className="ap-line-value">{t("society.card.no_cap")}</span>
- )}
- <Switch
- checked={draft.budgetOn}
- onCheckedChange={(on) => setDraft((d) => ({ ...d, budgetOn: on }))}
- disabled={disabled}
- aria-label={t("society.card.budget_cap")}
- data-testid="agent-budget-switch"
- />
- </span>
- </div>
<label className="ap-line">
<span className="ap-line-label">{t("society.card.jobs_at_once")}</span>
<input
@@ -278,7 +232,6 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole
/>
</label>
</div>
- <PaneHint>{t(draft.budgetOn ? "society.card.budget_hint" : "society.card.budget_off_hint")}</PaneHint>
</PaneSection>
<PaneSection title={t("society.agent_pane.browser")} testId="agent-pane-browser-access">
@@ -294,7 +247,6 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole
]}
onChange={(mode) => setDraft((d) => ({ ...d, browserMode: mode }))}
/>
- <PaneHint>{t(draft.browserMode === "own" ? "society.agent_pane.browser_own_hint" : "society.agent_pane.browser_attach_hint")}</PaneHint>
<div className="ap-card ap-card-pad">
<span className="ap-sublabel">{t("society.agent_pane.sites")}</span>
<ChipList
@@ -317,7 +269,6 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole
<AgentSandboxSection agent={agent} show="choice" layout="row" />
{agent.executionEnvironment !== "sandbox" ? <RunsOn agent={agent} /> : null}
</div>
- <PaneHint>{t("society.agent_pane.placement_hint")}</PaneHint>
</PaneSection>
) : null}
</div>
diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/accessDraft.test.ts b/dodaios/ui/web/frontend/src/components/society/card/pane/accessDraft.test.ts
index fa2dbc04a5..0cf8edf7f3 100644
--- a/dodaios/ui/web/frontend/src/components/society/card/pane/accessDraft.test.ts
+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/accessDraft.test.ts
@@ -67,9 +67,8 @@ describe("access draft", () => {
});
test("the patch maps onto the route's field names", () => {
- const draft = { ...draftFromAgent(BASE), budgetOn: false, jobs: "3", domains: ["example.com"] };
+ const draft = { ...draftFromAgent(BASE), jobs: "3", domains: ["example.com"] };
expect(agentConfigBody(patchFromDraft(BASE, draft))).toEqual({
- daily_budget_usd: 0,
max_concurrent_runs: 3,
browser_allowed_domains: ["example.com"],
});
diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/accessDraft.ts b/dodaios/ui/web/frontend/src/components/society/card/pane/accessDraft.ts
index 9705c2d1d7..8e6ac63126 100644
--- a/dodaios/ui/web/frontend/src/components/society/card/pane/accessDraft.ts
+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/accessDraft.ts
@@ -18,9 +18,7 @@ export interface AccessDraft {
permissionCeiling: PermissionCeiling;
requireApproval: string[];
alwaysAllow: string[];
- budgetOn: boolean;
/** Kept as typed text so a half-typed number is not reformatted under the cursor. */
- budget: string;
jobs: string;
browserMode: BrowserMode;
domains: string[];
@@ -39,8 +37,6 @@ export function draftFromAgent(agent: SocietyAgent): AccessDraft {
permissionCeiling: agent.permissionCeiling,
requireApproval: [...agent.approvalRules.requireApproval],
alwaysAllow: [...agent.approvalRules.alwaysAllow],
- budgetOn: agent.dailyBudgetUsd > 0,
- budget: String(agent.dailyBudgetUsd > 0 ? agent.dailyBudgetUsd : 2),
jobs: String(agent.maxConcurrentRuns),
browserMode: agent.browserMode ?? "own",
domains: [...(agent.browserAllowedDomains ?? [])],
@@ -97,15 +93,11 @@ export function setGrantMode(draft: AccessDraft, mode: GrantMode): AccessDraft {
const sameList = (a: string[], b: string[]) => a.length === b.length && a.every((x, i) => x === b[i]);
const sameSet = (a: string[], b: string[]) => a.length === b.length && a.every((x) => b.includes(x));
-export function budgetValue(draft: AccessDraft): number {
- return draft.budgetOn ? Math.max(0, Number.parseFloat(draft.budget) || 0) : 0;
-}
-
export function jobsValue(draft: AccessDraft): number {
return Math.min(10, Math.max(1, Number.parseInt(draft.jobs, 10) || 1));
}
-/** Only the fields that differ from the agent: a budget edit never carries prose or tools along. */
+/** Only the fields that differ from the agent: a limits edit never carries prose or tools along. */
export function patchFromDraft(agent: SocietyAgent, draft: AccessDraft): AgentConfigPatch {
const patch: AgentConfigPatch = {};
if (draft.grantMode !== agent.grantMode) patch.grantMode = draft.grantMode;
@@ -120,7 +112,6 @@ export function patchFromDraft(agent: SocietyAgent, draft: AccessDraft): AgentCo
) {
patch.approvalRules = { requireApproval: draft.requireApproval, alwaysAllow: draft.alwaysAllow };
}
- if (budgetValue(draft) !== agent.dailyBudgetUsd) patch.dailyBudgetUsd = budgetValue(draft);
if (jobsValue(draft) !== agent.maxConcurrentRuns) patch.maxConcurrentRuns = jobsValue(draft);
if (draft.browserMode !== (agent.browserMode ?? "own")) patch.browserMode = draft.browserMode;
if (!sameSet(draft.domains, agent.browserAllowedDomains ?? [])) patch.browserAllowedDomains = draft.domains;
diff --git a/tests/unit/society/test_scheduler.py b/tests/unit/society/test_scheduler.py
index 339b61cfe8..266fa1b3b1 100644
--- a/tests/unit/society/test_scheduler.py
+++ b/tests/unit/society/test_scheduler.py
@@ -163,21 +163,10 @@ async def test_global_budget_vetoes(tmp_path: Path):
await store.close()
-async def test_agent_daily_budget_vetoes(world):
+async def test_agent_daily_budget_no_longer_vetoes(world):
+ """A stored per-agent daily cap is inert: spend never stops a dispatch."""
store, roster, _, dispatcher, _ = world
await roster.update("scout", {"daily_budget_usd": 1.0})
- await store.append_and_publish(
- SocietyEnvelope(msg_type=MsgType.DIGEST, from_agent="scout", trace_id="old", cost_usd=1.5)
- )
- await store.append_and_publish(_assign("jarvis", "scout"))
- assert dispatcher.calls == []
- assert await _vetoes(store, "t1") == [str(FailureReason.BUDGET_EXHAUSTED)]
-
-
-async def test_zero_daily_budget_skips_the_gate(world):
- """0 is the stored form of 'no cap': spend does not veto a dispatch."""
- store, roster, _, dispatcher, _ = world
- await roster.update("scout", {"daily_budget_usd": 0})
await store.append_and_publish(
SocietyEnvelope(msg_type=MsgType.DIGEST, from_agent="scout", trace_id="old", cost_usd=99.0)
)