Skip to content

docs(readme): lead the existing-database install with the stash CLI - #440

Closed
coderdan wants to merge 1 commit into
mainfrom
docs/readme-install-via-cli
Closed

docs(readme): lead the existing-database install with the stash CLI#440
coderdan wants to merge 1 commit into
mainfrom
docs/readme-install-via-cli

Conversation

@coderdan

@coderdan coderdan commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

The README's only instruction for installing EQL (the SQL library that becomes the eql_v3 schema) into an existing database was: download the release SQL, run psql -f. That path has a real failure mode we hit live — the bundle is ~6,000 statements and psql -f sends one per protocol round trip, so over a pooled connection or under a platform command-time ceiling (managed AI platforms kill commands at a fixed limit) the install dies partway and leaves a half-installed schema. This makes npx stash eql install the primary instruction and demotes the raw-SQL path to a collapsible alternative with a warning.

Changes

  • "Install into an existing database" now leads with npx stash eql install: connects via DATABASE_URL or --database-url (one-shot), preflights role capability (stash eql preflight), installs as a non-superuser, prints skipped optional superuser-gated statements instead of failing. Points at stash eql migration --supabase|--drizzle for migration-tool platforms.
  • Raw-SQL instructions kept verbatim inside a <details> block, plus a warning: the per-statement round-trip hazard, and the mitigations (direct non-pooled connection, or statement-boundary chunking applied one chunk per command).

Verification

Docs-only. The hazard is from a live run: applying the 3.0.4 bundle with psql -f over a pooled connection timed out at a managed platform's 600-second ceiling mid-bundle and half-installed the schema; recovery was 27 statement-boundary chunks applied one psql -c each (full record in cipherstash/skilltester branch 20260819-01-lovable, apps/lovable-cloud/.cipherstash/bug-eql-bundle-psql-timeout.md). CLI flag claims verified against the published stash@1.1.0 (shared --database-url flag on every db/eql command; one-shot semantics). Commit signed.

Related

Refs cipherstash/stack#665. Companion skill update: cipherstash/stack#929.

https://claude.ai/code/session_013d6Ni8tR7FfxPos9TdEuDs

Summary by CodeRabbit

  • Documentation
    • Updated installation guidance to recommend the stash CLI.
    • Added details on database URL handling, capability checks, non-superuser installations, and migration generation.
    • Documented skipped superuser-only statements and retained raw SQL installation as an alternative.
    • Added a warning about potential psql timeouts and partial installations on pooled or high-latency connections.

The README's only install path for an existing database was downloading the
release SQL and replaying it with psql -f. That works on a direct connection,
but the bundle is ~6,000 statements and psql -f sends one per protocol round
trip — over a pooled connection or under a platform command-time ceiling the
install dies partway and leaves a half-installed schema (observed live on a
managed AI platform: statements timed out at the platform's 600s limit
mid-bundle). The CLI path also preflights role capability and prints skipped
optional statements instead of failing on them.

stash eql install is now the primary instruction; the raw-SQL path stays as a
collapsible alternative with a warning describing the round-trip hazard and
the direct-connection / chunking mitigations.

Refs cipherstash/stack#665.
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 17f7a552-e0c6-4bd8-a2d4-ac7a9fac9696

📥 Commits

Reviewing files that changed from the base of the PR and between 91ebf28 and 4ef5644.

📒 Files selected for processing (1)
  • README.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

README.md now recommends the stash CLI for installation, documents connection and capability behavior, retains raw SQL as an alternative, and warns that direct psql execution can time out and leave a partial schema.

Changes

Installation documentation

Layer / File(s) Summary
Installation commands and connection guidance
README.md
The README documents stash eql install, capability checks, non-superuser behavior, skipped optional statements, migration generation, and direct psql installation limitations.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 4ef56

This documentation-only change updates the recommended installation path and preserves the existing raw-SQL instructions; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: tobyhede

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the README documentation change and the primary shift to using the stash CLI for existing-database installation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/readme-install-via-cli

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderdan

Copy link
Copy Markdown
Contributor Author

Closing unmerged: the EQL source moved into the cipherstash/stack monorepo (packages/eql/) before this landed, so this branch can no longer merge here.

Ported verbatim to cipherstash/stack#936 — same README change, same wording, applied to packages/eql/README.md.

@coderdan coderdan closed this Aug 21, 2026
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