Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions agent-adk/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-4o-mini")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-adk")' in source
5 changes: 0 additions & 5 deletions agent-ag2/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-4o-mini")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-ag2")' in source
5 changes: 0 additions & 5 deletions agent-agno/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-5.5")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-agno")' in source
20 changes: 0 additions & 20 deletions agent-antigravity/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,3 @@ def test_the_model_is_still_the_deployments_to_choose(monkeypatch):
assert bot_settings(BOT_ID, pinned_provider=PINNED) == BotSettings(
provider="google", model="gemini-3.8-flash"
)


def test_this_bots_source_reads_the_spec_with_the_pin():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert 'bot_settings("agent-antigravity", pinned_provider="google")' in source


def test_the_key_and_base_url_come_from_the_provider_row():
"""Not hardcoded here.

`shared/model-providers.json` names Google's key and base-url variables, and a Bot that
spelled them out itself would drift from the file the moment either changed. The base-url
variable is what points this Bot at a Gemini-compatible endpoint — a gateway, or aimock —
instead of Google.
"""
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert '"key_variable"' in source
assert '"base_url_variable"' in source
assert "GOOGLE_API_KEY" not in source
assert "GOOGLE_GENERATIVE_AI_BASE_URL" not in source
10 changes: 0 additions & 10 deletions agent-computer/tests/aria-snapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ const CAPTURED = `- generic [ref=e2]:
- button "Submit order" [ref=e44]`;

describe("parseAriaSnapshot, against captured output", () => {
test("the fixture is genuinely valid YAML", () => {
// The guard against the mistake that made this rewrite necessary: an invented fixture will most
// likely fail here first.
expect(() => Bun.YAML.parse(CAPTURED)).not.toThrow();
});

test("keeps the controls and drops the scaffolding", () => {
const { elements } = parseAriaSnapshot(CAPTURED);
// `generic`, `paragraph`, `group` and `text` all carry refs but are not things a Bot can act on,
Expand Down Expand Up @@ -132,10 +126,6 @@ describe("parseAriaSnapshot, against captured output", () => {
- checkbox "Extra Cheese" [ref=e9]
- text: Extra Cheese`;

test("the mixed fixture is genuinely valid YAML", () => {
expect(() => Bun.YAML.parse(MIXED)).not.toThrow();
});

test("a half-ticked box is not reported as ticked", () => {
const byName = new Map(
parseAriaSnapshot(MIXED).elements.map((e) => [e.name, e]),
Expand Down
25 changes: 0 additions & 25 deletions agent-computer/tests/viewer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,6 @@ describe("a close that lands while the browser is still starting", () => {
expect(claim.setFollow(() => {})).toBe(false);
});

test("the claim is released even when the launch threw", async () => {
// `open`'s catch closes the socket after sending an error frame. If nothing released the claim
// there, the slot would stay occupied forever and `forgetIdle` could never sweep the
// session, which is the unbounded growth it exists to stop.
const slot = createViewerSlot();
const socket = { id: "a" };
slot.claim(socket, () => {});

await slot.release(socket);

expect(slot.occupied()).toBe(false);
});

test("releasing the same socket twice is harmless", async () => {
// The catch path closes the socket, so `close` runs release a second time for the same socket.
const slot = createViewerSlot();
Expand Down Expand Up @@ -448,18 +435,6 @@ describe("the session sweep asking whether anybody is watching", () => {
expect(slot.occupied()).toBe(true);
});

test("a Bot stays watched until teardown has finished", async () => {
const slot = createViewerSlot();
const socket = { id: "a" };
const claim = slot.claim(socket, () => {});
await claim.install(fakeCast());

const releasing = slot.release(socket);
await releasing;

expect(slot.occupied()).toBe(false);
});

test("a Bot is still watched while its cast is stopping", async () => {
// Occupancy has to count the teardown itself, not just whether somebody holds the slot. The
// sweep drops sessions with nobody watching and no live browser, and a session dropped while its
Expand Down
5 changes: 0 additions & 5 deletions agent-crewai/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-5.5")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-crewai")' in source
175 changes: 0 additions & 175 deletions agent-crewai/tests/test_token_restoration.py

This file was deleted.

5 changes: 0 additions & 5 deletions agent-langgraph-agui/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-4o-mini")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-langgraph-agui")' in source
5 changes: 0 additions & 5 deletions agent-langroid/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-4o-mini")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-langroid")' in source
5 changes: 0 additions & 5 deletions agent-llamaindex/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-5.5")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-llamaindex")' in source
5 changes: 0 additions & 5 deletions agent-microsoft/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-4o-mini")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-microsoft")' in source
5 changes: 0 additions & 5 deletions agent-pydantic-ai/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-4o-mini")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-pydantic-ai")' in source
5 changes: 0 additions & 5 deletions agent-strands/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ def test_blank_environment_falls_through_to_the_file(monkeypatch):
monkeypatch.setenv("BOT_PROVIDER", "")
monkeypatch.setenv("BOT_MODEL", " ")
assert bot_settings(BOT_ID) == BotSettings(provider="openai", model="gpt-4o-mini")


def test_this_bots_source_reads_the_spec():
source = (Path(__file__).resolve().parents[1] / "src" / "main.py").read_text(encoding="utf-8")
assert f'bot_settings("agent-strands")' in source
3 changes: 1 addition & 2 deletions app/src/lib/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
* nowhere else, and the next table went back to an object literal.
*
* So the prototype-safe read is a named function rather than a habit: `keyedLookup(TABLE, key)`
* reads the same whichever page writes it, greps as one symbol, and has exactly one definition —
* `server/tests/sole-definition.test.ts` asserts that it does.
* reads the same whichever page writes it and keeps the prototype-safe read in one place.
*
* A `Map` answers only with what was PUT IN IT. That is the whole mechanism; this function adds
* nothing to it but a name. Taking a `ReadonlyMap` is the point — passing an object literal is a
Expand Down
Loading
Loading