REPOSITORY CODING · HARD
Instrument closures and shared window IDs corrupt eligibility
A closure can disappear before revision selection, and another instrument can replace this one. Trace the repository identity and the order of filtering.
Repository ImplementationObservatory proposal eligibility desk
Work through a real codebase.
Choose an environment, investigate the existing implementation and use the tests to check your change. Sign in to open a workspace; execution and Ono usage follow your plan’s allowances.
Task requirements and environments
Django · 90 minute session
- The desk checks whether each proposal can fit within available instrument time. It is an eligibility report, not a booking scheduler: proposals are evaluated independently and may propose the same time. All times and durations are integer minutes on one supplied timeline.
- Each proposal has a unique id, instrument, science duration greater than zero, setup time at least zero, and priority 0..10. Setup immediately precedes science and consumes the same contiguous window. Report proposals by descending priority then id.
- Window evidence is identified by (instrument, id). Resolve the greatest revision before discarding closed windows or clipping to the requested [start, end) period. Identical redelivery is allowed; conflicting content at the same identity/revision is an error.
- Combine overlapping or adjacent open intervals for the requested instrument after clipping to the period. Never add across a gap. Choose the earliest combined interval that fits setup plus science; output start, scienceStart and end. Exact fits are eligible.
- If no contiguous interval fits, report no-contiguous-window. The result also counts eligible proposals. The Django /decisions API can save and retrieve reports in SQLite, scoped by the X-Tenant rehearsal header; it is a local training identity, not production authentication.