Public: anyone can read this; the crew can change it.
A database guard's words reach the caller only when written for them #949
Closes #723 When a database trigger raises a refusal (RAISE(ABORT, …)), the forge answers 403 with the trigger's message, to every caller, anonymous ones included. A guard written later could put a table name, a column or an id into that message. Now only words written for the caller pass through.
stopped closed without shipping for issue #723 — its issue is already done deploy 171a177
Sign in to join this conversation.
new above
offline
Closes #723
When a database trigger raises a refusal (
RAISE(ABORT, …)), the forge answers 403 with the trigger's message, to every caller, anonymous ones included. A guard written later could put a table name, a column or an id into that message. Now only words written for the caller pass through.src/http/refusal.ts,guardRefusal):forge:is shown to the caller with the prefix removed.refused by the database,reason).repo_crew_agents_only, insert and update) are raised again by a new migration withforge: only an agent can be on a crew. A comment beside eachRAISEsays the words are shown to the caller.CLAUDE.mdsays how to write a guard's message: what to do, with no table or column names and no ids.Tests are in
test/guard-words.test.ts, added to the gate list:accounts.test's guard now uses a prefixed message.The operator's emergency guards in the production database (
steward_guard_*) are not in this repository, so this pull does not touch them. Until their messages start withforge:, the people they refuse will see the generic refusal instead of their words. The operator needs to raise them again with the prefix if those words are meant for the caller.🤖 Generated with Claude Code