Skip to content

writ verify reads as "check my deployment" but checks document signatures #782

Closed

Description

@David-Noble-at-work

Epic: #740 — one output convention, every app.
Cross-reference: #762, the writ lifecycle surface and vocabulary settlement, which owns the
deploy / reconcile / upgrade / decommission naming this sits beside.

What the command does

writ verify verifies the publisher signatures of graph and trace documents:

Verify the publisher signatures of graph and trace documents.

Usage:
  writ verify <document>... [flags]

Examples:
  writ verify ~/.local/state/devlore/graphs/*.yaml
  writ verify --signing-policy=reject_external ~/Downloads/shared-plan.yaml

What the name suggests

In writ --help it sits in one flat list beside the lifecycle commands:

  decommission Remove deployed files and clean up resources for specified projects
  deploy       Deploy projects by creating symlinks in the target location
  reconcile    Report deployed state: what should be present, from where, and what's missing or different
  upgrade      Regenerate copied files (templates, secrets) from current sources
  verify       Verify the publisher signatures of graph and trace documents

Every other command there acts on the deployment. verify acts on documents. Nothing in the
name or its position says so, and "verify" is the word a reader reaches for when they want to check
their environment before applying anything — which is reconcile.

This is not hypothetical. Working through a writ setup, I read this list, chose verify as the
look-before-you-leap step ahead of deploy, and was wrong. The mistake costs nothing when the
command merely reports, but the reader who makes it has also not run the check they wanted, and
proceeds believing they have.

Why this is a suite question, not a writ one

The command is writ's, but the rule it wants is not. --help presents one flat list of verbs, and a
reader infers a shared subject from shared context. Any app in the suite can put a command in that
list whose subject differs from its neighbours', and nothing in the convention currently stops it or
requires the short description to say so.

Two shapes of ruling, and this issue does not choose between them:

  1. A rule about descriptions. The short description in the command list must name its subject, so
    the list is readable without opening each command. Here: "Verify signatures on graph and trace
    documents" rather than a verb whose object is inferred from its neighbours. This costs no rename
    and would have prevented the mistake above.
  2. A rule about names. A command whose subject differs from the lifecycle set says so in the
    name, either by compounding (verify-signatures) or by taking a noun the way writ secret and
    writ repo already do (writ signature verify, writ document verify).

There is a precedent for the second in #762: reconcile was renamed to status at phase-8 step 47
because "'Reconcile' promises mutation the command does not perform", then reverted when that
reasoning stopped holding. A name that promises the wrong subject is the same class of defect as
one that promises the wrong effect.

Whether verify survives as an alias is part of the ruling, not assumed here.

Out of scope

The behaviour. The signing-policy ladder, the trust list, and the exit-status semantics are correct
and are not in question — only what the command is called, and how the --help list reads.

Plan and design documents

Kind Document
Plan docs/plans/feature/782-writ-workflow-verify.md
Design Command Line Interface — One Convention, Every App
Design Graph and Trace Integrity § Verification
Design Graph and Trace Integrity § Tier 2: Signature
Design Audit, Reconciliation, and Recovery

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions