Skip to content

docs(id): decide capability-change diff semantics (#5999) - #7630

Merged
dezren39 merged 2 commits into
mainfrom
queue/12873-5999-capability-diff-semantics
Nov 16, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/12873-5999-capability-diff-semantics

Conversation

@dezren39

@dezren39 dezren39 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Closes #5999.

Design record only — no code, no behaviour change. It pins the comparison semantics that #5959 (capability-change notices on reconnect) consumes, so the notice design works against a decidable rule instead of re-deriving one.

What it decides

  • What is compared: the world's declared set, requested ∪ platform_bound, mapped to capability classes. Not the used set, not granted/effective.
  • The class table over the 19 names registered today (pkgs/id/crates/id-core/src/world_caps.rs:346-491), plus reserved classes for the vocabulary id: design: capability model — requested vs discovered-used sets, registry listing, custom-compiled platforms #5958 S12 requires (sandboxed fs, arbitrary file read, arbitrary network out). Class assignment is registry data (a manifest field), never inferred from name prefixes or RequiredScope; message text stays client-side so a server cannot word its own warning.
  • Collapse rules: membership inside one class is invisible; a broader accepted class covers a narrower new one (fs.read.arbitrary ≽ fs.sandbox, net.out ≽ net.host.*); messageless capabilities never enter the comparison; acceptance is by class, not by name.
  • The trigger: re-approval iff a class in the new set is not covered by the accepted baseline under the subsumption order. Removals, within-class moves, messageless additions, optional additions and used-set-only changes are silent.
  • The sideways case id: design: capability-change notices on reconnect — expansion and sideways changes #5959 asks about: a used set that changes while the declared set does not is not a permission moment — it is shown as the "asks for all these, uses this subset" trust surface. A used set that outgrows the declaration is an author declaration defect, and the cure is a declaration change that then reaches the user as a real class.
  • Grant-on-use is named as an explicit seam the notice does not cover, rather than implied coverage it cannot provide.
  • 10 invariants stated so the comparison can be property-tested over (B, N, ≼) without a host.

Evidence

Every current-state claim is tied to code at origin/main b6bd188624. grep reconnect under pkgs/id/src finds only the replication snapshot path, so no diff/notice code exists to conflict with.

History: re-triage task 12425 (2026-11-08) confirmed #5999 real and current; prior triage task 10365 (2026-11-05) reached the same verdict and enqueued nothing.

Links

  • Adds the record to planning/architecture/README.md (design records) and doc/README.md.

Filed by the OpenChamber scheduled queue lane (worker repo-worker-code), task 12873.


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

Record the comparison semantics #5959's capability-change notices consume:
the user-meaningful capability class table over the world_caps registry
vocabulary (19 registered names plus the fs/net classes #5958 S12 reserves),
the subsumption/collapse rules, and the diff-trigger rules.

Trigger iff a class in the world's declared set (requested union platform
bound) is not covered by the class set the user last accepted. Removals,
within-class moves, messageless capabilities, optional additions and used-set
changes are silent; a used set that outgrows the declaration is surfaced as
an author declaration defect instead of a notice. Grant-on-use is named as a
seam the notice does not cover.
@dezren39
dezren39 requested a review from a team as a code owner November 8, 2026 10:15
@coderabbitai

coderabbitai Bot commented Nov 8, 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 22 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: 0584856c-2132-473b-a4fd-59e3ed33a884
Commits

Reviewing files that changed from the base of the PR and between 2f5d9cb and f4f9713.

Files selected for processing: 3

  • doc/2026-11-08T10-12-00Z_design_id_capability_diff_semantics/2026-11-08T10-12-00Z_design_id_capability_diff_semantics.md
  • doc/README.md
  • planning/architecture/README.md
  • 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 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T10:58:36.711198Z
We couldn’t complete this review. Comment @codex review to try again.
f4f9713 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: 318da1af81

ℹ️ 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 on lines +98 to +99
| `fs.sandbox` | "Read and write files in this world's own storage." | sandboxed file read+write (S12) | subsumed by `fs.read.arbitrary` |
| `fs.read.arbitrary` | "Read any file this server can read." | arbitrary file read (S12) | subsumes `fs.sandbox` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep sandbox writes independent of arbitrary file reads

If a user has accepted only fs.read.arbitrary, adding fs.sandbox is silent under this subsumption relation even though the latter introduces write authority that the accepted read-only permission never disclosed. Maximalisation also drops the sandbox read/write warning when both classes are requested, hiding that authority on initial approval. Keep these classes incomparable, or split sandbox reads and writes so arbitrary read subsumes only the read component.

Useful? React with 👍 / 👎.

```
classes(S) = { table(n).class : n ∈ S } // unknown names → `unknown`
messages(S) = maximal( classes(S) \ {cap.none} ) // maximal under ≼
N = messages(requested ∪ platform_bound)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude optional-only capabilities from the trigger inputs

When an update adds an optional capability to either input set whose class was not previously accepted, this formula includes it in N and triggers re-approval, despite rule 6 explicitly requiring optional additions to remain silent. The contract supplies a per-name optional flag, but neither classes nor messages consults it, and no filtering step is defined. Define the required-on-connect subset before computing N, including how optional flags interact with platform_bound, so the provided algorithm implements the stated exclusion.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit 71bd7dd into main Nov 16, 2026
2 checks passed
@dezren39
dezren39 deleted the queue/12873-5999-capability-diff-semantics branch November 16, 2026 11:01
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: design: capability-change diff semantics — user-meaningful capability classes and re-approval triggers

1 participant