Skip to content

reconcile repairs by running the named operation on the drifted subset: report and repair in one run, --dry-run for the report alone #924

Open

Description

@David-Noble-at-work

The writ lifecycle surface

The ruling, 2026-09-23

Reconcile restores the system to the record (#913).
Its value is the answer to "what changed, and who moved it" -- the one thing deploy and upgrade cannot say,
because both push the checkout at the system and compare nothing. Repair is not a third mechanism: the record holds
digests, not bytes, so repairing is deploy's or upgrade's mechanism applied to exactly the entries the report
named, and nothing else.

Report and repair in one run; --dry-run for the report alone. No new flag: --dry-run is the global every
writ command already carries, and #762 rules that reconcile takes no command flags.

Finding (#923) What repair does
absent re-deploys the entry: re-link or re-copy from the record's source
changed re-renders the entry from its source (the source is unchanged, so the result matches the record)
dangling reported, left, deploy named: the record itself is out of date, and only deploy makes a new one
stale reported, left, upgrade named: re-rendering would produce new content and so update the record, which is upgrade by definition

Reconcile never updates the record. No reverse sync into the source repositories: through a link a local edit is
already in the checkout and git is the undo; a rendered copy cannot give back its template, and an edited secret
would be re-encrypted from a plaintext someone changed by accident. writ adopt remains the one honest capture of
a file the checkout does not know.

Evidence of completion

Plan and design documents

Kind Document
Plan docs/plans/task/924-reconcile-repair.md
Design docs/architecture/5.1-reconciliation.md
Design 10-command-line-interface.md §3.1

Revised 2026-09-28: repair against the ref (#847)

Replanned under the kept-snapshots design: reconcile repairs against the ref that produced each entry. A plain run restores absent and dangling from the ref; retains every edited entry on retain/<host>/<date>, a branch cut from the pinned commit in the layer's clone; archives a changed occupant to the recovery site; and restores those two only by a command flag (the no-command-flags ruling broken for this, knowingly). The narration carries the choice: retain, toss, and optionally a pull request to the branch of origin or elsewhere. The maintainer owns every merge: writ never pushes. The words and exit code are #972's (lane 18), which this lane now waits on. The 2026-09-23 table above is superseded where it differs.

Activity

  1. David-Noble-at-work commented on Sep 26, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruled 2026-09-26 (lane 5, PR B′)

    1. The exit status of a restoring run is the state at exit. 0 when every entry is linked or copied once the
      run returns; 1 when dangling or stale remain or a restore failed; 66 when never deployed. Drift found and
      restored is in the report, not the code. Under --dry-run the code is writ status fails on a store that has never been written; a fresh install cannot run it #756's: 1 on any drift.
    2. The restoring mechanism is shared. Upgrade's scope-graph builder and runner move into the deploy package
      beside PlanFileChain, and upgrade and reconcile both call them: repair is deploy's mechanism, one copy.

    Plan: docs/plans/task/924-reconcile-repair.md on feature/924-reconcile-repair.

  2. David-Noble-at-work commented on Sep 27, 2026

    @David-Noble-at-work
    ContributorAuthor

    Stopped 2026-09-27, before any code

    Starting phase 2 found that absent and changed are decided from the target before the source is read, so a blind restore could re-create a dangling link or re-render moved content into the record. Asked about it, the owner ruled a design change: reconcile runs against the git ref that produced each entry, and a lifetime keeps its snapshots. Rulings and consequences are on #847 and in 847-kept-snapshots.md.

    For this lane: its open question 3 (the restore precondition) is superseded, since a restore read from the ref always reproduces the record; the "no reverse sync" reason lapses for links, which retain branches now carry back; restore becomes a command flag; the exit status and the words move with #847's open ruling on them. This lane resumes after the replan of #916. The plan, updated: docs/plans/task/924-reconcile-repair.md on feature/924-reconcile-repair.

  3. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rule it breaks:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions