unoverse 0.1.175 → 0.1.177
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -116,13 +116,22 @@
|
|
|
116
116
|
# (scripts/lib/db-setup.sh). The old programmatic `require('./dist/db')` table
|
|
117
117
|
# setup is retired: the engine no longer ships a dist, and .sql migrations under
|
|
118
118
|
# apps/unoverse/engine/migrations are the single source of truth.
|
|
119
|
+
# --no-check-order, and it is NOT optional here: a database from before the
|
|
120
|
+
# 2026-07-28 squash has 002-018 recorded in pgmigrations with no matching files
|
|
121
|
+
# (they live inside 001_baseline now), so the order check refuses EVERY new
|
|
122
|
+
# migration with "Not run migration 019_… is preceding already run migration 002_…".
|
|
123
|
+
# db-setup.sh has carried this flag since the squash; this playbook runs the same
|
|
124
|
+
# command and did not, so `unoverse db-setup` worked while `unoverse deploy db`
|
|
125
|
+
# failed on the same database. Ordering still holds by filename and an applied name
|
|
126
|
+
# is never re-run, so the check buys nothing a squashed history can satisfy.
|
|
119
127
|
- name: "[4/5] Apply database migrations (node-pg-migrate)"
|
|
120
128
|
shell: |
|
|
121
129
|
docker compose exec -T -e NODE_TLS_REJECT_UNAUTHORIZED=0 unoverse \
|
|
122
130
|
npx node-pg-migrate up \
|
|
123
131
|
--migrations-dir /app/apps/unoverse/engine/migrations \
|
|
124
132
|
--migration-file-language sql \
|
|
125
|
-
--no-lock
|
|
133
|
+
--no-lock \
|
|
134
|
+
--no-check-order
|
|
126
135
|
args:
|
|
127
136
|
chdir: /opt/gravity
|
|
128
137
|
register: migrate_result
|
package/operator/lib/check.sh
CHANGED
|
@@ -138,7 +138,29 @@ cmd_check() {
|
|
|
138
138
|
fail "Canvas ${DIM}http://localhost:3001 → $canvas_code${NC}"
|
|
139
139
|
fi
|
|
140
140
|
|
|
141
|
-
# 6.
|
|
141
|
+
# 6. NO PUBLISHED ITEM IS AN ORPHAN OF A RENAME.
|
|
142
|
+
#
|
|
143
|
+
# Publishing is a pure per-item upsert and the publisher cannot read this universe's
|
|
144
|
+
# rows, so a RENAME is invisible to it: the new name lands as a create and the old row is
|
|
145
|
+
# never touched. A caller picking the old name then gets an older vintage of the same UI,
|
|
146
|
+
# and nothing anywhere goes red. That is a property of THIS universe's data, which is why
|
|
147
|
+
# it is asked here and not in the release gate — a stale row on one box must never stop
|
|
148
|
+
# anybody shipping code (server/tests/items/orphaned-rows.check.ts carries the history).
|
|
149
|
+
if [ -d "$ROOT/apps/unoverse" ] && [ -d "$ROOT/node_modules" ]; then
|
|
150
|
+
total=$((total + 1))
|
|
151
|
+
if (cd "$ROOT/apps/unoverse" && npm run --silent check:universe >/dev/null 2>&1); then
|
|
152
|
+
ok "No orphaned item rows ${DIM}(every published item is still authored)${NC}"
|
|
153
|
+
pass=$((pass + 1))
|
|
154
|
+
else
|
|
155
|
+
fail "Orphaned item rows ${DIM}(a rename left a stale row behind)${NC}"
|
|
156
|
+
(cd "$ROOT/apps/unoverse" && npm run --silent check:universe 2>&1) | grep -E '^\s+better-|^\s+[a-z0-9-]+/' | while read -r o; do
|
|
157
|
+
[ -n "$o" ] && echo -e " ${DIM}$o${NC}"
|
|
158
|
+
done
|
|
159
|
+
info " Retire each row: ${BOLD}POST /marketplace/uninstall {kind, name}${NC} — deleting the folder does nothing"
|
|
160
|
+
fi
|
|
161
|
+
fi
|
|
162
|
+
|
|
163
|
+
# 7. NOTHING BILLING THAT TERRAFORM HAS LOST SIGHT OF.
|
|
142
164
|
#
|
|
143
165
|
# Terraform records what it creates as it creates it, so an interrupted apply does not
|
|
144
166
|
# duplicate anything — the next run continues from state. Two cases break that, and both
|
package/package.json
CHANGED