This was solved - it was just a question of rebuilding with just one command in after_code:
- exec:
cd: $home
cmd:
- su postgres -c 'psql discourse -c "ALTER EXTENSION vector UPDATE;"'
(and then removing this after the successful build).