Skip to content

tweaks/shelf-merged-review-recovery (TW-3eo3s2) - #30

Merged
thegrubbsian merged 11 commits into
mainfrom
tiller/tweaks/shelf-merged-review-recovery
Nov 19, 2026
Merged

thegrubbsian merged 11 commits into
mainfrom
tiller/tweaks/shelf-merged-review-recovery

Conversation

@thegrubbsian

Copy link
Copy Markdown
Member

Extends merged-review recovery to bugs, chores, and tweaks, so a shelf node whose fix merged before any submission was recorded can be closed with an audit trail (TW-3eo3s2).

Change

tiller submit <bug|chore|tweak> <node> [--pr <n>] --recover-merged \
  --head <reviewed-oid> --merge-commit <result-oid> --reason "<text>"

It follows feature and epic recovery: same flags, run from the integration checkout, same committed-inputs and Git evidence checks, --pr required when a remote exists. It accepts a node in ready, in_progress, check, or in_review, and refuses a proposed, done, cancelled, or carried node. One PR can be recovered against several nodes, one command each.

  • Recovery writes recovered_review and the PR on the node plus one recover_review.<noun> event. It moves no status and approves no gate; the result lists missing_gates.
  • After the delta is committed, ordinary tiller sync crosses the node to done with done_basis: recovered. Missing required gates are recorded as policy violations at the crossing. A contained fast-forward still waits for tiller sync --accept-fast-forward <node>.
  • status, show, list and node JSON, the readout, and tiller next (new kind sync_recovered) show the recovered review.
  • An identical retry writes nothing. A different PR or witness refuses recovery_identity_changed. Ordinary submit on a recovered node refuses recovery_already_recorded.
  • Two guards beyond the contract: recovery refuses when the reviewed head lacks the node's submitted head or its retained branch tip.
  • submit task --recover-merged still refuses.

Schema and generation

  • Schema 15 to 16, a stamp-only migration, in its own commit (88b0890). docs/spec/distribution.md requires a migration for an additive field. The feature commit passes on schema 15 without it, so the stamp can be dropped if it should be batched instead.
  • Orientation generation 62 to 63: the orientation authorization sentence and the execute skill now name shelf nodes. Managed projects need tiller upgrade --project-only after release, and this repo's own .tiller/ needs it before a binary built from this branch will run here.

Not in this PR

  • The console is untouched. A recovered shelf node's page shows the existing recovered-review panel with an empty riders list and a blank branch, and Home's Recovered reviews tab still lists only features and epics.
  • The sync warning in TW-xfjsgw (PR tweaks/sync-silent-on-unstarted-shelf-merge (TW-xfjsgw) #29) names tiller status as its next step. Once both merge, it should name this command. Both PRs touch sync.go and the command docs, so the second to merge needs main merged in first.

This PR also carries two .tiller/-only commits from main that are not yet pushed: the capture and approval of TW-taq0ps, TW-3eo3s2, and TW-xfjsgw.

Merge with a merge commit, not a squash, so tiller sync can record the tweak done.

Verification

  • New store, mutate, and CLI tests cover the status matrix, refusals, retry identity, several nodes on one PR, the sync crossing and its violations, the fast-forward assertion, and the 15 to 16 migration.
  • tiller check tweak green: build, tests, lint.
  • The Headway scenario (seven approved bugs, one merged PR, nothing recorded) was reproduced on a scratch project. The real Headway bugs have not been recovered yet.

Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
A bug, chore, or tweak whose fix merged before any submission was recorded
could not be closed: sync observes a shelf node only once it is in review,
and ordinary submit runs on a branch that has already merged.

submit <bug|chore|tweak> --recover-merged now records that merged review
with the flags, authorization, integration checkout, and Git evidence checks
feature and epic recovery use. The node may be ready, in_progress, check, or
in_review; a proposed or terminal node and a node with a live carrier
refuse. One merge may be recorded against several nodes, one command each.

Recovery writes the record and one audit event, moves no status, and
approves no gate. Ordinary sync then crosses each node to done with basis
recovered and records every required gate without a pass as a policy
violation. Until it crosses, the node leaves the work queues, tiller next
offers the sync, and status, show, and list carry the recovered review.

Orientation moves to generation 63: the authorization rule and the execute
skill name a shelf node's review beside an aggregate's.

Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
Shelf nodes gain the optional recovered_review record and the recovered
done basis. Both are additive, and an additive field needs a stamp: an older
binary that rewrote a recovered bug, chore, or tweak would drop the record
it does not know, and sync would never cross the node.

The 15-to-16 migration is stamp-only. It moves no file and preserves work,
events, and active reviews.

Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
A recovered shelf review whose result is a contained head with no merge
witness crosses only on the human's fast-forward assertion. Its basis is
recovered like any other recovered crossing, so sync printed it among the
observed crossings.

The crossing now carries its evidence (ancestry, content, or
human_attested) in the result and in sync's JSON, and human output lists a
human_attested one under the assertion block.

Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
The warning's closing line names tiller submit --recover-merged, and a node that already holds a recovered review is no longer reported, since its merge is on record and the next sync crosses it.

Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
Signed-off-by: JC Grubbs <grubbs.jc@gmail.com>
@thegrubbsian

Copy link
Copy Markdown
Member Author

Merged main after PR #29 landed. The unrecorded-merge warning now names tiller submit <bug|chore|tweak> <node> --recover-merged in its closing line, and a node that already holds a recovered review is no longer reported. Gates rerun green on the merged branch.

@thegrubbsian
thegrubbsian merged commit 78988e0 into main Nov 19, 2026
6 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