mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
Two benchmark-integrity bugs that could invalidate sync numbers while a run reports success: - CorpusServerMain keyed its serve-existing decision only on port + row count, so re-running a port with a different corpus/maxCount, or after a load crashed mid-way, silently served a stale/partial DB. Gate reuse on a completion sentinel keyed on corpus identity (path + byte length) and maxCount, written only after a full load; on any mismatch the prior DB is dropped and reloaded. - CorpusDownloader treated CLOSED identically to EOSE, so a relay ending a sub early (rate-limit/policy) after sending a partial page advanced the cursor past the unsent tail — silent corpus loss. Treat CLOSED as a soft failure (null → reconnect and retry the same cursor; the id dedup set absorbs the re-fetch), distinct from EOSE which means the page is complete. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EZeWww5TJnzBZKPoc6mvU