Skip to content

feat(cli): give kudos in another member's name with --send-as-user - #158

Merged
xergioalex merged 5 commits into
mainfrom
feature__kudos_send_as_user
Dec 3, 2026
Merged

xergioalex merged 5 commits into
mainfrom
feature__kudos_send_as_user

Conversation

@xergioalex

Copy link
Copy Markdown
Member

Summary

Organization admins can give a kudos in another member's name: dailybot kudos give --send-as-user <user-uuid>. The flag sends send_as_user on POST /v1/kudos/. This is the same admin-only parameter chat send --send-as-user already uses. The PR also corrects the task delete help text.

Merge notes: release order

  1. The API PR (send_as_user on POST /v1/kudos/) merges and deploys first.
  2. Then this CLI PR. Its release is expected to be 3.30.0, the version the skill and site docs cite.
  3. Then the agent-skill PR, then dailybot.com.

Do not enable auto-merge. An API that predates the field ignores it and gives the kudos as the caller.

Change Log

  • kudos give --send-as-user: the field is sent only when set, so the default body is unchanged.
  • The UUID format is checked before any call (exit 2).
  • The "no kudos to yourself" check compares the receivers with the named member.
  • The confirmation and the success output name the member (taken from the response's user).
  • Kudos-specific messages for org_admin_required (exit 4, nothing created), send_as_user_invalid_uuid, send_as_user_not_found and send_as_user_conflict. --json keeps the code.
  • task delete help: the command posts to the archive door and stays reversible. The API's own DELETE now moves a task to a trash; the old text said the API treats DELETE as an archive.
  • Docs: the README options table and an example, and docs/API_REFERENCE.md.

Tests

  • New tests/kudos_send_as_user_test.py with 12 tests: wire, command and the refusals.
  • pytest: 4291 passed. 1 test fails only in this environment (test_interactive_alias_launches_textual_app needs textual); it also fails on main.
  • ruff check, ruff format --check and mypy are clean.

Risks

  • None for existing callers: without the flag, the request and the output are unchanged.

🤖 Generated with Claude Code

xergioalexpro and others added 2 commits December 2, 2026 19:05
## Summary
`dailybot kudos give --send-as-user <user-uuid>` sends `send_as_user` on
POST /v1/kudos/, the same admin-only parameter `chat send` already uses.

## Change Log
- The field is sent only when the flag is set; the default body is unchanged
- Local UUID check before any call; the self-kudos check uses the named member
- Confirmation and success output name the member
- Kudos-specific messages for org_admin_required, send_as_user_invalid_uuid,
  send_as_user_not_found and send_as_user_conflict
- README, API reference and 12 tests

## Risks
- Needs the API that supports the field; an older API ignores it and gives
  the kudos as the caller. Release only after the API deploys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n archive

The command posts to the archive door and stays reversible; the API's own DELETE now moves a task to a trash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xergioalex xergioalex added the Ready Trigger AI code review label Dec 3, 2026
@github-actions

This comment has been minimized.

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the pr-reviewed Passed AI code review label Dec 3, 2026
Review round 1 on --send-as-user:
- Success names the member only when the server's `user.uuid` matches the flag;
  otherwise it warns (an older API gives the kudos as the caller)
- The confirmation names the member from the directory, or says the UUID is not
  in it, so a wrong UUID is easy to catch
- send_as_user_conflict explains by_dailybot (the CLI never sends it)
- API reference: flag in the heading and table; the not_found exit differs
  between chat send (404) and kudos give (400)
- Tests pin exit codes 4 and 2, plus the unconfirmed and mismatched giver

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xergioalex xergioalex added Ready Trigger AI code review and removed Ready Trigger AI code review labels Dec 3, 2026
@github-actions

This comment has been minimized.

github-actions[bot]

This comment was marked as outdated.

xergioalexpro and others added 2 commits December 3, 2026 12:36
The API now refuses send_as_user with is_anonymous as well as by_dailybot: a kudos given in someone's name always shows its sender.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2: the own-name guard now matches the directory and success checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xergioalex xergioalex added Ready Trigger AI code review and removed Ready Trigger AI code review labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

AI review for eb52dd3 — ✅ done

View review →

Highest severity: none

Verifier: 0 checked · 0 verified · 0 downgraded · 0 refuted · 0 unverified · 0 skipped — grok-4.5 (economy), 0s

Strictness gate: ✅ highest severity none ≤ critical threshold

0 inline comment(s) attached.

Usage: 125.3k in (65% cached) · 1.3k out · est. $0.12 · 3 turns · 30s

Iteration-Aware Review: gen 3, round 1, policy=first-pass-exhaustive (new_commits, mode=incremental) — 0 surfaced.

@github-actions github-actions Bot 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.

Code review — 0 finding(s): 0 critical · 0 warning · 0 info

Check: ✅ passing — strictness block-on-critical: highest severity none ≤ critical threshold

No findings posted inline.

Summary

Looks good — the prior case-sensitivity nit on the local self-kudos guard is fixed, and the new hunks stay consistent with it.

What changed since last review

  • execute_kudos_give now compares receiver and giver UUIDs with .lower() on both sides, so a mixed-case --send-as-user still trips the local refusal before any POST.
  • A regression test (test_the_own_name_check_ignores_uuid_case) covers that path with RECEIVER.upper().
  • send_as_user_conflict copy and the API reference note now also name is_anonymous alongside by_dailybot, matching the server refusal surface the CLI never sends.

Prior findings

  • 269523e41af0fc50 (info, case-sensitive UUID compare): resolved.

Rest of the feature

Unchanged files from the earlier pass still look sound: optional send_as_user on the wire only when set, UUID pre-check (exit 2), kudos-specific code_overrides, confirmation naming, and display of the named giver. No new issues in this delta.

Recommendation: approve


Since last review (54d684c → eb52dd3): resolved 1 · still open 0 · regressed 0 · new 0 · 1 auto-retired (fix corroborated; thread already collapsed).

Prior findings

  • retired dailybot_cli/commands/kudos.py:87 (verified_fixed)

Check status: ✅ passing — strictness block-on-critical, highest severity in effect none: highest severity none ≤ critical threshold.

This line is written by the reviewer runtime after the gate ran and matches the check conclusion and the tracking comment. Any recommendation above is the model's advisory opinion, not the gate.

@xergioalex
xergioalex merged commit c08b844 into main Dec 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-reviewed Passed AI code review Ready Trigger AI code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants