Registry: a stored list skips values this build doesn't know #329

Merged
jcoffey-dev merged 1 commits from fix/skip-unknown-enum-ids into main 2026-11-09 06:11:18 +00:00
Owner

A stored object's permission list, event list or enum-keyed map failed to load whole when it held a value the running build didn't know. Since the relay work, main grants permissions 690–695 to the stored administrator roles. So a 2026.x build, which knows ids up to 689, would fail to load those roles after a rollback. Mail is unaffected and the recovery admin still works.

Pickle::unpickle_item reads one list or map item: Some(None) is a value this build doesn't know, which is read past and left out, and None is still a damaged stream. Map<T> and VecMap keys use it. Enums and trc::Key override it.

This is SL-9 of docs/spec/features/store-layout.md. A cherry-pick to release/2026 follows, so a rollback from 27.1 to 2026.x keeps its roles. It rides the next 2026.x security release.

Tested locally: the new unit test fails on main and passes here; registry tests, fmt, fork checks, cargo build -p inbuxa and cargo test --workspace --no-run.

A stored object's permission list, event list or enum-keyed map failed to load whole when it held a value the running build didn't know. Since the relay work, main grants permissions 690–695 to the stored administrator roles. So a 2026.x build, which knows ids up to 689, would fail to load those roles after a rollback. Mail is unaffected and the recovery admin still works. `Pickle::unpickle_item` reads one list or map item: `Some(None)` is a value this build doesn't know, which is read past and left out, and `None` is still a damaged stream. `Map<T>` and `VecMap` keys use it. Enums and `trc::Key` override it. This is SL-9 of `docs/spec/features/store-layout.md`. A cherry-pick to release/2026 follows, so a rollback from 27.1 to 2026.x keeps its roles. It rides the next 2026.x security release. Tested locally: the new unit test fails on main and passes here; registry tests, fmt, fork checks, `cargo build -p inbuxa` and `cargo test --workspace --no-run`.
jcoffey-dev added 1 commit 2026-11-09 06:02:26 +00:00
Registry: a stored list skips values this build doesn't know
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 8m46s
c987a5a915
A stored object's permission list, event list or enum-keyed map failed
to load whole when it held a value the running build didn't know. A
newer release grants its new permissions to the administrator roles it
finds, so after an upgrade an older build could no longer read those
roles, and a rollback lost every administrator's permissions (the
recovery admin still worked).

Lists and enum-keyed maps now leave out a value they don't recognize,
read past it, and load the rest of the object. A damaged stream is
still refused. A role edited and saved on the older build keeps only
the permissions that build knows.

Test: a Permission list and an enum-keyed map holding an id from a
newer build failed to read on main; now the unknown entries are left
out, the known ones and the field after them read, and a list cut
short is still refused.
jcoffey-dev merged commit 1ac63bacae into main 2026-11-09 06:11:18 +00:00
jcoffey-dev deleted branch fix/skip-unknown-enum-ids 2026-11-09 06:11:18 +00:00
Sign in to join this conversation.