Skip to content

fix(demo): reset unit dollar quoting, plus deploy follow-ups - #13

Merged
darkstardevx merged 1 commit into
mainfrom
fix/demo-followups
Nov 20, 2026
Merged

darkstardevx merged 1 commit into
mainfrom
fix/demo-followups

Conversation

@darkstardevx

Copy link
Copy Markdown
Contributor

Follow-ups from deploying the live demo (#12) on blackbox. The demo is live; this fixes what the first deploy turned up.

  • Nightly reset was broken. systemd unescapes $$ → $ in ExecStart, so Postgres received DO $ BEGIN … (syntax error). The SQL dollar quotes are now $$$$. Verified live: items, todos and accounts wiped; ids restart at 1.
  • New CI check (demo/tools/check-reset.py, in the demo units job): runs the unit's SQL exactly as systemd would ($$→$, quote-aware split, no shell expansion) against a throwaway Postgres, before and after the tables exist. Confirmed it fails on the old unit with the same error seen live.
  • Smoke WebSocket check now uses --http1.1. Over https curl negotiates HTTP/2, where WebSockets don't use Upgrade headers, so the check failed against the public hostname even though WebSockets work (verified: 101 Switching Protocols and an echoed frame through the tunnel).
  • demo/README troubleshooting: the rootless network namespace losing its default route after a network change (cause of the tunnel's DNS timeouts on first deploy), the /metrics route order, app restarts.

Verified locally: check-reset.py passes (and fails on the old unit), shellcheck, YAML, and all realtime smoke checks pass against https://live-demo.cybercoretech.net.

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Found while deploying the live demo on blackbox:

- novastack-demo-reset.service: systemd unescapes $$ to $, so Postgres
  got `DO $ BEGIN` (syntax error) and the nightly reset failed. The SQL
  dollar quotes are now written $$$$. Verified live: items, todos and
  accounts wiped, ids restart at 1.
- demo/tools/check-reset.py + CI step: runs the unit's ExecStart SQL
  the way systemd does ($$ -> $, quote-aware split, no shell expansion)
  against a throwaway Postgres, before and after the tables exist. It
  fails on the old unit with the same error seen live.
- docker-smoke.sh: the WebSocket check forces --http1.1. Over https,
  curl negotiates HTTP/2, where WebSockets don't use Upgrade headers,
  so the check failed against the public hostname though WebSockets
  work (101 and an echoed frame through the tunnel).
- demo/README: troubleshooting for a rootless netns left without a
  default route after a network change (the cause of the tunnel's DNS
  timeouts on first deploy), the /metrics route order, app restarts.

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@darkstardevx
darkstardevx merged commit e043872 into main Nov 20, 2026
18 checks passed
@darkstardevx
darkstardevx deleted the fix/demo-followups branch November 20, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant