Skip to content

Add a staff-only karma command for a ckey - #117

Merged
valzargaming merged 1 commit into
mainfrom
claude/project-thread-w151fy
Nov 19, 2026
Merged

valzargaming merged 1 commit into
mainfrom
claude/project-thread-w151fy

Conversation

@valzargaming

Copy link
Copy Markdown
Member

Requested by Val · project thread

What

<key>karma <ckey> (Ambassador, Admin) shows a player's hidden karma from Civ13's planned karma system: admin standing, playtime (alive, awake and connected), kindly/poorly counts raw and weighted, and the heaviest givers with their own standing, hours, admin-notes flag and warning flags (burst, shared connection, low weight, giver banned). A verified Discord ID resolves to its ckey, like ckeyinfo.

  • Karma is never shown to players, so the command answers only in the staff_bot channel or a DM and refuses everywhere else.
  • The bot never opens the coordinator database. It reads <group root>/shared-records/karma/<ckey>.json, which the Civ13 coordinator will write per ckey on every change (same pattern as activity reading player-activity-weekly.json). Every field is validated and text is stripped of mentions and markdown.

Status

The Civ13 side that writes the snapshot is not built yet, so until it lands the command answers "No karma for ckey: no karma recorded for that ckey." Merging this is harmless on its own.

Tests

  • php tests/local/karma-snapshot.php: PASS (place rule, ckey validation, missing/broken/mismatched/oversized files, field filtering, sorting, cut-off, mention and markdown stripping)
  • php -l on the new class, the command and MessageServiceManager.php: no syntax errors
  • Added to the status-heartbeat workflow beside the activity test.

Not verified: a live Discord run.


Generated by Claude Code

<key>karma <ckey> (Ambassador, Admin) reads the Civ13 coordinator's per-ckey
karma snapshot (<group root>/shared-records/karma/<ckey>.json) and shows the
admin standing, playtime, kindly/poorly counts and the heaviest givers with
their standing, hours, admin-notes flag and warning flags. It answers only in
the staff_bot channel or a DM, since karma is hidden from players.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WTP2Tn9GrJ9LZtL9UmHVY
Copilot AI balanced review requested due to automatic review settings November 19, 2026 04:51
@valzargaming valzargaming self-assigned this Nov 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@valzargaming
valzargaming merged commit 583c1a5 into main Nov 19, 2026
50 checks passed
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants