fix: address PR #504 review warnings

- workspace-context: a transiently unavailable but still-effective candidate
  keeps its cached trimmed digest in the directory's dedup slot, so an
  identical later sibling is not emitted as a duplicate set until the next
  successful reconciliation
- app-boot: --resume rejects a following token that is itself resume syntax
  instead of accepting it as a session id
- tui: the queued-steering badge tracks per-entry sources and a drain removes
  one matching entry, so loop-authored steering (no agent/queued) cannot
  consume a pending user message's slot
This commit is contained in:
Turtle
2026-07-22 16:49:50 +08:00
parent ab32d3ec98
commit 7b46e1f73c
6 changed files with 101 additions and 19 deletions

View File

@@ -448,7 +448,17 @@ export async function reconcileInstructionContext(
const { directory } = decodeScopeKey(scope)
const previous = effective.get(scope)
const probe = await probeScopeInstruction(scope, projectRoot, resolved, fileSystem, options.signal)
if (probe.kind === 'unavailable') continue
if (probe.kind === 'unavailable') {
// Last-good-state: the candidate stays effective, so its cached trimmed
// digest must keep occupying the directory's dedup slot — otherwise an
// identical later sibling would be emitted as a duplicate `set` until the
// next successful reconciliation removed it again.
const cached = versions.get(scope)
if (cached !== undefined && previous !== undefined && previous.action !== 'remove') {
registerKeptTrimmed(directory, cached.trimmedDigest)
}
continue
}
if (probe.kind === 'absent') {
if (previous === undefined || previous.action === 'remove') versions.delete(scope)
else pushRemoval(scope, previous.path)