One capture session, two components, one frame sequence
An observatory runs a capture session per camera each night. The session’s acquisition panel and its file recorder both number the frames they take, and every frame a camera takes needs its own number. Like the lesson’s budget, the sequence is one instance that several callers must share, and the question is again who shares it. Each level starts from the previous level’s finished code, so you can begin at any of them.
Frame numbers now continue from night to night: a session’s first frame is one past the last frame the archive holds for its camera. Reading the archive is slow, because it is on tape. At dusk the scheduler opens a session for every camera, and on a cloudy night most of them never take a frame. It also opens the next observing block’s session early, while the current one is still saving frames. The panel and the recorder must not change.
Each idle session spends a tape read for nothing. Worse, a session opened early reads the archive before the current block’s last frames are saved, and its first frames reuse their numbers.
Reproduce Archive: north 36. Open session a on north and take a panel frame (37); open b on north for the next block; a takes a recorder frame (38); b takes a panel frame. It should be 39. Today it is 38, and the archive was read twice before b needed it.
Acceptance criteria A session’s first frame is one past the archive’s last frame for its camera, as the archive is when that first frame is taken. A session reads the archive once, on its first frame; a session that takes no frames never reads it. An unknown camera is rejected when the session opens, without reading the archive. Within a session the panel and the recorder still share one sequence, and sessions stay independent. No component changes. Notes Cases print each frame, then the archive’s reads per camera as “reads north=1 south=0”, joined by “ | ”. The checker fills the archive before each case. Sessions on one camera do not take frames at the same time; the next block’s session starts taking frames after the current one stops. Keep the names and signatures; the checker calls them.