Skip to content

Do not treat every channel reply as approval success - #18

Open
padmanabh275 wants to merge 1 commit into
theschoolofai:mainfrom
padmanabh275:fix/channel-approval-must-match-choices
Open

padmanabh275 wants to merge 1 commit into
theschoolofai:mainfrom
padmanabh275:fix/channel-approval-must-match-choices

Conversation

@padmanabh275

Copy link
Copy Markdown

Summary

  • After request_approval parked with Choices: yes, no, any later message in the same channel thread called complete_waiting with success=True. no and unrelated text both authorised the gated action.
  • The UI path already maps reject to success=False. Channel HITL did not.
  • Channel resume now matches listed choices (casefold). no / reject / deny / cancel fail the gate. Unmatched or blank text leaves the wait handle in place so the message is a new request. Empty choices still accepts a non-empty free-text answer.

Test plan

  • test_a_no_does_not_succeed_a_waiting_channel_approval failed before (succeeded vs failed) and passes after.
  • test_unrelated_text_does_not_consume_a_waiting_channel_approval failed before (wait consumed) and passes after.
  • test_a_reply_in_the_same_channel_thread_resumes_a_waiting_approval still passes for yes.
  • pytest tests/test_channel_connections.py: 9 passed.

No .env, tokens, real messages, or API keys in this diff.

@theschoolofai

Copy link
Copy Markdown
Owner

Session 16 — graded ✅

Score: +100.

Every channel reply was treated as approval success, so an unrelated message could carry a run past a human gate. Exactly the failure Part 1 asks the assistant to prove it does not have.

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.

2 participants