Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Operator rules now fire on the Slack path as well as the API path.
RAGEngine.submit_slackchecks the rule engine before retrieval, and a matched question is submitted to Pi Durable carrying the pinned answer inoperator_answer. The Pi worker delivers that answer through the existing job outbox without calling the model, so Slack delivery stays durable, retried, and idempotent instead of gaining a second posting path in the bot. Reusing a request id with a different pinned answer is now a conflicting reuse, and the runtime rejects a non-stringoperator_answer.Part of #6
Closes #19
How it was verified
mise run install- runtime and frontend installed cleanly. The backend needed the worktree venv recreated with the mise-pinned Python 3.13, because the default Python 3.14 cannot install onnxruntime. No lockfile change was kept.mise run test-backend- 59 passed, including the 2 new tests inbackend/tests/test_rules.py(TestSlackShortCircuit). The new matched-path test was watched failing before the fix withAssertionError: retrieval must not run.mise run test-runtime- 7 passed, including the new testpinned operator answer is delivered without calling the model. It was also watched failing before the fix.mise run test-frontend- passed (the repo task currently reports no frontend tests yet).backend/tests/test_conversations.py. The log showed "Starting Wingman backend..." and "Database initialized", andGET /healthreturned 200. A plain start with a fake token fails at Slackauth.testonmainas well, so nothing here changes that.Proof
Capture method (a) and (c) succeeded offline. Nothing connected to a live Slack workspace, and no Socket Mode was run.
Backend, matched Slack question with retrieval rigged to fail if it runs:
Runtime, same payload shape through the job outbox with a model callback that throws if called:
Reviewer notes