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
10 changes: 8 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ never seeds data on a client's behalf.
init can then walk up to the enclosing `.git` and land a genesis commit
on the working branch. Tests that boot the hub or touch seed/deploy git
paths must call `installDisposableHubDataDir()` from
`test/disposable-hub-data-dir.ts`; never delete the `HUB_DATA_DIR` key.
`e2e/lib/disposable-hub-data-dir.ts`; never delete the `HUB_DATA_DIR` key.
- Deployment mechanics are not settled enough to state here — see
[IMPLEMENTATION.md](IMPLEMENTATION.md)'s Deployment section first.

Expand All @@ -72,10 +72,16 @@ Env flags (unset behavior):
| `HUB_DATA_DIR` | hub boot fails — required runtime config |
| `CI` | set by GitHub Actions; not a caller flag |
| `E2E_PROVIDER` / `E2E_PROVIDER_API_KEY` / `OLLAMA_BASE_URL` | live-inference e2e stays on the noop/stub path |
| `CHROME_PATH` | browser walkthrough falls back to platform defaults, fails if none exist |

## Tests

Two homes only. A load-bearing unit test sits beside the module it covers
(`src/**/*.test.ts`); a load-bearing integration or DB-backed suite lives
under root `e2e/<area>/`, with shared helpers in `e2e/lib/`. No `test/`
directory exists anywhere — not in apps, packages, agents, or tools. A test
that isn't load-bearing (pins a literal, a shape, a re-export, or re-proves
Interchange's own behavior) is deleted, not moved.

Tests are meaningful red/green tests only — no coverage theater. An
outdated test is deleted in the same PR that breaks it, not adapted to keep
passing; rebuilding coverage for the area it covered happens under CL-8150.
Expand Down
2 changes: 2 additions & 0 deletions agents/myra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
},
"files": [
"src",
"!src/**/*.test.ts",
"!src/**/*.test.tsx",
"LICENSE",
"README.md"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test("shipped sources import only published platform packages", async () => {
const importPattern = /from\s+"([^"]+)"/g;
const violations: string[] = [];
for (const file of await shippedFiles()) {
if (!file.endsWith(".ts")) continue;
if (!file.endsWith(".ts") || file.endsWith(".test.ts")) continue;
const content = await readFile(file, "utf8");
for (const match of content.matchAll(importPattern)) {
const specifier = match[1] ?? "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ASSISTANT_WORKFLOW_ID,
buildAssistantWorkflow,
serializeAssistantWorkflow,
} from "../src/index";
} from "./index";

const INPUT = {
triggerAddress: "ins_dep000000000000@example.test",
Expand Down
2 changes: 1 addition & 1 deletion agents/myra/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"tsBuildInfoFile": "tsconfig.tsbuildinfo",
"rootDir": "../.."
},
"include": ["src", "test"],
"include": ["src"],
"exclude": []
}
2 changes: 1 addition & 1 deletion apps/hub/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src", "test"],
"include": ["src"],
"compilerOptions": {
"types": ["bun"],
"customConditions": ["bun"],
Expand Down
2 changes: 1 addition & 1 deletion apps/web/bunfig.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[test]
preload = ["./test/dom-environment.ts"]
preload = ["./src/dom-environment.ts"]
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"typecheck": "tsc --noEmit",
"build": "vite build",
"watch": "vite build --watch",
"test": "bun run build && bun test ./src ./test"
"test": "bun run build && bun test ./src"
},
"dependencies": {
"@corbits/agent-directory": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { afterEach, describe, expect, test } from "bun:test";
import { act } from "react";
import { createRoot, type Root } from "react-dom/client";

import { resetPendingDialogRequests, runActionCommand } from "../src/command-palette-actions";
import { SkillsPage } from "../src/pages/skills-page";
import { resetPendingDialogRequests, runActionCommand } from "./command-palette-actions";
import { SkillsPage } from "./pages/skills-page";
import { TestQueryProvider } from "./test-query-provider";

let container: HTMLDivElement | null = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";

import { isRawIdentifier } from "../../src/bench/membership";
import { isRawIdentifier } from "./membership";

describe("isRawIdentifier", () => {
test("recognizes every platform id prefix this surface must never render", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { describe, expect, test } from "bun:test";

import {
agentDisplayNamesFromAgents,
displayNameForAddress,
} from "../../src/chat/agent-display-names";
import { agentDisplayNamesFromAgents, displayNameForAddress } from "./agent-display-names";

describe("agentDisplayNamesFromAgents", () => {
test("keys each agent's display name by its participant address", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import type {
ApprovalLiveStatus,
ApprovalStatusQuery,
PlatformApprovalDetail,
} from "../../src/chat/blocks/approval-actions";
import type { MessageItem } from "../../src/chat/api";
import { WorkbenchTimeline } from "../../src/chat/timeline";
} from "./approval-actions";
import type { MessageItem } from "../api";
import { WorkbenchTimeline } from "../timeline";

const PLATFORM_DETAIL: PlatformApprovalDetail = {
agentName: "Payments Bot",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { act, createElement, createRef } from "react";
import { createRoot } from "react-dom/client";
import type { Root } from "react-dom/client";

import { Composer } from "../../src/chat/composer";
import type { ComposerHandle, ComposerSendPayload } from "../../src/chat/composer";
import { Composer } from "./composer";
import type { ComposerHandle, ComposerSendPayload } from "./composer";

let container: HTMLDivElement | null = null;
let root: Root | null = null;
Expand Down
Loading
Loading