permission: a cancelled explicit-consent prompt journals as denied instead of a no-decision outcome

Open
#9,372 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
backend, testing

Research direction

Read packages/server/src/permission-manager.js, packages/protocol/src/permission-outcomes.ts, and the guard at packages/server/tests/permission-reason-table-guard.test.js. Trace how cancelled is handled by permissionOutcomeForEvent and applyPermissionResolved, then decide whether it should map to expired or remain a deliberate refusal. Update the shared table and remove it from KNOWN_UNTABLED; done when the server journal and live client agree.

Written by the indexing model from the issue text.

Description

bug from-review priority: low

Summary

requestExplicitConsent in packages/server/src/permission-manager.js resolves an aborted consent prompt with finish(false, 'cancelled'). That emits permission_resolved with a requestId, decision: 'deny' and reason: 'cancelled'. cancelled is not a key of the shared no-decision table PERMISSION_NO_DECISION_REASON_OUTCOMES (packages/protocol/src/permission-outcomes.ts). So the server journal (permissionOutcomeForEvent) records the prompt as denied, and the live client (applyPermissionResolved) shows it as denied. Nobody refused it: the prompt was withdrawn because its abort signal fired. An aborted ordinary prompt (aborted) is recorded as expired.

Found while writing the #9368 guard, which lists cancelled as a known untabled reason until this is decided.

Desired

Decide what a cancelled consent prompt records, then make both sides agree through the table:

  • add cancelled to the table (most likely expired, matching aborted), or
  • rule it a refusal deliberately, and document why.

Either way, remove cancelled from the guard's KNOWN_UNTABLED list in the same change.

Source

#9368 implementation (guard packages/server/tests/permission-reason-table-guard.test.js).

Dominant language
JavaScript
Stars
7
Forks
1
Avg merge
2h 3m
Merged PRs (30d)
333

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from blamechris/chroxy

All issues in blamechris/chroxy

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.