Skip to content

docs(peat-cli): correct write-flag and wait-for-sync documentation#122

Merged
kitplummer merged 2 commits into
mainfrom
kp/peat-cli-doc-accuracy
Jun 2, 2026
Merged

docs(peat-cli): correct write-flag and wait-for-sync documentation#122
kitplummer merged 2 commits into
mainfrom
kp/peat-cli-doc-accuracy

Conversation

@kitplummer
Copy link
Copy Markdown
Collaborator

Summary

Documentation-accuracy pass on peat-cli, prompted by a QUICKSTART review. No behavior changes — prose and clap --help text only.

Correctness

  • --wait-for-sync was overstated as "blocks until at least one peer has acknowledged the write" in the QUICKSTART and in the create/update/delete --help text. It is a fixed-period approximation (POST_WRITE_SYNC_WAIT, writes.rs), not a delivery/durability guarantee. All four surfaces now say so, matching the README's existing honest framing.
  • README update synopsis was missing --no-validate — the command accepts it (flag parity with create, confirmed in update.rs).

QUICKSTART restructure (simplicity + completeness)

  • Lead with the mDNS two-process path (the simplest peer — no peer list, no container, no peat-node); demote compose / peat-node to clearly-marked alternatives.
  • Retitle Step 3 → "Create, update, and delete a document" so D/U are discoverable.
  • Document query --limit and observe --mode (including the latest-only-only caveat — other modes warn and fall back).
  • Hedge the time estimate (~5–10 min, path-dependent).

New "Beyond CRUD — extending the schema" section

Addresses the missing on-ramp from operator usage to development:

  • Distinguishes arbitrary-JSON collections (unvalidated) from schema-registered collections (validated, exit-4 on bad write) — a distinction enforced in code by collection name (writes.rs).
  • Points typed-collection authoring at the upstream peat/peat-schema crate, gated by the ecosystem invariants.
  • Disambiguates the two protocol surfaces so nobody edits proto/sidecar.proto expecting the CLI to pick it up (CLI = mesh node; sidecar.proto = co-located-app gRPC API).

Verification

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings ✅ (pre-commit hook)
  • cargo test -p peat-cli --lib ✅ 63 passed

Note

No tracking issue exists for this docs fix. Happy to open one and link it if repo policy requires it for this PR.

`--wait-for-sync` was documented (QUICKSTART prose + create/update/delete
clap help) as blocking until a peer acknowledged the write. It is a
fixed-period approximation (POST_WRITE_SYNC_WAIT), not a delivery or
durability guarantee. Align all four surfaces with that reality.

Also:
- README `update` synopsis was missing `--no-validate`, which the command
  accepts (flag parity with `create`).
- QUICKSTART: lead with the mDNS two-process path (simplest peer), demote
  compose/peat-node to alternatives; retitle Step 3 to cover update +
  delete; document `query --limit` and `observe --mode` (incl. the
  latest-only-only caveat); add a "Beyond CRUD" section distinguishing
  arbitrary-JSON from schema-registered collections and pointing typed
  authoring at peat/peat-schema.
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peat QA Review (SHA: d51d57f)

No findings.

@kitplummer kitplummer merged commit 3e41696 into main Jun 2, 2026
13 checks passed
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