Versions 13 to 318
new file, 158 lines
1+// abso flag: a server's feature flags listed, flipped with a reason, and audited. The admin token goes only to a server
2+// ABSO_ADMIN_SERVERS names; the folder's own key goes with every call, for a server that takes an owner's key. Every
10+import { adminFor, changeText, type FlagChange, flagListText, type ListedFlag, runFlag } from "../src/flag-commands.ts";
11+
16+
20+ writeFileSync(join(root, ".abso", "config.json"), JSON.stringify({ server: SERVER, project: "abso", agent: "me" }));
23+
30+
58+
68+
69+test("the admin token goes only to a server ABSO_ADMIN_SERVERS names, and is never needed to try", () => {
71+ assert.equal(adminFor(SERVER, { ABSO_ADMIN_TOKEN: ADMIN, ABSO_ADMIN_SERVERS: "https://api.abso.dev" }), undefined);
74+
75+test("list says each flag's value, what it takes, its safe value, what it gates, and every place it's set", () => {
77+ "byoc-demo": { values: ["on", "off"], safe: "on", what: "The BYOC demo page.", stagingOnly: true },
100+
104+ '19:04 UTC key k_1, box b autosettle-default project game: unset to settle. "trying Settle on game"',
106+ assert.match(changeText({ ...change, scope: { env: true }, old: "settle", new: null }), / here: settle to unset\./);
108+
109+test("set posts the value, scope and reason with the folder's key; the admin token only where it may go", async () => {
111+ ["set", "autosettle-default", "settle", "--project", "game", "--why", "trying Settle on game"],
118+ assert.deepEqual(seen[0]!.body, { value: "settle", why: "trying Settle on game", project: "game" });
120+ assert.equal(seen[0]!.headers.get("x-abso-admin"), null, "ABSO_ADMIN_SERVERS doesn't name it");
125+ { status: 200, body: { revision: 4, change: { ...change, scope: { env: true }, old: "advise", new: null } } },
130+
131+test("a change without a reason, or for a project and a person both, is refused before anything is sent", async () => {
135+ ["set", "autosettle-default", "advise", "--why", "both", "--project", "a", "--person", "person:b"],
145+
155+ const { out, seen } = await run(["log", "--limit", "5"], {}, { status: 200, body: { changes: [change] } });
- MCP
- compare on this site's /mcp
- CLI
- abso diff 13 318 client/test/flag-command.test.ts --json
- JSON
- /christopher/abso-core/compare/13..318?file=client%2Ftest%2Fflag-command.test.ts&format=json