Route resets at a climbing gym
A climbing gym resets its routes every few weeks: close the route, strip the old holds, set new ones, inspect the wall, and reopen only if the inspection passes. Rope routes and boulders do some steps differently, as the lesson’s feeds decode differently, but the order and the rule that a failed inspection keeps a route closed belong to every reset. Each level starts from the previous level’s finished code, so you can begin at any of them.
Competition routes are set like rope routes, then a forerunner climbs each one after it passes inspection. If the forerunner can’t top it, the route stays closed for the setters to adjust. No other kind of route has a forerun, and the gym does not want every route type to have to say so.
Today a competition route reopens straight after inspection, so an unclimbable route reaches the competition floor. If each route type has to answer “do I forerun?”, every one written so far, and the checker’s, changes for a step only one of them uses.
Reproduce Run new CompetitionReset().reset({ name: "Final", problems: ["unclimbable"] }): it should end “inspect > forerun: not topped > stays closed”. Today it reopens.
Acceptance criteria After a passing inspection, a route type that has a forerun runs it; a failed forerun keeps the route closed and the line names it. A competition route’s forerun fails on a route marked unclimbable (“not topped”); a failed inspection stops the reset before any forerun. Route types without a forerun, the checker’s included, reset exactly as before without being changed. The order and the stop rules stay in the one reset. Notes A forerun that passes adds nothing to the line; a failed one adds “forerun: <problem>” after “inspect”. The checker brings a speed wall with a forerun of its own (it fails when the lane is blocked) and keeps its speed wall without one. TypeScript: it defines forerun(route: Route): string | null on its subclass. Go: it gives its type a method Forerun(route Route) string and nothing else. Rust: it overrides the trait’s forerun. Keep the names and signatures from the previous level.