Skip to content

Use Internet Identity's access-level wording in the runtime messages - #116

Merged
aterga merged 1 commit into
mainfrom
claude/consent-terminology-p4el4n
Aug 3, 2026
Merged

aterga merged 1 commit into
mainfrom
claude/consent-terminology-p4el4n

Conversation

@aterga

@aterga aterga commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Four runtime strings told users to "turn OFF the read-only option" on Internet Identity's consent screen, and described that screen as defaulting to read-only. Neither is true: the screen requires an explicit choice between "Questions only" and "Actions & questions", and there is no toggle to turn off. A user following the old message goes looking for a control that does not exist, and the model relaying it sends them there.

This is the same correction already applied to the privacy policy (#114), the served /terms page (#115), and the README (#62) — the code strings were the remaining place the wrong mental model survived.

The technical sense of read-only is untouched: the MCP readOnlyHint annotations, permissions = "queries", and the internal names (read_only, is_read_only, READ_ONLY_MSG, require_write) all stay as they are. Only the wording that describes the consent screen to a human moves, plus the two doc comments that asserted the read-only default.

What each message says now

Where Now says
identities.rs READ_ONLY_MSG (returned by the require_write guard) "This Internet Identity session was authorized for "Questions only" … Reconnect with Internet Identity and choose "Actions & questions" on the consent screen, then try again."
get_app_principal's query-only annotation "…was authorized for "Questions only": reads work, but canister management … needs update access. Ask the user to reconnect and choose "Actions & questions"…"
icp_canister_status's tool description "…it needs an Internet Identity session authorized for "Actions & questions" rather than "Questions only"."
The initialize instructions the model reads at connect "Internet Identity's consent screen asks the user to choose an access level, "Questions only" or "Actions & questions". On a Questions-only session reads work, but …"

Related issues

Follows #114 (privacy policy), #115 (/terms), and #62 (README) — the same terminology correction, applied to the code paths.

Changes

  • src/identities.rs: rewrite READ_ONLY_MSG and its doc comment; correct the two doc comments that described a read-only default or an "off" toggle (PrincipalOutput::read_only, require_write).
  • src/tools.rs: rewrite the query-only annotation in get_app_principal, icp_canister_status's description, and the consent-screen paragraph in the server instructions.

Testing

  • cargo build --locked --all-targets — the two pre-existing warnings are unchanged (verified against main by stashing)
  • cargo test --locked --all-targets — 151 lib + 2 bin + 8 router tests pass
  • Read the four assembled strings back out of the compiled binary to confirm the line-continuation joins produce the intended text (no missing or doubled spaces around the em-dashes and quoted level names)
  • cargo fmt --all / cargo clippy --all-targets — not run: the toolchain here reformats ~380 untouched files, so running it would bury the change
  • npm test --prefix monitoring/mcp-status — n/a, dashboard unchanged

Checklist

🤖 Generated with Claude Code

https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw


Generated by Claude Code

The write guard and the model-facing instructions told users to "turn OFF
the read-only option" on Internet Identity's consent screen and described
that screen as defaulting to read-only. Neither is true: the screen requires
an explicit choice between "Questions only" and "Actions & questions",
and there is no toggle to turn off. A user following the old message looks
for a control that does not exist.

Four runtime strings now name the choice the user actually has:

- identities.rs READ_ONLY_MSG, returned by the require_write guard.
- get_app_principal's query-only annotation.
- icp_canister_status's tool description.
- The initialize instructions the model reads at connect.

Internal names (read_only, is_read_only, READ_ONLY_MSG) and the technical
sense of read-only (the MCP readOnlyHint, permissions = "queries") are
unchanged; only the wording that describes the consent screen to a human
moves. The doc comments that asserted the read-only default are corrected
so the wrong mental model does not survive in the code.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw
@aterga
aterga requested review from Copilot and sea-snake August 3, 2026 10:47
@aterga
aterga marked this pull request as ready for review August 3, 2026 10:47
@aterga
aterga requested a review from a team August 3, 2026 10:47

Copilot AI 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.

Pull request overview

Updates runtime guidance to match Internet Identity’s actual consent-screen access levels.

Changes:

  • Replaces incorrect read-only toggle guidance with “Questions only” and “Actions & questions.”
  • Updates related comments without changing internal permission semantics.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/identities.rs Updates guard messaging and access-level comments.
src/tools.rs Updates tool annotations, descriptions, and initialization guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aterga
aterga merged commit 7f5c6db into main Aug 3, 2026
8 checks passed
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.

4 participants