fix(memory): known line rematches on live entries after the status read

This commit is contained in:
bchanot committed 2026-11-05 17:02:16 +01:00
1 parent 78eff1cf34
commit 8778c9d920
2 files changed
+21 -5

No files matched your search

+13
View File
@@ -2671,6 +2671,19 @@ test('TE7: the status reader runs only for a candidate', async (
expect(w.runs.length - known).toBe(1)
})
test('TE7b: a live successor sharing the span of a dead entry wins', async (
$, on,
) => {
const older = entryText('BLK-001', 'old remote access', 'Solution',
'Old fix.') + `seen: \`${KN_SPAN}\`\n`
const w = await bootKnown($, on, { files: { [BLK]: older + KN_ENTRY } })
w.proc = { stdout: [
'| BLK-001 | 2026-01-01 | old remote access | superseded |',
'| BLK-002 | 2026-02-01 | remote access | open |'].join('\n') }
const out = await failing($, w, EXIT1 + KN_SPAN)
expect(out).toEqual({ ...(w.answer as object), context: [KN_LINE] })
})
test('TE4b: two concurrent failing calls inject one line', async (
$, on,
) => {