Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add daemon-level XP requirement app/Models/User.php |
User::hasGoodReputation() now checks that queried XP meets UnixRank::Daemon->minXp(), in addition to the existing conditions. |
Test XP and moderation outcomes tests/Unit/Actions/CreateCommitTest.php, tests/Unit/Jobs/ModerateCommitTest.php |
Tests cover moderation at 49, 50, and 155 XP; pending, rejected, and deleted commits; and daemon versus non-daemon reputation cases. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature
Possibly related issues
- Question about stars after the bookmark merge (#811) #1001: The issue asks whether migrated private saves count toward XP, which is used by the new reputation threshold.
Possibly related PRs
- dev-null-sh/dev-null.sh#592: Uses
hasGoodReputationto determine commit approval. - dev-null-sh/dev-null.sh#978: Changes the XP result used by the new threshold.
- dev-null-sh/dev-null.sh#997: Uses trusted-author approval for event commits, which depends on the reputation criterion.
Suggested reviewers: brendt, sandermuller
Merge Risk: 
Minimal · up to 72f57
-
No actionable issue was established with the new reputation threshold or its moderation outcomes. The change is mergeable after normal checks.
Security architecture risk: 
Low · up to 72f57
-
The change narrows automatic-approval eligibility without adding a new public endpoint or removing existing reputation requirements. Remaining design uncertainty concerns how mutable XP should affect approval over time. Existing handling of reports is unchanged.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- inferred — The affected authority is publication without automated moderation within the existing commit system. For the same underlying state, satisfying the new gate necessarily satisfies the previous gate; XP manipulation alone cannot remove the retained age, approved-history, or follower requirements. No additional bypass consumer was identified.
Trust Boundaries and Controls
- observed — The caller cannot select a privileged viewer for moderation XP: the gate passes null. Commit and streak queries then select approved activity, with normal soft-deletion filtering. Received and given stars are constrained to visible commits and exclude self-stars, preventing the inspected pending or rejected activity from qualifying through those inputs.
Resilience and Maintainability Implications
- observed — The existing worker skips deleted or terminal commits. Reputation-based approval uses a transactional, pending-only row lock, so repeated execution does not reapply the terminal update. Provider failures follow the existing retry behavior and remain Pending on exhaustion rather than automatically approving content.
Hardening Proposals
- proposed — Define whether approval uses decision-time XP or requires stronger snapshot and revocation semantics. Treat future changes to XP bonuses, penalties, and rank thresholds as moderation-policy changes because they now affect bypass authority.
-
Pre-merge checks: 
5
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Require daemon rank or higher (50 public XP) alongside existing reputation requirements to skip moderation.
Validation: 133 tests passed; Pint and PHPStan passed.
Summary by CodeRabbit