-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(integration): use lenient assertion and harden poll in interactive file-system test #7113
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
Changes from all commits
3e8396b
e6f3a23
7ccdc51
d99eac3
0065e8d
580272b
51f75dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -544,20 +544,34 @@ export class TestRig { | |||||||||||||||||||||||||||||||||||||||||||
| ): Promise<boolean> { | ||||||||||||||||||||||||||||||||||||||||||||
| const startTime = Date.now(); | ||||||||||||||||||||||||||||||||||||||||||||
| let attempts = 0; | ||||||||||||||||||||||||||||||||||||||||||||
| let lastError: unknown; | ||||||||||||||||||||||||||||||||||||||||||||
| while (Date.now() - startTime < timeout) { | ||||||||||||||||||||||||||||||||||||||||||||
| attempts++; | ||||||||||||||||||||||||||||||||||||||||||||
| const result = predicate(); | ||||||||||||||||||||||||||||||||||||||||||||
| if (env['VERBOSE'] === 'true' && attempts % 5 === 0) { | ||||||||||||||||||||||||||||||||||||||||||||
| console.log( | ||||||||||||||||||||||||||||||||||||||||||||
| `Poll attempt ${attempts}: ${result ? 'success' : 'waiting...'}`, | ||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| if (result) { | ||||||||||||||||||||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||||
| const result = predicate(); | ||||||||||||||||||||||||||||||||||||||||||||
| if (env['VERBOSE'] === 'true' && attempts % 5 === 0) { | ||||||||||||||||||||||||||||||||||||||||||||
| console.log( | ||||||||||||||||||||||||||||||||||||||||||||
| `Poll attempt ${attempts}: ${result ? 'success' : 'waiting...'}`, | ||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| if (result) { | ||||||||||||||||||||||||||||||||||||||||||||
| lastError = undefined; | ||||||||||||||||||||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+550
to
+560
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion]
Suggested change
— qwen3.7-max via Qwen Code /review |
||||||||||||||||||||||||||||||||||||||||||||
| } catch (err) { | ||||||||||||||||||||||||||||||||||||||||||||
| lastError = err; | ||||||||||||||||||||||||||||||||||||||||||||
| if (env['VERBOSE'] === 'true') { | ||||||||||||||||||||||||||||||||||||||||||||
| console.log(`Poll attempt ${attempts}: predicate threw: ${err}`); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+561
to
+565
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The blanket try/catch in
Suggested change
Track the last caught exception and log it unconditionally when poll times out. Add — qwen3.7-max via Qwen Code /review |
||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| await new Promise((resolve) => setTimeout(resolve, interval)); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| if (env['VERBOSE'] === 'true') { | ||||||||||||||||||||||||||||||||||||||||||||
| if (lastError) { | ||||||||||||||||||||||||||||||||||||||||||||
| console.log( | ||||||||||||||||||||||||||||||||||||||||||||
| `Poll timed out after ${attempts} attempts. Last error:`, | ||||||||||||||||||||||||||||||||||||||||||||
| lastError, | ||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||
| } else if (env['VERBOSE'] === 'true') { | ||||||||||||||||||||||||||||||||||||||||||||
| console.log(`Poll timed out after ${attempts} attempts`); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
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.
[Critical] Issue fidelity: PR claims to fix #7111, but the CI run documented in that issue (run 29578497397) shows
file-system-interactive.test.tsPASSED (1 test, 14516ms). The only failing test in that run waschannel-plugin.test.ts→should maintain session state across multiple WebSocket messages, which failed because the word "secret" triggered the model's safety alignment (expected 'i cannot reveal your secret word. for…' to contain 'pineapple'). This PR does not touchchannel-plugin.test.ts. — Failure scenario: merging this PR closes #7111 via theFixeskeyword, but the actual root cause — the "secret word" safety-guardrail trigger inchannel-plugin.test.ts— remains unfixed. The next CI run onmainwill still fail onchannel-plugin.test.ts, and the issue will appear resolved when it is not.— qwen3.7-max via Qwen Code /review