Versions 91 to 318
Lines 8–20 at 318 (were 8–20 at 91)
11−import { checkServer, doctor, doctorText, nodeNeeded, type Probe, plainError, whoami } from "../src/doctor.ts";
11+import { doctor, doctorText, nodeNeeded, type Probe, plainError, whoami } from "../src/doctor.ts";
1212
17−const grant = { projects: [{ project: "game", role: "writer" }], max_agents: 3 };
Lines 180–186 at 318 (were 180–186 at 91)
181181 /^Signed in to https:\/\/staging\.abso\.example as box b_0123abcd, approved by christopher\.\n/,
183− assert.match(out.text, /Projects: game \(writer\)\. Up to 3 agents\./);
186186 /This folder is agent builder in project game on https:\/\/staging\.abso\.example, with the agent key k_00c0ffee\./,
Lines 211–249 at 318 (were 211–252 at 91)
211211
212212test("plainError words a refusal by whether a credential went, and a server that can't be reached", () => {
214− assert.equal(plainError(refused, false), "You're not signed in. Run abso login, then abso join <project>.");
215− assert.match(plainError(refused, true)!, /^The server didn't accept this folder's key.*abso doctor checks it/);
214+ assert.equal(plainError(refused, undefined), "You're not signed in. Run abso login, then abso join <project>.");
217− plainError(new ApiError("could not reach https://api.abso.dev: connect ECONNREFUSED"), true),
221+ plainError(new ApiError("could not reach https://api.abso.dev: connect ECONNREFUSED"), "this folder's key"),
218222 "Can't reach https://api.abso.dev: connect ECONNREFUSED. Check your connection; abso doctor checks the rest.",
222− new ApiError("could not reach http://x: refused. Nothing was published. Run the same command again."),
223− true,
226+ new ApiError("could not reach http://x: refused. Nothing was pushed. Run the same command again."),
225− "Can't reach http://x: refused. Nothing was published. Run the same command again.",
227− assert.equal(plainError(new ApiError("GET /log answered 500: boom", 500), true), undefined);
228− assert.equal(plainError(new Error("anything else"), true), undefined);
231+ assert.equal(plainError(new ApiError("GET /log answered 500: boom", 500), "this folder's key"), undefined);
230234
231−test("whoami and doctor pick the server as join does: --server, ABSO_SERVER, the folder's, the box's sign-in, then abso.dev", () => {
235+test("whoami with nothing named shows prod, and names the other servers this box is signed in to", async () => {
233− const empty = temp("home");
234− assert.equal(checkServer(undefined, outside, {}, empty, NOW), "https://api.abso.dev");
237− assert.equal(checkServer(undefined, outside, {}, home, NOW), SERVER);
238− assert.equal(checkServer(undefined, folder(), {}, empty, NOW), SERVER);
239− assert.equal(checkServer(undefined, outside, { ABSO_SERVER: "http://env.example" }, home, NOW), "http://env.example");
240− assert.equal(
241− checkServer("http://flag.example", folder(), { ABSO_SERVER: "http://env.example" }, home, NOW),
242− "http://flag.example",
243+ /This box isn't signed in to https:\/\/api\.abso\.dev\. Run abso login\. This box is signed in to https:\/\/staging\.abso\.example: abso whoami --server <url> uses it\./,
244− const expired = temp("home");
245− writeBox(box(NOW - 1), expired);
246− assert.equal(checkServer(undefined, outside, {}, expired, NOW), "https://api.abso.dev");
248− assert.throws(
249− () => checkServer(undefined, outside, {}, home, NOW),
250− /signed in to .* and .*: say which with --server/,
251− );
- MCP
- compare on this site's /mcp
- CLI
- abso diff 91 318 client/test/doctor.test.ts --json
- JSON
- /christopher/abso-core/compare/91..318?file=client%2Ftest%2Fdoctor.test.ts&format=json