PraxisAI: AI-assisted coding interview debugging exercise https://www.praxisai.site/guides/leetcode-prep-for-ai-coding-interviews This is an original synthetic exercise, not an employer question, a SWE-bench task or a graded PraxisAI round. Python 3, standard library only, no account. Save cache.py and test_cache.py in the same empty folder. Read the contract in cache.py. Run: python -m unittest -v test_cache.py The starter intentionally fails 6 of the 10 tests. Fix cache.py while preserving the contract and all tests. Explain each failing case and why your changes work. Use an AI assistant only if your rehearsal format allows it. Give it the contract, the failing output and a bounded request; review the edits before running again. Save the original test output, your prompts, the final diff and rerun output. Try to explain without the assistant: - What happens exactly at expiry? - Why must a stored zero differ from a cache miss? - What does ttl=0 mean, and where is the default chosen? - Which checks demonstrate behavior preserved by your change? Only after your attempt, inspect reference_cache.py. To check the reference, copy its contents over cache.py in a separate folder beside the same tests. It passes all 10 tests. Fixing only one bug leaves other failures. Limits: nonnegative finite TTLs and a nondecreasing clock are assumed inputs. No concurrency, capacity eviction, background cleanup or security properties are tested. Passing these checks establishes only these observed cases. Optional next exercise: add a test for replacing a key before expiry. Explain which expiration time the replacement should use before asking the agent to edit.