Repository navigation
[AI-3408] Guardrail context: no late tool results or envelopes #2153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7a8f61d
WIP guardrail conversation: drop router-written messages, unwrap Auth…
kanat 92bc590
WIP guardrail conversation tests
kanat 9565f49
WIP docs: question keeps its clause, sdk note, regenerated clients, c…
kanat 39923ef
Merge remote-tracking branch 'origin/main' into guardrail/context-lat…
kanat 55eb883
AI-3408: Episode cards are the router's words, not the person's
kanat 23b4d82
AI-3408: Test the held time with the verdict already in, not by a race
kanat c87455b
AI-3408: Read a line of caller-kept history as a name and words
kanat 5db17e1
Merge origin/main into guardrail/context-late-tool-results
kanat 4cb38b4
AI-3408: Merge origin/main into guardrail/context-late-tool-results
kanat f52f600
AI-3408: Pin the quoted shape of kept history (Supplied)
kanat 87cebee
AI-3408: Put each card test under its own comment
kanat bb69ed1
Merge remote-tracking branch 'origin/main' into guardrail/context-lat…
kanat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Should fix] R1.1 The same kind of message still gets through on another path. The person's episode cards are router-written like the compaction summary. They are a
usermessage{"episodes":[…]}behindcardsAttribution(internal/omnichannel/read.go:585) and have noRouterflag.RestoreHistoryputs them in the history (session/manager.go:978, branches.go:721), so a carded session's first turn is screened with the summary of earlier episodes as the caller's words. That turn should have no conversation at all. Probe (head and base):RestoreHistory(cards)+SimpleResponse("hi again")→ conversations["user: {\"episodes\":[{\"source\":\"call\",…,\"summary\":\"Looked up order 12: the card on file ends in 4242.\"}]}"].Fix: set
Router: trueon read.go:585, and list it in thellm.Message.Routercomment, the CHANGELOG line and the PR table. Ready row (omnichannelReadSuite):handed := render([]told{{Source: "call", Status: "summarized", StartedAt: s.start.Add(time.Hour), Summary: "Looked up order 12"}}); s.Require().Len(handed, 2); s.True(handed[1].Router). It fails on this head and passes with the one-line fix;ReadSuitepasses with the fix.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 55eb883:
TestTheCardsAreNotSaidByThePerson(omnichannel ReadSuite). The cards message is nowRouter: true; with it removed the test fails ("the cards reach a guardrail's conversation as the person's words"). I swept everyRole: llm.Usermessage again: no other router-written one reachesa.history.