Skip to content

Commit 8b19309

Browse files
committed
fix(workspace): count declined blocks as failure in the post-bind seed
`isPostBindSeeded()` in memory-backfill.ts previously returned true when `failed === 0`, even if the service explicitly declined some blocks (quota, permissions). That left the binding treated as fully seeded even though blocks were still missing from the workspace, so no future rebind would retry them. Add `declined === 0` to the success gate. (altimate- harness-bot #1116 comment 3840503346.)
1 parent c068ed6 commit 8b19309

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/opencode/src/altimate/workspace/memory-backfill.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ export async function backfillOnBind(directory: string, binding: CachedBinding):
3838
// Only a sweep that stored everything it meant to counts as seeded. A
3939
// failure here must leave the binding eligible for a retry, or local blocks
4040
// stay absent from the workspace until a rebind or an unrelated edit.
41-
return !result.gated && result.failed === 0
41+
// ``declined`` counts too — a block the service explicitly refused (quota,
42+
// permissions) is still absent from the workspace and the binding should
43+
// stay unseeded so a later rebind retries it. Without this a partially-
44+
// rejected backfill left the binding treated as fully seeded. (altimate-
45+
// harness-bot #1116 comment 3840503346.)
46+
return !result.gated && result.failed === 0 && result.declined === 0
4247
} catch (err) {
4348
log.warn("workspace memory backfill after bind failed", { err: String(err) })
4449
return false

0 commit comments

Comments
 (0)