test: coverage-audit additions for the fix wave

Ship Step 7 gap-fill (all passing, 248 tests across the touched suites):
memory + dream stage probe-timeout proceeds, gbrain-detect override paths,
stale-flag passthrough, 200-body-missing-.security fail-closed case,
telemetry redaction edges, and credential-pattern edge cases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-06-11 23:08:54 -07:00
co-authored by Claude Fable 5
parent 028cb52ca8
commit 88ca684929
6 changed files with 168 additions and 0 deletions
+30
View File
@@ -152,6 +152,36 @@ describe("gstack-gbrain-sync — split-engine SKIP (plan D12)", () => {
}
}, 30_000); // proceeding runs the real code-import path against the slow fake (~11s)
it("memory stage also PROCEEDS (with warning) on probe timeout (#1964)", () => {
const env = makeEnv({ withGbrain: true, gbrainBehavior: "slow", withConfig: true });
try {
const r = runOrchestrator(env, ["--no-code", "--no-brain-sync"], {
GSTACK_GBRAIN_PROBE_TIMEOUT_MS: "300",
});
const out = r.stdout + r.stderr;
expect(out).not.toContain("local engine timeout");
expect(out).toContain("memory: engine probe timed out");
} finally {
env.cleanup();
}
}, 30_000);
it("dream stage also PROCEEDS (with warning) on probe timeout (#1964)", () => {
const env = makeEnv({ withGbrain: true, gbrainBehavior: "slow", withConfig: true });
try {
const r = runOrchestrator(
env,
["--dream", "--no-code", "--no-memory", "--no-brain-sync"],
{ GSTACK_GBRAIN_PROBE_TIMEOUT_MS: "300" },
);
const out = r.stdout + r.stderr;
expect(out).not.toContain("local engine timeout");
expect(out).toContain("dream: engine probe timed out");
} finally {
env.cleanup();
}
}, 30_000);
it("SKIPs code stage when local engine is broken-db; brain-sync still attempted", () => {
const env = makeEnv({ withGbrain: true, gbrainBehavior: "broken-db", withConfig: true });
try {