Skip to content

Non-interactive stash init reports false success (skew, EQL-missing, skills) #714

Description

@coderdan

Summary

Non-interactive stash init reports success for setups that haven't fully completed, so CI/agents can't trust its exit code or its summary. Three honesty gaps:

  1. Version skew is warn-and-proceed. A non-interactive run can't reconcile a behind skew (an installed @cipherstash/* older than this CLI expects) — it won't mutate an install without consent — so it warns and keeps going, scaffolding config/client against mismatched packages, then prints "Setup complete".
  2. "Setup complete" is unconditional. Even when EQL install failed (eqlInstalled=false), the header still says complete — and "✓ Database connection verified" is printed although init only resolves a URL, never connects.
  3. "Skills loaded" is unconditional. The Claude/Codex handoff launch prompt points the agent at the skills dir even when installSkills() copied nothing (stripped build) — telling it to read files that aren't there.

Expected

Non-interactive init should be trustworthy for CI/agents:

  • A behind skew that can't be safely reconciled should fail with a non-zero exit and the exact align command, not proceed. (ahead skew can stay a warning.)
  • The summary should say "Setup incomplete" and exit non-zero when EQL is required but missing; wording should reflect what actually happened ("Database URL resolved", client scaffolded only when written).
  • The skills clause should be conditional on skills actually being installed.

Prisma Next is exempt from the EQL gate — it installs EQL via prisma-next migration apply, so eqlInstalled=false is expected there.

Resolution

Fixed in #687 — fail on unreconcilable skew (non-zero exit, no mutation), honest completion summary gated on eqlInstalled, and a conditional skills clause in the handoff prompt.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions