Repository navigation
Fix work-queue tool transport and smoke failure detection #65360
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 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,7 +77,7 @@ function createWorkQueueStateTool(snapshot) { | |
| }, | ||
| handler: args => { | ||
| console.error("[work-queue] Reading queue snapshot"); | ||
| return readWorkQueueState(snapshot, args); | ||
| return { content: [{ type: "text", text: JSON.stringify(readWorkQueueState(snapshot, args)) }] }; | ||
| }, | ||
| }; | ||
| } | ||
|
|
@@ -103,10 +103,16 @@ function createWorkQueueFinishTool(options = {}) { | |
| if (!["completed", "cancelled"].includes(outcome)) { | ||
| throw new TypeError("outcome must be completed or cancelled"); | ||
| } | ||
| fs.mkdirSync(path.dirname(outputPath), { recursive: true }); | ||
| fs.appendFileSync(outputPath, `${JSON.stringify({ outcome })}\n`, { encoding: "utf8", mode: 0o600 }); | ||
| try { | ||
| fs.mkdirSync(path.dirname(outputPath), { recursive: true }); | ||
| fs.appendFileSync(outputPath, `${JSON.stringify({ outcome })}\n`, { encoding: "utf8", mode: 0o644 }); | ||
|
Contributor
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. [/diagnosing-bugs] The 💡 Why this mattersVerified locally: calling Suggest dropping the @copilot please address this. |
||
| // The MCP container and runner artifact collector can run as different users. | ||
| fs.chmodSync(outputPath, 0o644); | ||
| } catch (error) { | ||
| throw new Error("Failed to record work queue finish intent", { cause: error }); | ||
| } | ||
| console.error(`[work-queue] Recorded ${outcome} finish intent`); | ||
| return { recorded: true, outcome }; | ||
| return { content: [{ type: "text", text: JSON.stringify({ recorded: true, outcome }) }] }; | ||
| }, | ||
| }; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.