Repository navigation
Description
Bug
Nothing in BoardGraph keeps a board's Rules revision numbers unique. Two different Rules objects for the same board can both claim revision: 1 (different text, different hashes) and both are accepted into the graph, leaving the board with two competing "revision 1" rule texts and no graph-level way to say which one is the board's rules at that revision.
Evidence (verified this run, main @ e860d3a)
pkgs/id/src/boards.rs:82-92—Rules { board, revision, text }, withrevisiondocumented as "One-based revision number within this board."pkgs/id/src/boards.rs:326-329—validate_shapechecks onlyrevision > 0.pkgs/id/src/boards.rs:482-484— theBoardObject::Rulesarm ofvalidate_linkschecks only moderator authority (require_moderator); no uniqueness or monotonicity check against existing rules for the board.- Laptop probe
~/git/fleet/probe-2026-11-01-laneB-boards/(verbatimboards.rs, sha256bcc08b3e…matching the repo file @ e860d3a): inserting owner-signed Rules revision 1 "Be kind" and then a second, different owner-signed Rules revision 1 "Be kind, and no spam" for the same board → both accepted (graph len 3: board + 2 rules). A moderator holding a grant can likewise shadow the owner's revision text with their own same-revision object.
Why it matters
Threads pin rules by object hash (Thread.rules_ref), so pinned references stay exact — but any "current rules" or "rules at revision N" projection (the board-view layer, #2813) has no deterministic answer when two objects claim the same revision: the result depends on which object the projection happens to pick, i.e. on arrival/iteration order. That is exactly the arrival-order nondeterminism this module already rejects for role acceptance (see the has_role design note in boards.rs): peers holding the same signed set must reach the same verdict. Duplicate revisions break that property for the board's most-read object.
Acceptance criteria
- One of the following is implemented and documented in the module:
- (a)
BoardGraph::insertrejects aRulesobject whose(board, revision)is already claimed by a different object in the graph; or - (b) duplicate revisions are explicitly documented as legal, together with the deterministic rule projections must use to resolve them (and the resolution does not depend on arrival order).
- (a)
- A regression test pins the chosen behavior: a second distinct revision-1
Rulesobject for the same board is rejected (option a) or resolves deterministically regardless of insertion order (option b). - All existing boards tests still pass.
Activity
dezren39 commentedon Nov 1, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 2, 2026
🤖 Agent note · adopted as Phase 2 of design #4113 — open ruling decided
Rulesobjects are legal signed history — insert rejection (option (a)) is NOT the design. Reason, recorded on Design: one signed set, one meaning — BoardGraph's gates hold at insert, projection and replication (pkgs/id) #4113: Rules has no supersedes chain and plural authorised signers (owner + moderators viarequire_moderator), so first-arriver-wins rejection makes acceptance depend on arrival order — the property the module'shas_rolenote rejects — and a graph holding both would stall replication. Instead this phase documents the rule in the module and exposes one graph resolution helper: for a given revision the greater content hash wins (thelatest_listingssigned-fork tie-break); "current rules" is the highest revision resolved the same way; pinned by an insertion-order-independence test. Threads' hash-pinnedrules_refis unaffected. Note the contrast with id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109 (Phase 1): listings ARE rejected at insert because their single-author chain makes "first" structural.source/design-architect. Existing queued triage packet stands.45 remaining items
dezren39 commentedon Nov 4, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 4, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 4, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 4, 2026
🤖 Agent note · handed off