Skip to content

fix(id): ignore supersedes edges from superseded attestations in compose_view (#4003) - #4512

Merged
dezren39 merged 2 commits into
mainfrom
queue/6281-4003-boards-attestation-frontier
Nov 2, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/6281-4003-boards-attestation-frontier

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #4003. In BoardGraph::compose_view (pkgs/id/src/boards.rs), the moderator frontier collected supersedes edges from every RoleAttestation for the board, including attestations that were themselves superseded — so a revocation nullified by a generic Supersede record still revoked the grant it named.

The attestation frontier now resolves to a fixed point over active attestations, mirroring the generic supersede frontier directly above it: an attestation that is itself superseded (by an active generic Supersede, or by an active attestation's edge) contributes no edge. Superseding a revocation therefore reinstates the grant, exactly as superseding a grant revokes it.

Tests

  • New regression test superseded_revocation_no_longer_revokes: grant → Hide applies → revocation attestation (supersedes the grant) → Hide stops applying → generic Supersede nullifying the revocation (replacement is an unrelated attestation) → Hide applies again.
  • Verification: the full id lib does not compile on current main (issue id(lib): references.rs does not compile — LocalIndex derives Default over a StoreId with no Default impl, and from_markdown breaks with a borrow of a loop-local String (PR #2756) #4454, references.rs, unrelated), so the edited boards.rs was verified verbatim (md5 fcae6c5c77e49399199e6105c3a51937) in the same probe-harness shape the issue's own reproduction used: cargo test boards:: — 26/26 pass, including generic_supersede_of_a_grant_also_revokes_authority, superseded_supersede_record_has_no_effect, view_enforces_moderator_revocation_but_keeps_the_public_log, and moderator_acceptance_does_not_depend_on_revocation_arrival_order.

Queue: task 6281 (repo-health-code-pilot).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 18:05
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9bdc7d10-3604-41a3-9685-028e2ce13fa2
Commits

Reviewing files that changed from the base of the PR and between c91c679 and f78d780.

Files selected for processing: 1
  • pkgs/id/src/boards.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T18:13:36.328895Z f78d780 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5375daaee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pkgs/id/src/boards.rs Outdated
Comment on lines +1247 to +1248
let next: BTreeSet<ArtifactHash> = active_attestations
.difference(&named)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow attestations to reactivate when resolving the frontier

For an owner-signed chain grant G1 → revoke R1 → grant G2 → revoke R2, where each attestation supersedes its predecessor, the first iteration removes G1, R1, and G2 from active_attestations. Because subsequent iterations only subtract from that reduced set, R1 never reactivates after G2 becomes inactive. The loop therefore returns only G2 as superseded, and current_moderators incorrectly accepts G1, allowing the revoked moderator's Hide actions to keep affecting the view. Resolve the frontier against the original eligible attestation set, or traverse the dependency DAG, so reinstated attestations can contribute their edges.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f78d780 — thank you, the shrinking loop was wrong for chains. The frontier now recomputes the active set from the original eligible attestation set on every pass (bounded by one pass per edge), so a middle revocation reactivates once the grant superseding it falls. Added regression test attestation_chain_frontier_reinstates_and_re_revokes covering grant -> revocation -> grant -> revocation (hidden 1 -> 0 -> 1 -> 0). Verbatim-module probe: cargo test boards:: 27/27 pass.

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.

id(boards): compose_view applies supersedes edges from superseded attestations — a nullified revocation still revokes

1 participant