fix(agent-team): handle real slack_bolt event envelope + map thread replies; bind start invoker #26
No reviewers
Labels
No labels
app
bug
ci
compliance
content
dependencies
docs
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
infra
invalid
javascript
needs-triage
python
question
tests
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: adam/orchestrator#26
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/agent-team-slack-inbound-envelope"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Live R720 P1 bring-up exposed that the Socket Mode inbound listener was unit-tested against a synthetic payload shape that slack_bolt never sends, so the suite was green while a real free-text Slack reply was silently dropped (clarifier question stayed
open). Plus a CLI fix needed for the demo.Commit 1 — slack envelope + thread-reply mapping (
0f3c0fa)Real slack_bolt delivers Events API as
{"type":"event_callback","event":{"type":"message",...}}, and a free-text thread reply carries nocallback_id/question_id/metadata. Three breaks fixed:type(event_callback) → dropped. Now collapses to the innerevent.type(_discriminating_type/_inner_event).event.thread_tsagainst the OPEN ledger row whosechannel_refequals it (newfind_open_question_by_channel_ref, constrained tostatus='open'as anti-replay). Explicit id still wins.event.text(stripped), stored as opaque data.AUTHZ-01 unchanged and still runs FIRST (gates
event.user, fails closed). Mapping only resolves which question, never who may answer.Commit 2 — bind subscription invoker in
startCLI (ae5aa02)run-team.py startruns the clarifier graph (which calls Claude) in-process but never bound the invoker (onlyservedid) → "claude_invoke has no invoker bound". Now binds it, mirroringserve.Verification
/sh-security-review: PASS — detector fan-out (authz/injection/logic) returned zero findings; verifier had no candidates. Auth-first preserved, parameterized SQL,status='open'anti-replay, opaque-data answer, malformed-envelope guards.ruff check .+ruff format --check .clean;pytest(agent-team) 960 passed (+4 real-envelope regression tests replacing the synthetic fixtures).Non-blocking follow-ups (noted by the review)
KeyErrorin_question_turn/_question_threadnot caught by theValueErrorhandler (not attacker-reachable).channel_ref WHERE status='open'(collision prevented emergently by Slack ts uniqueness).