ADR 0038: Worker planning context batch DB loading¶
Date: 2026-02-11
Status: Accepted
Decision
- Load planning contexts for base and inspirations in one batch per job, instead of one DB round-trip chain per commit hash.
- Query
CommitCardwithcommit_hash IN (...), then queryMetricwithcommit_card_id IN (...), and queryMapElitesArchiveCellwithisland_id + commit_hash IN (...). - Rebuild
CommitPlanningContextobjects in the original input order so planning prompt semantics remain unchanged. - Keep existing fallback behavior for missing commit cards and missing highlights.
- Fail fast when one
(island_id, commit_hash)maps to multiple archive rows, because that violates the single-context assumption.