From f0805b78f57c3a41d524996bb424b3a10d5faa7c Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Mon, 11 May 2026 23:51:46 +0000 Subject: [PATCH] learnings: surface persist failures as warnings, not debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `persistLearnings` only emitted `log.info("» learnings updated")` on success; every failure path (non-2xx, fetch throw, 10s timeout) was `log.debug`, which is hidden unless `ACTIONS_RUNNER_DEBUG=true`. Survey of recent runs caught at least one case where the agent definitively edited the tmpfile but no DB row was written and no warning surfaced. Promote both failure paths to `log.warning` so dropped agent work is visible in CI logs. The unchanged-from-seed short-circuit stays at debug — that's a genuine no-op. --- main.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.ts b/main.ts index e913314..5eaa824 100644 --- a/main.ts +++ b/main.ts @@ -471,12 +471,16 @@ async function persistLearnings(ctx: ToolContext): Promise { }); if (!response.ok) { const error = await response.text().catch(() => "(no body)"); - log.debug(`learnings persist failed (${response.status}): ${error}`); + // promoted from debug → warning: this path means the agent edited the + // file (we already short-circuited the unchanged-from-seed case above) + // but the PATCH dropped it on the floor. silently losing real work is + // worse than the noise of a CI warning. + log.warning(`learnings persist failed (${response.status}): ${error}`); return; } log.info("» learnings updated"); } catch (err) { - log.debug(`learnings persist failed: ${err instanceof Error ? err.message : String(err)}`); + log.warning(`learnings persist failed: ${err instanceof Error ? err.message : String(err)}`); } }