Repository navigation
[2919 by Claude Opus 5.5] Improve instance access role wording and integrate it with the trigger whitelist. - #2924
Conversation
… and the related API tests all pass, and type checks and lint are clean. 1. "Explicit" wording replaced Role assignments are now called assigned instance roles everywhere the term appeared: - Access page: the add form is "Assign an instance role", the list is "Assigned instance roles", the empty state is "No instance roles assigned yet.", and the remove prompt reads "Remove the instance role assigned to @user?" - API / MCP: the `MEMBER_EXISTS` error now says "…already has an assigned instance role". The `add_instance_member` tool description uses the new wording and points to `update_trigger_access_configuration` for whitelist changes. - Docs and code: `packages/api/README.md`, `docs/mcp-coverage.md`, two comments in `agentRunGrants.ts` and two test names. 2. Trigger whitelist offers - After adding a user, if they aren't on the whitelist, a banner offers Add to trigger whitelist or Not now. - After removing a user, if they're still on the whitelist, a banner offers Remove from trigger whitelist or Not now. - When there's no offer: the page skips the offer if the whitelist is empty, because an empty list means every GitHub user can trigger and adding one name would lock everyone else out. It also skips it if removing the user would leave the list empty, which would open access to everyone. - Users who are on the whitelist now show "· on trigger whitelist" in the role list. - Same setting, no duplication: this uses the existing `github_user_whitelist` setting rather than a new mechanism. A new helper, `propr-ui/src/api/triggerWhitelistApi.ts`, re-reads the list before each write and sends a revision check, so a concurrent edit fails with a "configuration changed" error instead of being overwritten. Names are matched case-insensitively, as trigger enforcement does. To support this, `updateSettings` in `configApi.ts` now accepts an optional `expectedRevision`. - Whitelist unreadable: if the page can't load the whitelist, no offers are shown and member management works as before. Tests and docs - Unit tests: `AccessManagementPage.test.tsx` covers add → offer → accept, add → decline, no offer when already listed or when the list is empty, remove → offer → accept, no offer when removal would empty the list, and a failed whitelist save. The new `triggerWhitelistApi.test.ts` checks that the revision sent matches what the server computes. - Playwright test: the new `e2e/access-trigger-whitelist.pw.ts` covers both offers in the built app and was used to capture the preview screenshots. - Docs: I documented the behaviour in `web-ui.md` and `security-overview.md` and added a CHANGELOG entry. Decision for you: I chose the two skip cases above (empty whitelist, or a removal that would empty it) so the offers can never flip the whitelist between open and restricted. If you'd rather still offer in those cases with a warning, that's a small change.
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
CI failed: Validate Changes Please investigate and fix this CI failure.
Failure evidence
|
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
|
✅ Applied the requested follow-up changes in commit c558582 Processed 2 comments:
Summary of ChangesI fixed the CI failure in Validate Changes. UI lint failed with a single warning: This PR didn't cause the problem. The extra line came from PR #2885 (commit Fix: In that test file, I put the Checked:
I didn't make previews because nothing in the UI changed. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…with a single warning: `propr-ui/src/components/TaskPlanner/SetupWizard.test.tsx` had 401 counted lines, one over the 400-line limit. CI treats any warning as a failure. I fixed the CI failure in Validate Changes. UI lint failed with a single warning: `propr-ui/src/components/TaskPlanner/SetupWizard.test.tsx` had 401 counted lines, one over the 400-line limit. CI treats any warning as a failure. This PR didn't cause the problem. The extra line came from PR #2885 (commit `9e7a923f6`), which is already on main. That commit's own message says it left this warning behind, so main probably fails this lint check too. It surfaced here because this PR changes UI files, which runs the UI lint. **Fix:** In that test file, I put the `Object.defineProperty(window, 'innerWidth', …)` call inside `setViewportWidth` on one line instead of five. The file is now 397 lines and the test behaves the same. **Checked:** - `eslint . --max-warnings 0` in `propr-ui` now passes with no warnings. - All 13 tests in `SetupWizard.test.tsx` pass. I didn't make previews because nothing in the UI changed. PR: #2924 Comment by: @propr-dev[bot] (ID: 6079048979) Comment by: @github-actions[bot] (ID: 6079049785) Model: Claude Opus 5.5
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved the merge conflict. What the conflict was about: Each branch added a new bullet at the top of the
How I resolved it: I kept both entries, with this PR's first and Why: The two entries describe separate features and don't overlap, so dropping either would have lost a real changelog record. The fix only needed both bullets kept in one tidy list. Checked: No conflict markers are left in 🤖 Resolution Details
System-triggered merge conflict resolution |
…instance-access-r-20261009-1000-bef Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - CHANGELOG.md PR: #2924 Model: Claude Opus 5.5
|
🔀 Auto-merged No conflicts were found — the merge was verified by an AI agent. 🤖 Verification Details
System-triggered merge conflict resolution |
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
CI failed: Run Full Test Suite Please investigate and fix this CI failure.
Failure evidence
|
|
ℹ️ Analyzed the follow-up request by @propr-dev[bot] Analysis SummaryI made no code changes, because nothing in the code failed. The run was cancelled before any tests finished.
The next full test run on this branch should pass as long as it isn't cancelled again. If it keeps getting cancelled, the cause is likely in how the workflows are triggered or cancelled rather than in this branch's code. There's no visual change, so I didn't create a preview. No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves role wording and adds confirmable whitelist actions using the existing settings API. It needs changes before merge because two paths bypass the intended whitelist safety guarantees. ✅ Separate confirmation — Membership changes do not silently modify the whitelist; users can accept or dismiss the follow-up offer. ✅ Removal safety — The removal helper re-reads the whitelist and refuses changes that would empty it. ✅ Focused coverage — Added tests cover offers, dismissal, case-insensitive membership checks, and update failures. Current checks report 22 passed, with none failed or pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Recheck open access before adding
F2: 🔴 Do not silently omit concurrency protection
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Reconcile the Access documentationThe retained paragraph in S2: 🟢 Exercise browser confirmation through persistenceThe new Playwright tests stop after verifying that offers appear. Extending them to accept an offer and assert the settings request would strengthen integration coverage beyond the mocked page tests. This is optional because helper and component tests already cover the basic mutation behavior separately. ScoreThe implementation is focused and current checks pass, but the new mutation paths can unexpectedly restrict access or overwrite concurrent changes. Both defects have localized corrections. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit de36a80
Summary of ChangesI fixed both findings in F1: adding to a whitelist that was cleared after the offer. After F2: writes without a revision. When New tests in
Separate finding, not changed: the server only checks the revision when the request includes one, so other callers can still post the setting without that protection. That is existing behaviour outside this fix. I didn't create previews: the only visible difference is an error message in an edge case. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…Api.ts`. The whitelist tests and the Access Management page tests pass (18 of 18), and the type check and lint of the changed files are clean. I fixed both findings in `propr-ui/src/api/triggerWhitelistApi.ts`. The whitelist tests and the Access Management page tests pass (18 of 18), and the type check and lint of the changed files are clean. **F1: adding to a whitelist that was cleared after the offer.** After `addToTriggerWhitelist` re-reads the whitelist, it now refuses if the list is empty and sends nothing. This covers the case where another administrator cleared the list (opening trigger access to everyone) between the offer and its acceptance. The error says that adding the user would restrict access to them alone and points to Settings. The page already shows helper errors in its error banner. The removal helper already refused to empty the list, so it needed no change. **F2: writes without a revision.** When `crypto.subtle` is unavailable, `whitelistRevision` now refuses the update instead of returning nothing. That means both the add and the remove helpers stop before sending an unguarded update, so a concurrent edit can't be silently overwritten. The error explains that secure hashing isn't available in this browser and points to Settings. I chose refusal over bundling a separate SHA-256 implementation to keep the change small. The trade-off is that on a non-secure origin (plain HTTP on a non-loopback host) the follow-up offer now always fails and admins have to edit the whitelist in Settings. **New tests** in `propr-ui/src/api/triggerWhitelistApi.test.ts`: - An offer accepted after the whitelist was cleared throws and sends no update. - With `crypto.subtle` unavailable, both the add and the remove helpers throw and never call `updateSettings`. **Separate finding, not changed:** the server only checks the revision when the request includes one, so other callers can still post the setting without that protection. That is existing behaviour outside this fix. I didn't create previews: the only visible difference is an error message in an edge case. PR: #2924 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves role wording and adds confirmable whitelist updates, but needs a localized correction before merge: its case-insensitive membership check does not match the existing comment-trigger consumer. ✅ Confirmable changes — Whitelist mutations require a separate button click and can be declined. ✅ Guarded persistence — Updates reread the whitelist and supply a revision checked under the server’s configuration lock. ✅ Open-access protection — Helpers refuse additions to an empty whitelist and removals that would empty it. The supplied current-head checks show 22 passed, no failures, and no pending checks. This review uses static analysis only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Match the comment-trigger whitelist semantics
SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Clarify access documentationThe new paragraph in S4: 🟢 Exercise browser confirmation writesThe new Playwright tests stop after displaying offers. Extending the fixture to handle settings writes and asserting both confirmation and dismissal would strengthen browser coverage. This is optional because the component and helper tests already exercise those actions separately. ScoreThe implementation is focused and has passing checks, but the demonstrated comparison mismatch leaves the new integration incorrect for existing case-distinct whitelist configurations. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit e826bcd
Summary of ChangesI fixed F3. The trigger-whitelist checks on the Access Management page now use exact login matching, the same way GitHub comment triggers are checked ( The fix (
Same problem in the removal path: Tests:
This fix doesn't change anything you'd see on screen, so I didn't create previews. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…gement page now use exact login matching, the same way GitHub comment triggers are checked (`filterCommentByAuthor`). The whitelist and Access Management page tests pass (22 of 22), and lint and the type check are clean on the changed files. I fixed F3. The trigger-whitelist checks on the Access Management page now use exact login matching, the same way GitHub comment triggers are checked (`filterCommentByAuthor`). The whitelist and Access Management page tests pass (22 of 22), and lint and the type check are clean on the changed files. **The fix** (`propr-ui/src/api/triggerWhitelistApi.ts`): `isLoginInWhitelist` now compares logins exactly instead of ignoring case. That one change corrects three things: - **Add offer:** if the whitelist has `['owner', 'Developer']` and you add `developer`, you are now offered the addition. Accepting it gives `['owner', 'Developer', 'developer']`, so the existing `Developer` entry is kept. - **Add helper:** `addToTriggerWhitelist` no longer skips the write because of a differently-cased entry. - **Role list:** a member is only marked "on trigger whitelist" when their exact login is listed. **Same problem in the removal path:** `removeFromTriggerWhitelist` also ignored case, so removing `developer` would also have deleted a separate `Developer` entry. It now removes only the exact login, which matches how the MCP tool removes entries. Because the removal offer uses `isLoginInWhitelist`, it now appears only when the exact login is listed. **Tests:** - `triggerWhitelistApi.test.ts`: covers exact matching, appending when only a differently-cased entry exists (keeping that entry), skipping the write when the exact login is already listed, and removing only the exact entry. - `AccessManagementPage.test.tsx`: the `['owner', 'Developer']` test now expects the offer and checks that accepting it calls the add helper with `developer`. The "already listed" test now uses the exact login. I added two tests: a differently-cased entry produces no removal offer, and the role-list status depends on exact matching. This fix doesn't change anything you'd see on screen, so I didn't create previews. PR: #2924 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
CI failed: Validate Changes Please investigate and fix this CI failure.
Failure evidence
|
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
|
✅ Applied the requested follow-up changes in commit 0fb3f62 Processed 2 comments:
Summary of ChangesI fixed the Validate Changes failure. The API lint check now passes, and the full MCP test suite passes (410 of 410), as do the merge-conflict tests (60 of 60). The API typecheck is clean. I didn't rerun the UI checks, since they already passed in CI and nothing UI-side changed. Cause: this PR never touched What I changed:
The branch now repeats main's changes as ordinary edits rather than a merge commit. Main's copies are identical, so merging should be clean. Main still fails the line limit until this PR merges or the same move lands there. There's no visual change, so I didn't create previews. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…w passes, and the full MCP test suite passes (410 of 410), as do the merge-conflict tests (60 of 60). The API typecheck is clean. I didn't rerun the UI checks, since they already passed in CI and nothing UI-side changed. I fixed the Validate Changes failure. The API lint check now passes, and the full MCP test suite passes (410 of 410), as do the merge-conflict tests (60 of 60). The API typecheck is clean. I didn't rerun the UI checks, since they already passed in CI and nothing UI-side changed. **Cause:** this PR never touched `packages/api/mcp/toolsPullRequests.ts`. CI checks the branch merged with main, and main had just added the `resolve_merge_conflicts` tool (#2921) to that file. That pushed it to 412 counted lines against a 400-line limit. Main has the same lint failure; this PR just hit it first. **What I changed:** - **Pulled in main's changes:** git is read-only in this environment, so I couldn't run a real merge. Instead I applied main's diff since this branch split off directly to the files. Main's edits to `CHANGELOG.md` and `docs/mcp-coverage.md` don't overlap this branch's, so it applied cleanly. Without this, the branch alone would have the new tool but not its docs and tests. - **Shrank the file:** I moved the model-label lease helper, unchanged, out of `toolsPullRequests.ts` into a new file, `packages/api/mcp/modelLabelLease.ts`. `toolsPullRequests.ts` now imports it and passes lint. The branch now repeats main's changes as ordinary edits rather than a merge commit. Main's copies are identical, so merging should be clean. Main still fails the line limit until this PR merges or the same move lands there. There's no visual change, so I didn't create previews. PR: #2924 Comment by: @propr-dev[bot] (ID: 6080176394) Comment by: @github-actions[bot] (ID: 6080176593) Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR is ready to merge within the reviewed scope. It clarifies assigned-role wording and adds confirmable whitelist offers using the existing configuration setting. The additional MCP merge-conflict tool includes command-to-task receipt correlation. ✅ Guarded whitelist updates — Writes re-read the whitelist and submit a revision checked under the server’s configuration lock, preventing concurrent edits from being overwritten. ✅ Explicit user choice — Membership changes leave the whitelist untouched until the offer is accepted. Helpers also refuse changes that would switch between open and restricted access. ✅ Receipt correlation — The originating issue-comment ID is carried through the merge queue into persisted task data, with tests covering correlation to the matching task. This assessment is based on static review of the supplied diff and context. The authoritative checks report 24 passed, none failed, and none pending. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S5: 🟢 Exercise browser confirmation through persistenceThe new Playwright tests verify that offers appear, while unit tests cover accepting them. Extend the browser fixture to handle settings writes and assert that accepting an offer sends the revision and persists the intended whitelist. This would strengthen integration coverage; the supplied implementation and unit coverage do not establish a merge blocker. S6: 🟢 Reconcile the Access documentationIn ScoreThe changed access flow has guarded writes, explicit confirmation, and meaningful boundary-case coverage. No verified merge blocker was found, and all current checks passed or were skipped. 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #2919
Branch:
2919/claude-opus-5-5-improve-instance-access-r-20261009-1000-befCommits: ✅ Changes committed (5dfdf0b)
AI Processing Completed
Execution Details:
Summary:
I've made both changes from #2919. The UI tests, the Playwright tests and the related API tests all pass, and type checks and lint are clean.
1. "Explicit" wording replaced
Role assignments are now called assigned instance roles everywhere the term appeared:
MEMBER_EXISTSerror now says "…already has an assigned instance role". Theadd_instance_membertool description uses the new wording and points toupdate_trigger_access_configurationfor whitelist changes.packages/api/README.md,docs/mcp-coverage.md, two comments inagentRunGrants.tsand two test names.2. Trigger whitelist offers
github_user_whitelistsetting rather than a new mechanism. A new helper,propr-ui/src/api/triggerWhitelistApi.ts, re-reads the list before each write and sends a revision check, so a concurrent edit fails with a "configuration changed" error instead of being overwritten. Names are matched case-insensitively, as trigger enforcement does. To support this,updateSettingsinconfigApi.tsnow accepts an optionalexpectedRevision.Tests and docs
AccessManagementPage.test.tsxcovers add → offer → accept, add → decline, no offer when already listed or when the list is empty, remove → offer → accept, no offer when removal would empty the list, and a failed whitelist save. The newtriggerWhitelistApi.test.tschecks that the revision sent matches what the server computes.e2e/access-trigger-whitelist.pw.tscovers both offers in the built app and was used to capture the preview screenshots.web-ui.mdandsecurity-overview.mdand added a CHANGELOG entry.Decision for you: I chose the two skip cases above (empty whitelist, or a removal that would empty it) so the offers can never flip the whitelist between open and restricted. If you'd rather still offer in those cases with a warning, that's a small change.
Detailed Logs:
a564224d-65f9-4dfb-887f-4e6368fbd3d0Log files stored at:
/tmp/claude-logs/issue-2919-2026-10-09T10-09-33-868Z-conversation.json/tmp/claude-logs/issue-2919-2026-10-09T10-09-33-868Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #2919.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Visual preview
Offer after adding a user
Instance access page after adding @octocat: the reworded 'Assign an instance role' / 'Assigned instance roles' sections and the offer to add the user to the trigger whitelist
Original unavailable: managed storage is unavailable or the upload has expired.
Offer after removing a user
Instance access page after removing @octocat, offering to remove them from the trigger whitelist as well
Original unavailable: managed storage is unavailable or the upload has expired.