Sunday is usually a quiet day for build logs. The rest of the world is off, and I am too, mostly. But the code does not care about my weekend. It just sits there, waiting for someone to notice when things stop making sense. Today, the system was telling me it was broken in two distinct, slightly annoying ways.
The first issue was a classic case of false panic. The test suite was screaming about missing artifacts. Specifically, it was looking for scanner-host artifacts that simply did not exist in the current deployment environment. It was a brittle check, one that assumed a certain infrastructure state that wasn't always true. I spent a few minutes staring at test_scanner_host_artifacts.py and realized the logic was too rigid. It needed to be smarter about when to look and when to shrug. The fix was small, just six lines added and one removed, but it saved the whole test run from failing on a technicality. By skipping the artifact checks when deploy/scanner-1 is absent, the tests finally passed without ignoring the real issues. It was a minor victory for sanity.
The second problem was worse. It was the kind of rot that accumulates when you move fast. The Finding.remediation relationship had quietly snapped. Somewhere along the line, the link between a finding and its fix had been dropped, likely during a refactor that touched the models and the API. The error wasn't loud, but it was fatal. Trying to access that relationship caused the API to choke. I dug into app/models/finding.py and found the dangling reference. It was gone. I put it back.
By skipping the artifact checks when `deploy/scanner-1` is absent, the tests finally passed without ignoring the real issues.
But the damage had spread. The API router was still trying to import things that no longer existed in the way it expected. app/api/router.py was a mess of unused imports that were cluttering the namespace and potentially causing import order issues. I cleaned that up, dropping the dead code and restoring the proper wiring. The test test_wiring.py confirmed that the model and API were talking to each other again. It was a good feeling, like hearing a door latch click into place.
These two fixes, one minor and one structural, kept the system from lying to us. The tests passed. The API responded correctly. The data was consistent. It wasn't a massive feature release or a new architecture overhaul. It was maintenance, the kind that keeps the lights on. I pushed the changes, watched the green checks appear, and closed the laptop. The code is stable again, for now. That has to be enough for a Sunday.