-
Notifications
You must be signed in to change notification settings - Fork 296
Fix Factory fallback tool use IDs #942
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 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
969fc00
test: add factory worker hook regression e2e
gtrrz-victor 36fa16f
fix: handle factory worker hook payloads
gtrrz-victor 49ffb48
Fix Factory fallback tool use IDs
gtrrz-victor e5ffb95
fix: resolve lint and architecture test violations in factoryaidroid
gtrrz-victor aa9fdd0
fix: use bytes-based null check in parseHookToolResponseAgentID
gtrrz-victor 58cc949
Merge branch 'main' into fix-factory-tool-use-hooks
gtrrz-victor 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| //go:build e2e | ||
|
|
||
| package tests | ||
|
|
||
| import ( | ||
| "context" | ||
| "testing" | ||
| "time" | ||
|
|
||
| "github.com/entireio/cli/e2e/testutil" | ||
| ) | ||
|
|
||
| func TestFactoryTaskHooksDoNotFail(t *testing.T) { | ||
| testutil.ForEachAgent(t, 3*time.Minute, func(t *testing.T, s *testutil.RepoState, ctx context.Context) { | ||
| if s.Agent.Name() != "factoryai-droid" { | ||
| t.Skip("factory-only regression test") | ||
| } | ||
|
|
||
| session := s.StartSession(t, ctx) | ||
| if session == nil { | ||
| t.Skip("factoryai-droid does not support interactive mode") | ||
| } | ||
|
|
||
| s.WaitFor(t, session, s.Agent.PromptPattern(), 30*time.Second) | ||
| s.Send(t, session, | ||
| "Can you run a Worker that inspects this code and comes up with a short summary about what it is about? Have the Worker write that summary to docs/factory-hook-check.md as one short paragraph followed by exactly 3 bullet points. Do not create or edit the file in the main agent process. Only the Worker should write the file. Do not commit. Do not ask for confirmation.") | ||
| s.WaitFor(t, session, s.Agent.PromptPattern(), 90*time.Second) | ||
|
|
||
| testutil.WaitForFileExists(t, s.Dir, "docs/factory-hook-check.md", 10*time.Second) | ||
| testutil.AssertConsoleLogDoesNotContain(t, s, | ||
| "tool_use_id is required", | ||
| "failed to parse hook event", | ||
| "postToolHookInputRaw.tool_response", | ||
| ) | ||
| }) | ||
| } |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.