unoverse 0.1.84 → 0.1.85

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.
@@ -127,9 +127,33 @@
127
127
  register: migrate_result
128
128
  ignore_errors: yes
129
129
 
130
+ # THE WHOLE FILE IS NOT THE ANSWER TO "DID IT WORK". This printed every line of the
131
+ # baseline — several hundred lines of CREATE TABLE nobody asked to read, burying the one
132
+ # line that says whether anything ran. Keep the names and the verdict.
130
133
  - name: "[4/5] Migration output"
131
134
  debug:
132
- msg: "{{ migrate_result.stdout_lines | default(['No output']) }}"
135
+ msg: >-
136
+ {{ (migrate_result.stdout_lines | default([]) | select('match', '^> - ') | list)
137
+ + (migrate_result.stdout_lines | default([]) | select('search', 'Migrations complete|No migrations') | list)
138
+ | default(['No output'], true) }}
139
+
140
+ # SERVICES BOOTED BEFORE THIS SCHEMA EXISTED. install.yml has to start the containers
141
+ # first — migrations run THROUGH the unoverse container, so there is nothing to run them
142
+ # in until it is up. The cost is that every service that touches the database at boot
143
+ # does so against an empty one: memory logged "permission denied for schema public" and
144
+ # then 'relation "memories" does not exist', and stayed in that state until something
145
+ # restarted it. Restarting here is the missing half of that ordering, and it only ever
146
+ # happens on a first setup.
147
+ - name: "[4b/5] Restart services against the migrated schema"
148
+ command: docker compose restart
149
+ args:
150
+ chdir: /opt/gravity
151
+ when: migrate_result.rc | default(1) == 0
152
+
153
+ - name: "[4b/5] Settle"
154
+ pause:
155
+ seconds: 15
156
+ when: migrate_result.rc | default(1) == 0
133
157
 
134
158
  - name: "[5/5] Verify database connectivity"
135
159
  uri:
@@ -134,36 +134,38 @@
134
134
  register: api_write_check
135
135
  ignore_errors: yes
136
136
 
137
- - name: "[10/14] Check unoverse node catalog loaded"
137
+ # AN EMPTY CATALOGUE IS NOT A BROKEN ONE. Nodes arrive as rows — installed from the
138
+ # marketplace or published from Studio — so a universe on its first day has none, and
139
+ # that is the correct state, not a fault. This used to fail outright on zero and advise
140
+ # "run deploy.sh rebuild", a command that does not exist, which turned every first
141
+ # deploy into a red line pointing at nothing.
142
+ #
143
+ # What IS worth failing on is the runtime not answering at all: that means the catalogue
144
+ # could not be read, which is a different fact from it being empty.
145
+ - name: "[10/13] Check the node catalogue is readable"
138
146
  shell: |
139
147
  cd /opt/gravity
140
148
  # The internal :4106 runtime is Docker-network-only (never published), and the
141
149
  # public :4105 routes are JWT-gated — so read the catalog from INSIDE the
142
150
  # container. node:20-slim has no curl; use node fetch.
143
151
  NODE_COUNT=$(docker compose exec -T unoverse node -e \
144
- "fetch('http://127.0.0.1:4106/nodes').then(r=>r.json()).then(d=>console.log((d.nodes||[]).length)).catch(()=>console.log(0))" 2>/dev/null | tr -d ' \r')
152
+ "fetch('http://127.0.0.1:4106/nodes').then(r=>r.json()).then(d=>console.log((d.nodes||[]).length)).catch(()=>console.log('unreachable'))" 2>/dev/null | tr -d ' \r')
153
+ if [ "$NODE_COUNT" = "unreachable" ]; then
154
+ echo "nodes=unreachable"
155
+ echo "The runtime did not answer on :4106 — the catalogue could not be read"
156
+ exit 1
157
+ fi
145
158
  echo "nodes=${NODE_COUNT}"
146
159
  if [ "${NODE_COUNT:-0}" -eq 0 ] 2>/dev/null; then
147
- echo "WARNING: No nodes loaded run deploy.sh rebuild or unoverse update"
148
- exit 1
160
+ echo "(none installed yetinstall from the marketplace or publish from Studio)"
149
161
  fi
150
162
  register: plugin_check
151
163
  ignore_errors: yes
152
164
 
153
- - name: "[11/14] Check packages directory mounted"
154
- shell: |
155
- cd /opt/gravity
156
- if docker compose exec -T unoverse ls /app/host_packages 2>/dev/null | head -5; then
157
- PKG_COUNT=$(docker compose exec -T unoverse ls /app/host_packages 2>/dev/null | wc -l | tr -d ' ')
158
- echo "packages_mounted=${PKG_COUNT}"
159
- [ "$PKG_COUNT" -gt 0 ]
160
- else
161
- echo "packages_mounted=0"
162
- echo "WARNING: No packages directory — run deploy.sh or unoverse update"
163
- exit 1
164
- fi
165
- register: packages_check
166
- ignore_errors: yes
165
+ # NO PACKAGES CHECK. It looked for /app/host_packages, a bind mount that was retired
166
+ # when nodes moved to npm at runtime plus the marketplace. Nothing declares
167
+ # PACKAGES_PATH any more and docker-compose.yml has no such volume, so the check could
168
+ # only ever report 0 and tell the operator to run a command that would not fix it.
167
169
 
168
170
  - name: "[12/14] Check for errors in service logs"
169
171
  shell: |
@@ -245,11 +247,9 @@
245
247
  ── Prompt Blocks (internal :4106) ──
246
248
  {{ prompt_blocks_check.stdout_lines[0] | default('(skipped)') }}
247
249
 
248
- ── Plugins & Packages ──
249
- Unoverse: {{ plugin_check.stdout_lines[0] | default('(skipped)') }}
250
+ ── Node catalogue ──
251
+ {{ plugin_check.stdout_lines[0] | default('(skipped)') }}
250
252
  {{ plugin_check.stdout_lines[1] | default('') }}
251
- Packages: {{ packages_check.stdout_lines[0] | default('(skipped)') }}
252
- {{ packages_check.stdout_lines[1] | default('') }}
253
253
 
254
254
  ── Recent Errors in Logs ──
255
255
  {{ log_errors.stdout | default('(skipped)') }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.84",
3
+ "version": "0.1.85",
4
4
  "description": "The Unoverse front door — create a Studio project, a universe, or a client app, and launch Studio.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "type": "module",