reused: plan mode, 6 open tasks (written by /swarm-plan from the spec)
—
Plan review
approve, 0 blocking, 5 advisory (all folded into plan/spec before Gate 1)
1 of 3
Gate 1 (owner)
approved
—
Implement
2 worker-builders in worktrees, in parallel: BE CA-1..CA-3 and FE CA-4..CA-6; cherry-picked onto main as 8 commits (e1eeb892..102fced0); 37 files +943/−96 (non-test +214/−73)
1 of 3
Code review
BE (security + quality): approve, 0 blocking, 3 advisory. FE (quality): approve, 0 blocking, 2 advisory
the 5 code-review advisories were applied as tests and a small refactor (9f82a9c5, 102fced0)
—
Land: full gates
mvn verify: 1640 tests, 0 failures, 2 skipped, line coverage 96.70% (threshold 90%). npm run test: 583/583. npm run lint: 0 errors, 3 old warnings
—
Gate 2 (owner)
push (a89ee852..a6a2f086)
—
CI + smoke
CI green (Funny App Build and Deploy, Deploy Frontend, Publish Docs). mock-test.sh 22/22 on the 3rd and 4th runs; runs 1–2 right after the restart had 1 transient ECONNRESET each (/admin/comments), not an assertion failure
Role:UserRole.CONTRIBUTOR sits between USER and ADMIN. Its default permission mask is 0 (enums/UserRole.java).
Permission bits:Permission adds AUTOPILOT_AUTO_MERGE (32) and AUTOPILOT_AUTO (64). ALL_BITS stays 31, AUTOPILOT_BITS is 96, and allowsAutoLabel(mask, label) implements BR-8 (enums/Permission.java).
Security:
/v1/funny-app/admin/reports/** is open to CONTRIBUTOR and above, and is registered before /admin/** (filter/WebSecurityConfig.java:55-56).
AdminReportController uses hasRole('CONTRIBUTOR') and drops @HasPermission(ADMIN).
The real-chain test checks that a CONTRIBUTOR gets 403 on the 7 other admin paths and on path tricks.
Accounts:
Only the SUPER_ADMIN can change the autopilot bits.
The bits are refused on a USER.
A role change keeps them for CONTRIBUTOR and ADMIN, and clears them for USER (service/impl/AdminAccountServiceImpl.java).
Reports:
The label check reads the DB user, not the JWT or the Harness flag. A refused label gets 403 and no row is saved.
A retry downgrades the label.
The cap counts ADMIN and CONTRIBUTOR together.
The issue body says "a CONTRIBUTOR".
These rules are in service/impl/ReportServiceImpl.java and ReportIssueContent.java. The changeset is 202610230002-app-report-cap-contributor.sql.
Frontend:
userCanReport and allowedAutoLabels are new.
AuthContext keeps permissions.
CONTRIBUTOR gets the Report menu and page and the Admin notification tab, but not the Admin menu.
The report form offers only the allowed labels.
The account table gets a CONTRIBUTOR rank and badge, a role select for the SUPER_ADMIN (USER ⇄ CONTRIBUTOR for an ADMIN), and SUPER_ADMIN-only autopilot toggles.
The implement and QA-spec stages ran through worker-builder workers (the fallback path) in isolated worktrees, one per side. The orchestrator rebased main onto origin/main (resolving a TASKS.md append conflict with #65) and cherry-picked the 8 worker commits.
After deploy, set a test account to CONTRIBUTOR and grant AUTOPILOT_AUTO_MERGE. Send a report with "Auto-merge", and check that the GitHub issue has autopilot and autopilot:auto-merge.
Revoke the bit. The report form then shows no autopilot option.
Check visually that a CONTRIBUTOR sees Report but no Admin menu (desktop and mobile).
Run ./api/mock-test.sh after the deploy.
Rollback note: before reverting CA-1, set every CONTRIBUTOR back to USER.