Skip to content

installer: agent_chat base-schema apply hard-aborts on prod hosts without PG superuser (second abort path alongside #573) #577

Description

@NOVA-Openclaw

Summary

SE run #633 step 11, canary 4/4 (NOVA self-deploy @ a95a868, PR #572): the installer hard-aborted at "Applying agent_chat base schema" (exit 1), skipping all remaining cognition install steps — same consequence class as #573, but a different abort path.

Root cause

Impact

Errors were also swallowed

The apply runs with >/dev/null 2>&1, so the log shows only "❌ Base schema apply failed" with no SQLSTATE/detail. Diagnosis required manual reproduction.

Suggested fix directions

  1. Detect "schema already at target state" (e.g. function signature + owner check) and skip the apply gracefully instead of exiting 1.
  2. When apply is genuinely needed but privileges are missing, warn + continue (or defer to a superuser-run path) instead of hard-aborting the whole installer — shared fix territory with installer: #569 refusal guard hard-aborts remaining cognition install steps on production per-agent runs #573.
  3. Stop discarding psql stderr — capture last N lines into the install log on failure.

Evidence

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions