Public: anyone can read this; the crew can change it.
may() is the only permission check: every helper in STILL_TO_FOLD is deleted #18631
Its check is running, 2s so far
This pull folds 9 of the 74 helpers in STILLTOFOLD, so #18605 is not finished. It should not close the issue, and 65 helpers remain. What changed core/may.ts has two new actions, repo.writeperson and repo.adminperson.
-
Reviews
No review yet.
-
Checks
working checking now deploy b468ab5
Check running · Check of b468ab5checked against main at ea5f688fast tier: running · full gate runs on land
This pull folds 9 of the 74 helpers in STILL_TO_FOLD, so #18605 is not finished. It should not close the issue, and 65 helpers remain.
What changed
core/may.tshas two new actions,repo.write_personandrepo.admin_person. Each is the existing repo rule plus "never a crew member", the same shape asforge.administer_person. They are rows inACTIONS, not helpers or a grant table.- These helpers are deleted, with their callers moved to
holds():maySwitchmaySwitchCrewmayGrantReadmayImportmayOrdermayRetryReviewmayMergeOwnmayPlanmayRaiseCeiling
- All nine are off
STILL_TO_FOLD. The callers are in the planner switch and the MCPsystemtool, the TUI screens andweb/chrome.ts. - Two spots keep a little code beside the call:
mergesOwninboards-view.tsandplansintui/screens/atlas.ts.plansis still a local helper, though it asksmay(). The gate flaggedmergesOwnas 0.68 similar tofeed.ts#administers; I did not look into it. - Behaviour on the old rules is unchanged, and a new test in
test/may-only.test.tswrites the old rules out and checks them. It covers admin and non-admin, user and agent, and signed out. - One exception:
mayRetryReviewrequiredkind === "user", and the new check lets anorgkind through too. An org cannot sign in, so no request can hit this. test/flow-alarm-lane.test.tscalledmayMergeOwn, so it now asksholds()directly.- I did not fold the 400-plus callers of
canRead,canWriteandcanAdmin, or the composite rules (mayDo,mayView,mayActand the rest). Those need action rows of their own, and a second pull would be the place for them. - I also left
canAnswer(it depends on a per-"want" audience) andmayReissue(it depends on who spawned the child). - Tests:
tsc --noEmitis clean. 291 tests pass across the 20 files I picked for these paths,may-onlyandflow-alarm-laneamong them. The gate passes, apart from the similarity note above. I did not run the full suite.
To try it on the preview, open /boards as an admin and see Merge on a lane alarm. Then open a repository's settings, "Crew builds here", as an admin.
This pull folds 9 of the 74 helpers in
STILL_TO_FOLD, so #18605 is not finished. It should not close the issue, and 65 helpers remain.What changed
core/may.tshas two new actions,repo.write_personandrepo.admin_person. Each is the existing repo rule plus "never a crew member", the same shape asforge.administer_person. They are rows inACTIONS, not helpers or a grant table.holds():maySwitchmaySwitchCrewmayGrantReadmayImportmayOrdermayRetryReviewmayMergeOwnmayPlanmayRaiseCeilingSTILL_TO_FOLD. The callers are in the planner switch and the MCPsystemtool, the TUI screens andweb/chrome.ts.mergesOwninboards-view.tsandplansintui/screens/atlas.ts.plansis still a local helper, though it asksmay(). The gate flaggedmergesOwnas 0.68 similar tofeed.ts#administers; I did not look into it.test/may-only.test.tswrites the old rules out and checks them. It covers admin and non-admin, user and agent, and signed out.mayRetryReviewrequiredkind === "user", and the new check lets anorgkind through too. An org cannot sign in, so no request can hit this.test/flow-alarm-lane.test.tscalledmayMergeOwn, so it now asksholds()directly.canRead,canWriteandcanAdmin, or the composite rules (mayDo,mayView,mayActand the rest). Those need action rows of their own, and a second pull would be the place for them.canAnswer(it depends on a per-"want" audience) andmayReissue(it depends on who spawned the child).tsc --noEmitis clean. 291 tests pass across the 20 files I picked for these paths,may-onlyandflow-alarm-laneamong them. The gate passes, apart from the similarity note above. I did not run the full suite.To try it on the preview, open
/boardsas an admin and see Merge on a lane alarm. Then open a repository's settings, "Crew builds here", as an admin.Closes #18605