Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:14z6ct5gje is past its budget: trevato/forge: "MCP backups_test > an unreachable one says why, and never echoes a secret" failed on 14 pulls in the la… #8149

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/forge:mason/8130-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 3 commits fork 1 thread · 1 unresolved

  • Merged. mason/8130-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as efdf956.

Review

Sign in to review this change.
2 files changed +17 −1
src/snapshot/destination.ts +2 −1
@@ -103,7 +103,8 @@ export function scrubReason(target: S3Target | undefined, error: unknown): strin
103103
104104 /** Does this target answer? One sentence either way, never a key in it. */
105105 export async function testTarget(target: S3Target): Promise<string> {
outdated

Needs a test that fails without attempts: 1, such as a stubbed S3Client counting list() calls and asserting exactly one.

106 const store = s3Store(target);
106 // One attempt: a test that retries a refused port makes the answer wait on backoff.
107 const store = s3Store(target, 1);
107108 try {
108109 const keys = await store.list("");
109110 return `Reached ${store.where}: ${keys.length === 1 ? "1 object" : `${keys.length} objects`} listed.`;
test/mcp-backups-test.test.ts +15
@@ -93,6 +93,21 @@ describe("MCP backups_test", () => {
9393 expect(r.text).not.toContain("AKIAEXAMPLE");
9494 }, 20_000);
9595
96 test("an unreachable one is tried once, not retried with backoff", async () => {
97 let calls = 0;
98 (Bun as any).S3Client = class {
99 async list() {
100 calls++;
101 throw new Error(`connect ECONNREFUSED ${SECRET}`);
102 }
103 };
104 const r = await test_(admin, fields("http://127.0.0.1:1"));
105 (Bun as any).S3Client = realS3;
106 expect(calls).toBe(1);
107 expect(JSON.parse(r.text).says).toStartWith("Could not list ");
108 expect(r.text).not.toContain(SECRET);
109 }, 20_000);
110
96111 test("a field the page would refuse is refused in the same words", async () => {
97112 const r = await test_(admin, { ...fields("ftp://x") });
98113 const out = JSON.parse(r.text);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs