Skip to content
TriedPrompts

More in Migrations & upgrades.

Upgrade a plugin to a new framework alpha with Codex CLI

A one-line Codex CLI loop read the Datasette 1.0a20 upgrade docs, fixed the failing tests and got a plugin passing again.

Result: WorkedTool: OpenAI Codex CLILevel: Advanced

Copy the prompt

Outcome

A one-line codex exec loop read the Datasette 1.0a20 upgrade docs, fixed the failing tests, and got the datasette-checkbox plugin passing again. The author first found the plugin's tests passed on the new alpha because they never checked that the table page loaded, so the test was changed to trigger the error before Codex got the job. The author notes fixing it by hand would probably have been faster, since the fix was small, then tested the fix manually, committed it and confirmed the released plugin worked in a fresh install.

Evidence: Screenshots or logsThe source shows screenshots, a transcript or the AI's output.

WorkedEvidence: Screenshots or logsPosted Last checked

Level: Advanced. You need: A tool that takes actions for you or writes code, connected accounts, or some setup on your computer.

How to use this

  1. Tap Copy prompt.
  2. Open the tool the case used (or a similar one) and paste the prompt; results may differ from the original.
  3. Paste it into the message box.
  4. Send it, then read the answer before acting on it.
New to this? What's a prompt?

A prompt is the message you send to the AI tool. Copy the one on this page, put your own details where it asks, and read the answer before you act on it.

Prompt

Original prompt

The prompt as the person shared it in the source.

What the prompt labels mean

These are the person's own words, as shared in the source.

Run the command tadd and look at the errors and then read ~/dev/datasette/docs/upgrade-1.0a20.md and apply fixes and run the tests again and get them to pass

Try this in:

Sends the Original prompt shown above. ChatGPT and Grok open with it filled in, and ChatGPT may send it straight away. Gemini and Claude open empty, so we copy the prompt for you to paste. Every button also copies it.

Opens in a new tab. We don't see what you send.

These links are only a shortcut. We're not affiliated with OpenAI, Google, Anthropic or xAI, and your results may not match the source.

Optional stronger version

Our rewrite with extra checks. The poster didn't test it.

Goal: Upgrade this plugin to the new Datasette alpha so all tests pass.

Inputs (fill in or confirm):
- The plugin repo path
- Upgrade guide path (~/dev/datasette/docs/upgrade-1.0a20.md)
- Test command (tadd)
- Python version and how tests are run in CI

Rules:
- Run the tests first and save the full error list.
- Read the upgrade guide and map each error to a guide section before editing.
- Make the smallest change that fixes each error; don't refactor unrelated code.
- Keep a short changelog entry describing the compatibility change.
- Read the whole upgrade guide first and list the changes that apply to this plugin.
- Fix one failing test at a time and rerun the suite after each change.
- Don't change test expectations just to make them pass; explain any test you think is wrong.
- Bump the Datasette dependency pin and note it in the changelog.

Checkpoint: Don't commit, bump versions or publish without asking.

If you get stuck: If an error isn't covered by the guide after two attempts, stop and show it to me. If a login, CAPTCHA or two-step code appears, stop and ask me to handle it; never guess or store passwords.

Verify before you finish: Final full test run must be green; list any warnings that remain.

Output: A summary of errors → fixes with file names, and the final test output.

Done when: the test suite passes on the new alpha with a minimal diff.

AI tool

OpenAI Codex CLI

Source

Posted
by Simon Willison
Last checked
Method:
How we verify

https://simonwillison.net/2025/Nov/6/upgrading-datasette-plugins/

Tell us how it went A reader message. It is not published on this page, and it is not a test of the prompt.

More in Migrations & upgrades

More in CodingRandom case in Coding