Placement says which enclosure each matching species goes to. It needs the lookup and the center’s enclosure plan, which is read from a large file. Today placement reads the plan on every call. A plan file is either well formed or malformed until the next nightly export, and the nightly job reloads every center after the export.
Every placement re-reads the large plan file, even though it changes once a night. With a malformed plan, every placement re-reads and fails the same way.
Reproduce
Start the server and ask for two placements at northfield, owl then squirrel: the plan should be built once (plan builds 1). Today each placement builds it again, and status says nothing about the plan.
Acceptance criteria
- A center’s first placement builds its plan, after the lookup; later placements reuse it.
- A malformed plan is kept as a failure: later placements return the same error without building again, even after the file is fixed, until the center is reloaded.
- Lookups keep the easy level’s rules: built on first lookup, a failure retried, other centers unaffected.
- Status adds “plan not built”, “plan ready” or “plan failed (reason)”, and still builds nothing.
Notes
- Placement prints word@center placement: [enclosures] (plan builds N), or rejected (reason). Status reads center: N sheets, lookup …, plan ….
- If the lookup fails, placement fails with the lookup’s error before it reaches the plan.
- Keep the recipes, the plumbing, and the names and signatures; the checker calls them.