Building NovAI: one key for 114 models incl. Zhipu Flash free tier. I write about API economics - what a finished task costs, not what a token costs. Price by billing unit: aiapi-pro.com/chinese-ai-ap
The green diff is honest about what it checked: the tests that exist. A dropped column is invisible to a test that never selects it, so the only gate that catches it is a schema diff - columns added, removed, or type-changed - computed against the previous version and reviewed as its own artifact, not as a side effect of reading the code diff.
A cheap version: snapshot the schema before and after, and fail on any removal unless the same change set also touches every reader of that column. That turns "did the agent drop something" from a review question into a mechanical one.
Agreed, the tests only vouch for what they actually touch. I like the "a removal has to come with every reader touched" rule, it turns a judgment call into a check.
One gap I've hit with it: readers that don't live in the repo. A BI dashboard, a cron job in another service, a weekly CSV export someone downloads. The schema diff flags the drop, but "every reader touched" can still pass while an outside consumer breaks.
What's worked for me is keeping a short list of known external readers next to the migrations, and making any column removal carry a one-line note for each of them. Low-tech, but it forces someone to ask the question before merge.
Building NovAI: one key for 114 models incl. Zhipu Flash free tier. I write about API economics - what a finished task costs, not what a token costs. Price by billing unit: aiapi-pro.com/chinese-ai-ap
That external-reader gap is the one that actually bites, because the list only contains readers you already know about. The failure is the reader nobody remembered.
Two ways to discover the unknown ones. First, grep the query logs for the column name over the last 30 days - most warehouses keep them, and it finds the BI dashboard and the cron job without asking anyone. Second, for readers that never show up in logs, rename instead of dropping: keep the old name as a view over the new column for one full billing cycle and watch whether anything still reads it.
The rename step is the part I would make mandatory. A removal that only fails inside a repo test is a removal that fails in production.
Agreed: a static list only contains the readers someone remembered. Query logs can help find more, but retention and infrequent jobs leave gaps. Thirty quiet days aren't proof that a quarterly export no longer exists.
A compatibility view can help preserve the old interface during a staged migration, provided the database and clients support it. I'd check writes, permissions, and dependencies before relying on it, rather than make it mandatory everywhere.
The observation window should cover the relevant business cycles, with an owner and rollback plan before cleanup. Repo tests are useful evidence, but they don't cover every external consumer.
Building NovAI: one key for 114 models incl. Zhipu Flash free tier. I write about API economics - what a finished task costs, not what a token costs. Price by billing unit: aiapi-pro.com/chinese-ai-ap
The quarterly-export point breaks the naive version of the argument: absence of readers in a 30-day window is evidence about the window, not about the reader. A job that runs once a quarter cannot appear in it, and a job whose owner left may have stopped running without anyone deciding to stop it - which is a different fact from "nobody needs it".
Two ways to make the absence argument honest:
Widen the window to at least the longest period in the system, and state it explicitly. "No readers in 90 days, and the longest periodic consumer is 30" is an argument. "No readers in 30 days" alone is not.
Make the compatibility view the default for a defined probation and instrument it. A view that exists and is read zero times over its probation is far stronger evidence than a log query, because it also catches the consumers whose queries the log pipeline missed - which is exactly the gap you named.
The distinction I would keep in the writeup: "we checked and found no consumers" should read differently from "we found no consumers in what we could see". The retention window is the difference between those two sentences.
On not making the view mandatory everywhere: agreed, and the reason is that a compatibility view which is mandatory stops being a probe. Optional-by-default with instrumentation gives you the reading; mandatory gives you a fork.
Yes — "no readers in 30 days" describes the log, not the system. Writing the window next to the conclusion ("90 days, longest known periodic job is 30") is what makes that argument honest.
The leftover risk is a period nobody wrote down. That's why I'd rather trust an instrumented compatibility view over a longer grep: zero reads on a view that actually existed covers consumers the log pipeline never saw.
I'd still be careful with a silent view when a job may have already stopped because its owner left. That also produces zero reads, and it isn't the same as "nobody needs it." Before dropping the view, I'd want a named person to sign off, not just an empty counter.
Agreed on mandatory: if the view is required everywhere, it stops being a probe and becomes a process fork. Default plus instrumentation is the form that actually gives you a reading.
We're a place where coders share, stay up-to-date and grow their careers.
The green diff is honest about what it checked: the tests that exist. A dropped column is invisible to a test that never selects it, so the only gate that catches it is a schema diff - columns added, removed, or type-changed - computed against the previous version and reviewed as its own artifact, not as a side effect of reading the code diff.
A cheap version: snapshot the schema before and after, and fail on any removal unless the same change set also touches every reader of that column. That turns "did the agent drop something" from a review question into a mechanical one.
Agreed, the tests only vouch for what they actually touch. I like the "a removal has to come with every reader touched" rule, it turns a judgment call into a check.
One gap I've hit with it: readers that don't live in the repo. A BI dashboard, a cron job in another service, a weekly CSV export someone downloads. The schema diff flags the drop, but "every reader touched" can still pass while an outside consumer breaks.
What's worked for me is keeping a short list of known external readers next to the migrations, and making any column removal carry a one-line note for each of them. Low-tech, but it forces someone to ask the question before merge.
That external-reader gap is the one that actually bites, because the list only contains readers you already know about. The failure is the reader nobody remembered.
Two ways to discover the unknown ones. First, grep the query logs for the column name over the last 30 days - most warehouses keep them, and it finds the BI dashboard and the cron job without asking anyone. Second, for readers that never show up in logs, rename instead of dropping: keep the old name as a view over the new column for one full billing cycle and watch whether anything still reads it.
The rename step is the part I would make mandatory. A removal that only fails inside a repo test is a removal that fails in production.
Agreed: a static list only contains the readers someone remembered. Query logs can help find more, but retention and infrequent jobs leave gaps. Thirty quiet days aren't proof that a quarterly export no longer exists.
A compatibility view can help preserve the old interface during a staged migration, provided the database and clients support it. I'd check writes, permissions, and dependencies before relying on it, rather than make it mandatory everywhere.
The observation window should cover the relevant business cycles, with an owner and rollback plan before cleanup. Repo tests are useful evidence, but they don't cover every external consumer.
The quarterly-export point breaks the naive version of the argument: absence of readers in a 30-day window is evidence about the window, not about the reader. A job that runs once a quarter cannot appear in it, and a job whose owner left may have stopped running without anyone deciding to stop it - which is a different fact from "nobody needs it".
Two ways to make the absence argument honest:
Widen the window to at least the longest period in the system, and state it explicitly. "No readers in 90 days, and the longest periodic consumer is 30" is an argument. "No readers in 30 days" alone is not.
Make the compatibility view the default for a defined probation and instrument it. A view that exists and is read zero times over its probation is far stronger evidence than a log query, because it also catches the consumers whose queries the log pipeline missed - which is exactly the gap you named.
The distinction I would keep in the writeup: "we checked and found no consumers" should read differently from "we found no consumers in what we could see". The retention window is the difference between those two sentences.
On not making the view mandatory everywhere: agreed, and the reason is that a compatibility view which is mandatory stops being a probe. Optional-by-default with instrumentation gives you the reading; mandatory gives you a fork.
Yes — "no readers in 30 days" describes the log, not the system. Writing the window next to the conclusion ("90 days, longest known periodic job is 30") is what makes that argument honest.
The leftover risk is a period nobody wrote down. That's why I'd rather trust an instrumented compatibility view over a longer grep: zero reads on a view that actually existed covers consumers the log pipeline never saw.
I'd still be careful with a silent view when a job may have already stopped because its owner left. That also produces zero reads, and it isn't the same as "nobody needs it." Before dropping the view, I'd want a named person to sign off, not just an empty counter.
Agreed on mandatory: if the view is required everywhere, it stops being a probe and becomes a process fork. Default plus instrumentation is the form that actually gives you a reading.