refactor(metaschema-modules): define events_module.record_error inline, drop the alteration - #127
Conversation
…e, drop the alteration
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Review complete. 🟡 1 medium 💬 Inline comments (1)
The change removes the standalone
Primary concern: the released Reviewed commit: 0517310 |
There was a problem hiding this comment.
This PR folds the record_error column into the base events_module/table change and regenerates the sql/metaschema-modules--0.44.1.sql bundle, but does so by mutating the already-released v0.44.1 artifact instead of bumping the version.
Key findings
- 🟡 Mutate released v0.44.1 artifact without version bump — metaschema-modules--0.44.1.sql:365
| achievement_rewards_table_id uuid NOT NULL DEFAULT uuid_nil(), | ||
| achievement_rewards_table_name text NOT NULL DEFAULT '', | ||
| record_event text NOT NULL DEFAULT '', | ||
| record_error text NOT NULL DEFAULT '', |
There was a problem hiding this comment.
🟡 bug · medium
Mutate released v0.44.1 artifact without version bump
The released v0.44.1 (tag) shipped sql/metaschema-modules--0.44.1.sql ending in ALTER TABLE ... ADD COLUMN record_error, but this PR regenerates that same 0.44.1 artifact with record_error folded into the CREATE TABLE (sql/metaschema-modules--0.44.1.sql:365) while package.json and metaschema-modules.control still declare 0.44.1. The same version now maps to two different install artifacts with different sha256 digests, breaking byte reproducibility and version immutability for consumers who pinned or installed v0.44.1. The installed schema is functionally identical, so there is no data loss, but the change should ship as a new version rather than mutating the released artifact.
📋 Prompt for AI Agents
In packages/metaschema-modules, bump the version from 0.44.1 to 0.44.2 in package.json (line 3) and metaschema-modules.control (default_version), and regenerate sql/metaschema-modules--0.44.2.sql plus its .bundle.tar.gz from deploy/ + pgpm.plan, leaving the released 0.44.1 artifact untouched so consumers who installed v0.44.1 keep a stable, byte-reproducible artifact.
Summary
Pre-launch we don't carry incremental schema changes, so the
add_record_errorALTER TABLE change from #126 is folded into the table definition:events_module/table.sql:record_error text NOT NULL DEFAULT ''sits next torecord_event.deploy|revert|verify/.../events_module/alterations/add_record_error.sqland itspgpm.planline are removed.sql/metaschema-modules--0.44.1.{sql,bundle.tar.gz}repackaged.Companion PR in constructive-db updates the vendored copy and the
insert_events_moduletrigger'srequires:.Link to Devin session: https://app.devin.ai/sessions/3c6cf9b1ca924b54954c60c1e77b1b07
Open in Devin Desktop: https://app.devin.ai/desktop/session/3c6cf9b1ca924b54954c60c1e77b1b07?variant=devin
Requested by: @pyramation