Handle Office Manager Slack volunteering - #210
Conversation
|
@drsamdonegan @mesieou this is ready for review. Please focus on Slack signature verification, deriving the volunteer identity only from the signed payload, duplicate-delivery handling, and private response/DM fallback behavior. Required backend PR: https://github.com/MLAI-AUS-Inc/mlai-backend/pull/649 The backend must be deployed first with the feature disabled; the scheduler should only be enabled after this Roo handler and channel configuration are deployed. |
4236ec3 to
752d82b
Compare
|
Rebased this branch onto current Validation after the rebase:
The PR is now mergeable. Review requests remain assigned to @drsamdonegan and @mesieou. The backend companion PR #649 still needs to be deployed first with the feature disabled, as described in the rollout section. |
752d82b to
62721c8
Compare
|
@drsamdonegan @mesieou This PR has been rebased onto current The new self-booking reminder is generated by the backend companion PR #649, so this Roo branch did not need extra message-generation logic. I retested the signed action handler, verified Slack actor binding, duplicate delivery handling, private feedback fallback, backend client, coworking intents, onboarding, and Slack security: 52/52 focused tests passed. The full Roo suite remains identical to current Please review this together with backend PR #649. |
|
Reviewed this alongside #209 and #225. The security core is sound: the handler sits after signature verification and the context allowlist, the actor comes only from Five inline comments above, two medium. Two things that did not fit on a line: Merge order. This PR and #209 both insert a new client method at the same anchor in The no-food reminder in Minor: the second |
62721c8 to
a2773cb
Compare
|
Addressed all five inline review comments in
Validation:
I replied to and resolved each addressed review thread. The companion backend PR #649 remains required, and backend-first rollout with the feature disabled still applies. |
|
Updated the no-food reminder scope following the product clarification:
Validation on the updated head:
|
|
Addressed the latest merge-blocking and coordination feedback across this PR and backend #649:
Additional validation: 71 focused Roo tests passed; full Roo suite is 866 passed with the same 20 baseline failures. Backend Office Manager module is 42 passed on SQLite (three PostgreSQL-only tests skipped), in addition to the previously passing PostgreSQL concurrency suite. @callumholt could you please take another look at the updated Roo and backend contract commits? |
|
Addressed the adversarial review findings in
Validation: 78 focused tests passed, 543 exact CI tests passed, and the full suite is 843 passed with the same 20 failures reproduced on current main. @callumholt could you please review the durability and rollout updates? |
PR reviewI reviewed the signed Slack action path, actor/date derivation, private feedback, durable outbox and lease lifecycle, coworking copy changes, backend client contract, workflow coverage, and companion backend PR at commit Blocking findingThe Slack receipt dedupe can permanently discard a click before it reaches the new outbox.
That contradicts the stated “persist each verified click before returning 200” durability guarantee. The happy-path duplicate test does not cover either failure mode. Handle this action before the generic duplicate early-return, while still relying on the outbox idempotency key to deduplicate processing. If persistence fails for a valid action, return a non-2xx response so Slack can retry. Please add a regression where the first persistence attempt fails and the exact duplicate delivery succeeds and schedules one durable action, plus a case where the signed receipt already exists but the feature outbox row does not. Other review results
Dependencies and coordinationBackend PR #649 remains open and must be migrated/deployed first with the feature disabled. This branch also has documented overlap with open Roo PRs #209 and #225; whichever lands later must resolve those conflicts deliberately and retain both feature contracts. Conclusion: Not safe or ready to merge yet. Fix the receipt-to-outbox loss window, then coordinate the overlapping Roo changes and only roll out after backend #649 is deployed and verified. |
53f9208 to
2522862
Compare
|
Addressed Callum's receipt-to-outbox blocker in Fix
Fault-injection coverage
Validation
The local adversarial review skill was also strengthened with a mandatory multi-store handoff matrix and fault-injection gate; that personal skill change was not added to this repository. @callumholt could you please re-review the receipt/outbox handoff and retry coverage? |
|
Adversarial hardening update (ce25776):
Fresh adversarial state-machine review: no remaining blocker found in the reported paths. Source of truth remains the backend assignment; Roo completes only after observing a terminal backend result and delivering private feedback. Residual deployment constraint: local SQLite assumes a single shared Roo action-store volume/instance. Validation: 210 required Roo workflow tests passed; Python compilation and diff checks passed. Rollout order: deploy mlai-backend PR #649 first, deploy this PR with the switch off, then set |
PR re-reviewI reviewed the changes since the prior review, from Prior blocker: resolvedOffice Manager actions are now identified before the generic signed-receipt duplicate return. A missing feature outbox row is created even when the generic receipt already exists, persistence failure returns New blocking findingTransient backend failures repeatedly notify the same volunteer on every retry, indefinitely. For a retryable HTTP/transport failure, Persist a notification state/timestamp with the outbox and send the uncertainty notice only on the first uncertain attempt (or at a deliberately bounded cadence), while retries after that remain silent until a terminal success/failure message can be delivered. Add a clock-driven regression proving repeated transient failures do not create repeated Slack feedback. The default-off Other review results
Conclusion: Not ready to merge as a completed feature yet. The original receipt-to-outbox loss is fixed, but retry feedback must be deduplicated or bounded to prevent indefinite Slack notification spam. If the infrastructure is landed before that fix, |
|
@callumholt Addressed the repeated transient-notification blocker in Fix
Fault-injection coverage
Validation
Could you please re-review the one-time notice state and clock-driven retry coverage? |
PR re-reviewI reviewed the changes since my last review, from Prior blocker: resolvedThe uncertainty notice is now durably bounded to one attempt per action. A leased worker atomically records The failure semantics are deliberate and sound: recording the attempt before delivery closes the send-then-crash duplicate window; failure of this optional informational notice does not stop the durable backend retry; and cancellation during notice delivery is still propagated rather than swallowed. Verification
Conclusion: The code changes are safe and the prior merge blocker is fixed; this PR is ready to merge. Keep |
95a9732 to
a367bd8
Compare
|
Rebased PR #210 onto current The conflict came from the meeting-room PR merged on Validation on the rebased head:
The PR branch is now based directly on latest |
a367bd8 to
102d8d7
Compare
|
Rebased PR #210 onto latest Conflict resolution:
Validation on the combined tree:
@callumholt the code you previously marked ready is preserved, now combined with restored Meeting Room booking. Could you please re-check the conflict resolution when the fresh CI run finishes? |
Summary
200 OKMember flow
Members click Volunteer for today in Roo's announcement in the Cowork and Chill channel; they do not need to reply in the channel or thread. Roo durably records the click, then processes the backend claim asynchronously. The winning member receives private confirmation, while the backend updates the original request and posts a separate channel announcement tagging the Office Manager.
The backend announcement tells members using the space to book themselves with
@Roo book me in today. Roo does not give the Office Manager permission to book other people and does not expose a named attendance roster.The no-food reminder is scoped to the coworking and Office Manager experience. It is not shown to members posting introductions in Start Here.
Backend contract
The companion backend PR produces the Slack button. Contract tests in mlai-backend#649 verify:
office_manager_volunteer_todayvalue.dateis the Melbourne-local Office Manager date inYYYY-MM-DDformclaimedandalready_claimed_by_youalready_claimed,claim_closed,member_not_eligible, andoffice_manager_day_not_foundpoints_refundedremains present in successful claim responsesDependency and rollout
OFFICE_MANAGER_SLACK_BOT_TOKENto the Public Roo app's Bot User OAuth token. Do not use the Jobs or Admin Roo token.Validation
mainindependently reproduces the exact same 20 unrelated failures: 809 passed, 20 failedgit diff --checkpassedCoordination
roo/clients/mlai_backend.pyandroo/tests/test_mlai_backend_client.py; the executor and skill instructions auto-merge. Whichever PR lands second must retain both account-linking and Office Manager client methods/tests.roo/skills/executor.py;main.py, the workflow, and backend client auto-merge. Whichever PR lands second should retain the shared Slack action task helper and both feature formatters.Tracking