Skip to content

merge_audit: find the drafts deletion across merge commits - #12

Closed
vbanas wants to merge 1 commit into
vsov:mainfrom
vbanas:fix-dissent-merge-history
Closed

vbanas wants to merge 1 commit into
vsov:mainfrom
vbanas:fix-dissent-merge-history

Conversation

@vbanas

@vbanas vbanas commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

_resolve_ref looked up the commit that deleted drafts/ with a path-filtered git log, which simplifies history: at a merge whose tree matches one parent for drafts/*, git follows that parent only. A bundle consolidated on a branch and merged with a merge commit into a line that never held drafts/ lost its deletion commit, so merge-audit, schism and release-check (acceptance.dissent: required) reported unreachable-ref / E_REL_DISSENT_UNVERIFIABLE over a tree identical to the green branch head. A re-extraction merged that way did not fail closed: it silently read the previous run's drafts.

  • The lookup adds --full-history, so every merged line is walked, and --date-order, so the first deletion listed is the newest even under clock skew: no commit is shown before its descendants. A merge is not itself listed as a deletion (no -m, so no diff).
  • reference-bundle.sh: two checks on copies of the green bundle, built with commit-tree so the working tree is never touched. The bundle merged into a line cut before drafts/ existed still passes release-check, and a re-extraction merged with a merge commit reads the second run's drafts. Both fail on the previous wheel.
  • USAGE-merge-audit.md: the manual lookup uses the same flags.

Fixes #10.

_resolve_ref looked up the commit that deleted drafts/ with a
path-filtered git log, which simplifies history: at a merge whose tree
matches one parent for drafts/*, git follows that parent only. A bundle
consolidated on a branch and merged with a merge commit into a line
that never held drafts/ lost its deletion commit, so merge-audit,
schism and release-check (acceptance.dissent: required) reported
unreachable-ref / E_REL_DISSENT_UNVERIFIABLE over a tree identical to
the green branch head. A re-extraction merged that way did not fail
closed: it silently read the previous run's drafts.

- The lookup adds --full-history, so every merged line is walked, and
  --date-order, so the first deletion listed is the newest even under
  clock skew: no commit is shown before its descendants. A merge is
  not itself listed as a deletion (no -m, so no diff).
- reference-bundle.sh: two checks on copies of the green bundle, built
  with commit-tree so the working tree is never touched. The bundle
  merged into a line cut before drafts/ existed still passes
  release-check, and a re-extraction merged with a merge commit reads
  the second run's drafts. Both fail on the previous wheel.
- USAGE-merge-audit.md: the manual lookup uses the same flags.

Fixes vsov#10.
vsov pushed a commit that referenced this pull request Nov 4, 2026
- merge_audit: the drafts-deletion lookup walks every merged line
  (--full-history --date-order), and lists a merge commit that itself
  deletes drafts/ (--diff-merges=first-parent --no-patch). Before, a
  merge commit could hide the deletion (unreachable-ref) or make the
  audit read the previous run's drafts.
- merge_audit: drafts are read as <commit>:./<draft>.md, so a bundle
  made with `okfy init --embed` reads them.
- release-check: under acceptance.dissent: required, any merge-group
  draft that cannot be read or parsed fails with
  E_REL_DISSENT_UNVERIFIABLE, naming the draft.
- smoke.sh: NEG embed; reference-bundle.sh: two merged-history checks.
- Retrieval and federation code digests unchanged.

Contributed by @vbanas in #12 and #14, with one
neighbouring case (a merge that deletes drafts/) added here.

Co-authored-by: vbanas <val.banas@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vsov

vsov commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks @vbanas — integrated by hand into the private source and published in 49a0c9d, with your commit authorship preserved (git am). Closing rather than merging because the public repo is an export.

One neighbouring case was added on top: a merge commit that itself deletes drafts/ (consolidation done while resolving the merge). It is never listed by --diff-filter=D, so the lookup fell back to an older deletion and read the previous run's drafts. The lookup now also passes --diff-merges=first-parent --no-patch. Unit tests cover all three merge shapes.

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.

release-check reports E_REL_DISSENT_UNVERIFIABLE (unreachable-ref) after the bundle's branch is merged with a merge commit

2 participants