Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- Deploy schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error to pg

-- requires: schemas/metaschema_modules_public/tables/events_module/table

BEGIN;

-- Generated private function that records a refused operation under its error
-- code as the event name; the server discovers it here, beside record_event.
ALTER TABLE metaschema_modules_public.events_module
ADD COLUMN record_error text NOT NULL DEFAULT '';

COMMIT;
1 change: 1 addition & 0 deletions packages/metaschema-modules/pgpm.plan
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ schemas/metaschema_modules_public/tables/image_module/table [schemas/metaschema_
schemas/metaschema_modules_public/tables/repository_module/table [schemas/metaschema_modules_public/schema] 2026-08-15T01:00:00Z devin <devin@cognition.ai> # add repository_module config table (repositories, events, workflows, builds, local change requests)
schemas/metaschema_modules_public/tables/machine_module/table [schemas/metaschema_modules_public/schema] 2026-08-15T02:00:00Z devin <devin@cognition.ai> # add machine_module config table (enrolled machines, sessions, command ledger)
schemas/metaschema_modules_public/tables/cluster_module/table [schemas/metaschema_modules_public/schema] 2026-08-17T00:00:00Z devin <devin@cognition.ai> # add cluster_module config table (fleet catalog: clusters, database servers, physical databases, placements)
schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error [schemas/metaschema_modules_public/tables/events_module/table] 2026-09-06T02:30:00Z devin <devin@cognition.ai> # add record_error: the generated function that records a refused operation under its error code as the event name
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Revert schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error from pg

BEGIN;

ALTER TABLE metaschema_modules_public.events_module
DROP COLUMN record_error;

COMMIT;
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6557,4 +6557,9 @@ COMMENT ON COLUMN metaschema_modules_public.cluster_module.database_servers_tabl

COMMENT ON COLUMN metaschema_modules_public.cluster_module.physical_databases_table_id IS '@module_table';

COMMENT ON COLUMN metaschema_modules_public.cluster_module.database_placements_table_id IS '@module_table';
COMMENT ON COLUMN metaschema_modules_public.cluster_module.database_placements_table_id IS '@module_table';

ALTER TABLE metaschema_modules_public.events_module
ADD COLUMN record_error text
NOT NULL
DEFAULT '';
Comment on lines +6562 to +6565

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 bug · medium

Hand-edit generated SQL bundle artifact

The generated bundle packages/metaschema-modules/sql/metaschema-modules--0.44.0.sql was hand-edited to append the ALTER TABLE ... ADD COLUMN record_error statement (packages/metaschema-modules/sql/metaschema-modules--0.44.0.sql:6562), but AGENTS.md requires this artifact to be regenerated via pgpm package and never edited by hand. Hand-editing breaks the byte-reproducibility guarantee and can leave the committed bundle diverging from what deploy/ + pgpm.plan would produce, causing deploy inconsistencies.

📋 Prompt for AI Agents

In packages/metaschema-modules/sql/metaschema-modules--0.44.0.sql, delete lines 6562-6565 (the hand-appended ALTER TABLE ... ADD COLUMN record_error block). Then run pgpm package in the metaschema-modules directory so the bundle artifact is regenerated from deploy/ and pgpm.plan, and commit the regenerated artifact together with the deploy change.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Verify schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error on pg

BEGIN;

SELECT record_error FROM metaschema_modules_public.events_module WHERE FALSE;

ROLLBACK;
Loading