Repository navigation
feat(cli): give kudos in another member's name with --send-as-user - #158
Conversation
## 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>
This comment has been minimized.
This comment has been minimized.
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>
This comment has been minimized.
This comment has been minimized.
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>
AI review for
|
There was a problem hiding this comment.
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_givenow compares receiver and giver UUIDs with.lower()on both sides, so a mixed-case--send-as-userstill trips the local refusal before any POST.- A regression test (
test_the_own_name_check_ignores_uuid_case) covers that path withRECEIVER.upper(). send_as_user_conflictcopy and the API reference note now also nameis_anonymousalongsideby_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 effectnone: highest severitynone≤ 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.
Summary
Organization admins can give a kudos in another member's name:
dailybot kudos give --send-as-user <user-uuid>. The flag sendssend_as_useronPOST /v1/kudos/. This is the same admin-only parameterchat send --send-as-useralready uses. The PR also corrects thetask deletehelp text.Merge notes: release order
send_as_useronPOST /v1/kudos/) merges and deploys first.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.user).org_admin_required(exit 4, nothing created),send_as_user_invalid_uuid,send_as_user_not_foundandsend_as_user_conflict.--jsonkeeps the code.task deletehelp: 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/API_REFERENCE.md.Tests
tests/kudos_send_as_user_test.pywith 12 tests: wire, command and the refusals.pytest: 4291 passed. 1 test fails only in this environment (test_interactive_alias_launches_textual_appneedstextual); it also fails on main.ruff check,ruff format --checkandmypyare clean.Risks
🤖 Generated with Claude Code