Developer Finds Spec Contradiction After 366 Tests Pass on Flawed Contract
A software developer discovered a critical logic flaw in an agent-permission system after 366 automated tests passed against a specification that contained a built-in contradiction. The bug stemmed from an evidence classifier that trusted an unverified enum value — SKIPPED_TTL_EXPIRED — without cross-checking the structured TTL field, allowing a grant with 17.4 hours remaining to be incorrectly marked as expired. The flaw was not caught by tests because the specification itself mandated the contradictory behavior, meaning the implementation was technically correct but logically wrong. A fix was developed by adding validation that cross-checks the enum against the raw TTL value, and further edge cases were uncovered, including grants expired by just one second being misclassified due to Python's rounding of negative near-zero floats. The incident highlights how passing tests can mask specification-level errors when the contract itself is frozen with a flaw.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in