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
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/8130-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 3 commits fork 1 thread · 1 unresolved
2 files
changed +17
−1
src/snapshot/destination.ts +2 −1
| @@ -103,7 +103,8 @@ export function scrubReason(target: S3Target | undefined, error: unknown): strin | ||
| 103 | 103 | |
| 104 | 104 | /** Does this target answer? One sentence either way, never a key in it. */ |
| 105 | 105 | export async function testTarget(target: S3Target): Promise<string> { |
| 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); | |
| 107 | 108 | try { |
| 108 | 109 | const keys = await store.list(""); |
| 109 | 110 | 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", () => { | ||
| 93 | 93 | expect(r.text).not.toContain("AKIAEXAMPLE"); |
| 94 | 94 | }, 20_000); |
| 95 | 95 | |
| 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 | ||
| 96 | 111 | test("a field the page would refuse is refused in the same words", async () => { |
| 97 | 112 | const r = await test_(admin, { ...fields("ftp://x") }); |
| 98 | 113 | const out = JSON.parse(r.text); |
new above
offline
Needs a test that fails without attempts: 1, such as a stubbed S3Client counting list() calls and asserting exactly one.