Skip to content

bug: agent-install.sh fails entirely on staging when postgres.json is missing — should still install libs and hooks #180

@NOVA-Openclaw

Description

@NOVA-Openclaw

Problem

agent-install.sh exits immediately when ~/.openclaw/postgres.json is missing:

ERROR: Config file not found: /home/nova-staging/.openclaw/postgres.json
Run shell-install.sh first or create ~/.openclaw/postgres.json

This prevents ALL installation steps from running — including shared libs (pg-env.ts, env-loader.sh, etc.), hooks, scripts, and entity-resolver. These components don't require a database connection to install.

Impact

On the staging environment (nova-staging), we had to manually copy:

  • ~/.openclaw/lib/pg-env.ts
  • ~/.openclaw/lib/pg-env.sh
  • ~/.openclaw/lib/pg_env.py
  • ~/.openclaw/lib/env-loader.sh
  • ~/.openclaw/lib/env_loader.py
  • ~/.openclaw/lib/entity-resolver/ (entire directory + node_modules)
  • All hook handler.ts files
  • All scripts

This defeats the purpose of having an installer.

Expected Behavior

The installer should:

  1. Install shared libs, hooks, scripts, and skills regardless of DB availability
  2. Skip DB-dependent steps (schema management, pgschema, bootstrap context setup) with a warning when postgres.json is missing
  3. Report which steps were skipped so the user knows what still needs to be done

Acceptance Criteria

  • agent-install.sh installs libs, hooks, scripts, and skills even without postgres.json
  • DB-dependent steps are skipped with clear warnings (not hard exit 1)
  • Staging environment can be set up by running the installer + providing config separately

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