(prs: PR[], applied: number[])
| 189 | } |
| 190 | |
| 191 | async function smoke(prs: PR[], applied: number[]) { |
| 192 | console.log("\nRunning final smoke check...") |
| 193 | |
| 194 | if (await validate()) return commitSmokeChanges() |
| 195 | |
| 196 | console.log("\nTrying to fix final smoke check with opencode...") |
| 197 | |
| 198 | const done = lines(prs.filter((x) => applied.includes(x.number))) |
| 199 | const prompt = [ |
| 200 | "The beta merge batch is complete, but the deterministic final smoke check failed.", |
| 201 | `Merged PRs on HEAD:\n${done}`, |
| 202 | "Run `bun typecheck` at the repo root.", |
| 203 | "Run `./script/build.ts --single` in `packages/opencode`.", |
| 204 | "Fix any merge-caused issues until both commands pass.", |
| 205 | "Do not create a commit.", |
| 206 | ].join("\n") |
| 207 | |
| 208 | try { |
| 209 | await $`opencode run -m ${model} ${prompt}` |
| 210 | } catch (err) { |
| 211 | console.log(`Smoke fix failed: ${err}`) |
| 212 | return false |
| 213 | } |
| 214 | |
| 215 | if (!(await validate())) return false |
| 216 | return commitSmokeChanges() |
| 217 | } |
| 218 | |
| 219 | async function main() { |
| 220 | console.log("Fetching open PRs with beta label...") |
no test coverage detected