Several filamentous biopolymers exhibit unusual polymerization-depolymerization kinetics where continued elongation (shortening) is possible only in an active (inactive) state while occasional random transition (switching) between the active and inactive states takes place. Here, we present a minimal stochastic model capturing only the key features of random elongation-shortening-switching kinetics of a generic filament. The structure and/or function of the filament ends when its length hits a critical value during its shortening; the time to reach this critical length can be formulated as a first-passage time (FPT) and for its calculation the critical length is treated as an absorbing boundary. Moreover, the lengths of the filaments that inspire our model are constrained to a finite maximum value N; therefore, in our model we impose a reflecting boundary beyond which the filament cannot grow. We determined the distribution of the FPT and derived its first two moments. We identify a critical point where the drift of the tip of the filament vanishes making its movement purely diffusive; at this critical point, in the limit N tends to infinity, the fluctuations in the FPT diverges and MFPT becomes infinite indicating critical slowing down. Our analytical results will serve as the testing ground for the accuracy of the approximate theoretical results of more realistic models for polymerization-depolymerization kinetics of specific bio-filaments.