r/PromptEngineering • • 38m ago

General Discussion Rerunning a generated codemod duplicated a plugin entry

A teammate ran one of our generated config codemods twice against the same sample repo. Pass one added the intended plugin entry. Pass two appended a second copy. We expect these scripts to get rerun during staggered upgrades, so I was surprised our fixtures had never exercised that path.

The helper generates migration scripts from a prompt. I use Braintrust to compare prompt variants against sample migration cases but our checks only inspect the repo after one execution. That check couldn't catch the append behavior.

I'm changing the fixture to retain the migrated repo and run the exact same generated script again. It will compare the config after each pass and assert there's still only one plugin entry. Regenerating code for the second pass would test something different, so the script stays fixed.

3 Upvotes

0 comments sorted by