Logbook · Event 16 October 2026 · Lessons learned
The test run did not behave like live: WP-CLI without plugins
- 01Hurdle
Twice, WordPress behaved differently from the test run.
- 02Cause
The test runs were done without plugins, while the live site always loads them.
- 03Solution
Switching the theme now only goes through a script with plugins, and a test run only counts under the conditions of live.
- 04Result
Both errors were caught before anything was lost, one of them only a day after going live.
Evidence
# Delete lock for the teams
15 Oct test run without plugins: ok
15 Oct live
16 Oct cross-check: high
16 Oct fixed, live A test run should show that something works on the live site (the production system). It only does that if it runs under the same conditions as the live site. While rebuilding the MTV site in October 2026, I ran into this three times in two days, twice with the same cause.
Terms on this page
- Production system
- The system that visitors really use. It is also called live.
- AI agent
- A program that uses an AI to carry out tasks on its own.
- WordPress
- A widely used program for websites. You manage pages, posts and menus with it without programming anything yourself.
- WP-CLI
- A tool that controls WordPress through typed commands, without the admin pages in the browser.
- Plugin and theme
- A plugin adds a feature to WordPress, and the theme determines how the site looks.
- Test copy (staging)
- A copy of the website where changes run first. Whatever goes wrong there does not affect the live site.
- Rewrite rules
- Rules WordPress uses to match an address to the right page. Plugins such as an event calendar bring their own rules.
- Error 404
- The answer a website gives when there is nothing at an address. The number 404 stands for “not found”.
- Custom post types
- Your own kinds of content in WordPress, besides pages and posts. Every record of one kind has the same fields.
- Test
- A small checking program. It looks at whether a program does what it should. Green means passed.
- Cross-check
- A second AI checks the risky steps of the first. It rates what it finds by severity, from critical through high and medium to low.
Commands without plugins
The AI agents mostly work on WordPress through WP-CLI, a command-line tool. On my setup these commands run without plugins unless something else is explicitly requested. There is a reason for that: with plugins, every command runs their code on the live site, and some plugins send requests to the outside while doing so.
The live site always loads its plugins, though. Something checked without plugins does not have to be what visitors experience.
The theme switch that would have hidden every event
On 15 October 2026 the site got its own theme. On the test copy (staging) it turned out that after a theme switch WordPress only rewrites its rules for addresses (rewrite rules) on the next request. If that request ran without plugins, the rules of the event calendar were missing. The calendar and all events then answered “not found” (error 404). On the live site, exactly that would have happened during the switch.
Since then a theme switch has only run through a script. It switches with plugins and afterwards checks whether the events respond. I rehearsed the switch and the switch back on the test copy beforehand.
The delete lock that only held in the test run
Since the rebuild, teams, coaches and halls have been stored as records in WordPress (custom post types). On the same day the team records got a delete lock. Its test run passed. But it ran without plugins. On the live site the event calendar overrode the lock, and it had no effect at all.
The cross-checks of that step did not find the error. It only came up a day later, in the cross-check of the next step, and the second model rated it as high. Nothing had been lost on the live site by then. So even a reviewer misses something when the test run it relies on does not run like live.
The game schedule without a logged-in user
On 16 October 2026 came the third case, with a different cause. The test runs for the game schedule sync ran with a logged-in user, while the real sync early in the morning runs without one. This time the cross-check found the error before going live. The post An hour and a half to live tells that story.
A test that measured nothing
I have also seen a check turn green without proving anything in my portfolio project, this time with a test rather than a test run. My first attempt to let AI agents manage a securities account is called Portfolio Manager and only buys for practice, without real money. On 25 September 2026 a second language model checked what happens when the program runs twice at the same time and both times prepares the same purchase. In 19 of 200 attempts the same practice purchase was created twice.
The agent built a fix and a test for it: two program runs started at the same time, for 40 rounds. The test was green, but also with the old, faulty code. In its report the agent itself wrote: “it measured nothing”. Only a harder test found the error. Four program runs executed exactly the step that creates the purchase at the same time. Without the fix, a double purchase appeared in all 25 rounds, with the fix in none.
What has applied since then
- A theme switch only goes through the script, with plugins and with the check of the events afterwards. That also applies to the way back.
- For the game schedule sync there is a test run without a logged-in user, just as it runs in the morning.
A test run only proves what runs under the same conditions as live.
What is still open
I will not get rid of this kind of error completely. Every test run is a simplification of the live site, otherwise it would not be a test run. The cross-check finds a lot of it, but not everything, as the delete lock shows.