Skip to content

Rust module: older ck-mc on a v53+ store fails note inserts/deletes — is binary rollback supported? #540

Description

@iceteaSA

Problem. Store migration v53 moved note-ownership checks into triggers that read a singleton, mc_privilege_state.note_caller_project. A ck-mc binary older than v53 opens a v53+ store as store-ahead and continues, by design. It never fills that row, so ctx_note inserts and deletes on module-owned notes abort with note ownership insert is outside the caller project. Content and status updates still pass. The only signal is a startup warn line. We found this when the rollback binaries we had kept all turned out to predate v53.

Evidence (master 564687284):

  • crates/mc-store/src/lib.rs:2575-2600: the v53 singleton and ownership triggers. The comment says McStore::open "intentionally logs and accepts a store-ahead outcome for rollback binaries".
  • crates/mc-store/src/lib.rs:7798-7808: a store-ahead open logs "older binary on a newer store; continuing without migrating" and proceeds. The comment says older ck-mc binaries stay placeable on purpose.
  • crates/mc-store/src/lib.rs:24454-24457 (test): "ownership-sensitive note writes fail closed. This known rollback limitation is why v53 requires a coordinated module bounce."

Question. Is running an older ck-mc on a newer store a supported rollback?

  • If yes, the pre-v53 write path or the v53 triggers need a fix, so that note writes keep working.
  • If no, or not across v53, McStore::open could refuse, or fail loudly, when the migrations it is missing carry invariants the old binary can't keep. Today it warns and continues, and the first sign is a note write failing later. A stated minimum rollback version would also do.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions