honker: row 194 b3 sage-1620: credential-revoke-failed says the business file is unchanged and a retry is safe (CLI and Console), W2 checks the log per case
This commit is contained in:
1 parent
a22cc77acd
commit
8a43468060
6 files changed
+38
-3
No files matched your search
@@ -50,6 +50,11 @@ export const REASONS = {
|
||||
"regenerate-timeout": "the old run didn't exit within the request's 60 s, so no new run started; it still runs",
|
||||
"workspace-rename-failed": "the business file is changed and the name retired, but the workspace stayed where it was; " +
|
||||
"run the same delete again to retry the rename",
|
||||
// Row 194 (brief item 8, deviation 11, sage-1620): a delete revokes before it writes, so a failure can
|
||||
// leave tokens revoked with the instance still listed. It holds nothing it can use, and a retry is safe.
|
||||
"credential-revoke-failed": "a credential couldn't be revoked, so the business file is unchanged; tokens already revoked " +
|
||||
"stay revoked and the instance can't use them; clear what else the agent's store directory holds and run the same " +
|
||||
"command again, which is safe",
|
||||
"capacity-full": "a launch limit is reached; `mosaic limits --business BUSINESS` shows them",
|
||||
"limit-reached": "a launch limit is reached; `mosaic limits --business BUSINESS` shows them",
|
||||
"unknown-role": "the business has no such instance",
|
||||
|
||||
@@ -424,7 +424,17 @@ test("row 194 T20: a store-only delete with a tracker bot closes naming the bot,
|
||||
// The agents' store root beside the business files, private as the boot check needs it.
|
||||
mkdirSync(join(p.root, "config", "secrets", "agents"), { recursive: true, mode: 0o700 });
|
||||
const s = await start(t, p);
|
||||
// Deviation 11 (sage-1620): a file the store doesn't own fails the revoke. The CLI says the business
|
||||
// file is unchanged and a retry is safe, and rev-2 stays listed.
|
||||
const store = join(p.root, "config", "secrets", "agents", "acme", "rev-2");
|
||||
mkdirSync(store, { recursive: true, mode: 0o700 });
|
||||
writeFileSync(join(store, "notes"), "x");
|
||||
const revision = JSON.parse((await s.cli(["instances", "acme", "--json"])).out).revision;
|
||||
const failed = await s.cli(["instance", "delete", "acme", "rev-2", "--revision", revision]);
|
||||
assert.equal(failed.code, 3, failed.err);
|
||||
assert.match(failed.err, /^mosaic: credential-revoke-failed: .*business file is unchanged; tokens already revoked stay revoked .*which is safe \(request [^)]+\)$/m);
|
||||
assert.equal(JSON.parse((await s.cli(["instances", "acme", "--json"])).out).revision, revision);
|
||||
rmSync(join(store, "notes"));
|
||||
const del = await s.cli(["instance", "delete", "acme", "rev-2", "--revision", revision]);
|
||||
assert.equal(del.code, 0, del.err);
|
||||
assert.match(del.out, /^business acme: deleted rev-2, now retired\ntransaction [^\n]+\ntracker bot bot-acme-rev-2: remove the Vikunja bot user and any token it holds by hand in Vikunja\n$/);
|
||||
|
||||
Reference in new issue
Block a user