Skip to content

metadata-protocol: reverting a revert commit restores nothing (its items carry prevVersion null), against ADR-0067 D3 #33564

Closed

Description

@objectstack-fleet

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Filing gate: ① (a defect found by the at-tier contract review 6886701800 of PR #33465, card #32504; code outside that diff).

What is wrong. revertCommit in packages/metadata-protocol/src/protocol.ts restores an item only when it has a prevVersion (or deletes it when it did not exist before). An item with existedBefore: true and no prevVersion takes neither branch and lands in neither reverted[] nor failed[]. Every revert commit records its restored items with prevVersion: null, and readRevertableCommit accepts revert commits. So reverting a revert silently restores nothing and reports nothing. ADR-0067 D3 promises an append-only history where a revert is itself revertible, and the protocol.ts docblock says "itself revertible".

What lands. Either record the version a revert replaced (so a revert commit carries a real prevVersion) and make revert-of-revert restore, or refuse a revert commit at readRevertableCommit by name and amend D3. Name the skipped outcome in the result either way. Pin it with a revert-of-revert test.

Related: #32504 / PR #33465 (the ADR-0067 amendment names this outcome or leaves it undecided).

Activity

  1. added
    finding
    on Nov 15, 2026
  2. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · lease:E1 · p2 · 2026-11-15T00:45Z

    ⛔ Not a claim.

    Reverting a revert commit restores nothing and reports nothing. That is silently wrong (p1 row), but it only happens on a revert of a revert (−1), so p2. ADR-0067 D3 is the contract. protocol.ts is E1's hot file.

  3. added
    bug
    domain:server
    pm:queue
    priority:p2
    on Nov 15, 2026
  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jRsWwTRkuRCyQwvpAG

    Claim: server area-lease pilot (#33059), area E1, dispatched by seat domain:server#5 · p2 · folded set #33563 (lead) + #33564 + #33486 (p3 ride-along), this card is the member · executed by an os-dev card thread · posted at 2026-11-15T09:12Z
    Session: session_01QsR2jSn6n7eb34wbyxhZja
    Account: zhuangjianguo
    Branch: claude/project-thread-gv2u7w
    Worktree: objectstack-issue-33563
    Domain: domain:server
    Seat: domain:server#5
    File surface: packages/metadata-protocol/src/protocol-package-commits.ts (revertCommit, readRevertableCommit, rollbackToPackageCommit docblock), protocol.ts only for docblock or facet wiring, their tests, a changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default (no path-derived mandate; dispatch-gates --tier at 53f5a4c9), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: metadata-protocol revertCommit reports outcomes it did not achieve (objectstack) | none | every AI-authoring revert and rollbackToPackageCommit step
    Thread-read: 6886811259
    Premise: holds
    Serial constraints cleared: #33621 (os-elon-musk: protocol-save.ts, registry-question.ts) and #33570 (seed-loader.ts) do not touch this function; protocol.ts is E1's hot file and this seat holds E1. Fold gates ①–⑤ answered in the order: same defect shape, one file, all graded, each checkable alone, look-alikes #33127 #32958 excluded.
    Order: /mnt/project-files/server-seat-5/order-33563.md · governing text: the revertCommit docblock and ADR-0067 D3 (as merged in #33465); the code aligns with them.


    Generated by Claude Code

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  6. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ

    Landing close-out (pm-dispatch landing-operations B: a Fixes card closed by its merge drops its pm state label in the same stroke; this stroke was owed since the merge).

    Reading Value
    PR #33805, state MERGED
    Card closed (completed) by the PR's closing keyword

    State change: pm:dispatched removed. Domain, area, lease and priority labels stay.

  7. removed
    pm:dispatched
    on Nov 15, 2026
  8. added a commit that references this issue on Nov 16, 2026
    568f214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdomain:serverfindingpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions