diff --git a/CHANGELOG.md b/CHANGELOG.md index e131b19..b98a961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Security and behavior changes -## Unreleased — targeted continuation and configurable review timeout +## 0.1.3 — targeted continuation and configurable review timeout - Default to 30 minutes of isolated execution; support trusted `review.timeout_minutes` and an authorized `--timeout` override. Bound execution by GitHub's six-hour job limit, retaining setup/refresh/cleanup reserves and the existing global inference-request cap. - Group changed JS/TS dependencies together within file, byte and changed-line bounds. Track per-file checkpoints, give every group a first pass before targeted continuation, reuse prior findings/evidence, and reserve time for final synthesis. Missing evidence or unfinished analysis still fails the job and cannot approve or merge. diff --git a/package-lock.json b/package-lock.json index d03ccff..635100d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "codexbot", - "version": "0.1.2", + "version": "0.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "codexbot", - "version": "0.1.2", + "version": "0.1.3", "license": "Apache-2.0", "dependencies": { "@octokit/rest": "22.0.1", diff --git a/package.json b/package.json index d64fc06..9373e9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codexbot", - "version": "0.1.2", + "version": "0.1.3", "private": true, "description": "Self-hostable GitHub App for isolated Codex pull request reviews", "license": "Apache-2.0", diff --git a/src/runner/engine.ts b/src/runner/engine.ts index 22abeb1..1713fba 100644 --- a/src/runner/engine.ts +++ b/src/runner/engine.ts @@ -49,7 +49,7 @@ export async function runCodex(snapshot: RequestSnapshot, manifest: string, plan const timeout=reviewTimeoutMs(snapshot),deadline=Date.now()+timeout; const timer = setTimeout(() => { timedOut = true; child.kill('SIGKILL'); }, timeout); try { - await rpc.request('initialize', { clientInfo: { name: 'CodexBot', title: 'CodexBot', version: '0.1.2' } }); + await rpc.request('initialize', { clientInfo: { name: 'CodexBot', title: 'CodexBot', version: '0.1.3' } }); rpc.notify('initialized'); const models: Record[] = []; let cursor: string | null = null; diff --git a/src/runner/proxy.ts b/src/runner/proxy.ts index a8a82e8..783b37f 100644 --- a/src/runner/proxy.ts +++ b/src/runner/proxy.ts @@ -128,7 +128,7 @@ export async function inferenceProxy(request: IncomingMessage, response: ServerR const accessToken=typeof token==='string'?token:await token(); requireCondition(accessToken.length>0&&accessToken.length<=20_000&&!/[\r\n]/.test(accessToken),'proxy_transport_failed'); const upstream = await fetcher('https://api.openai.com/v1/responses', { - method: 'POST', headers: { Authorization: 'Bearer '+accessToken, 'Content-Type': 'application/json', 'User-Agent': 'CodexBot/0.1.2', + method: 'POST', headers: { Authorization: 'Bearer '+accessToken, 'Content-Type': 'application/json', 'User-Agent': 'CodexBot/0.1.3', ...(typeof request.headers['originator'] === 'string' && request.headers['originator'] === 'CodexBot' ? { originator: 'CodexBot' } : {}) }, body: JSON.stringify(body), redirect: 'error', signal: AbortSignal.any([deadline, disconnected.signal]) }); diff --git a/src/worker/github.ts b/src/worker/github.ts index e2c0f1c..ef8c011 100644 --- a/src/worker/github.ts +++ b/src/worker/github.ts @@ -18,7 +18,7 @@ export async function appClient(env: GitHubCredentials): Promise { } export function client(token: string): Octokit { // Request errors can contain authorization headers: callers never log raw errors. - return new Octokit({ auth: token, log: { debug() {}, info() {}, warn() {}, error() {} }, request: { timeout: 20_000 }, userAgent: 'CodexBot/0.1.2' }); + return new Octokit({ auth: token, log: { debug() {}, info() {}, warn() {}, error() {} }, request: { timeout: 20_000 }, userAgent: 'CodexBot/0.1.3' }); } export async function installationClient(env: GitHubCredentials, installation: number, repositoryId: number, permissions: { contents?: 'read' | 'write'; pull_requests?: 'read' | 'write'; actions?: 'read' | 'write'; workflows?: 'write'; checks?: 'write'; administration?: 'read' }): Promise<{ github: Octokit; token: string }> { const app = await appClient(env); diff --git a/src/worker/index.ts b/src/worker/index.ts index 8bbf05e..35ff7ca 100644 --- a/src/worker/index.ts +++ b/src/worker/index.ts @@ -70,7 +70,7 @@ async function route(request: Request, env: Env): Promise { requireCondition(publicPage || url.origin === canonical, 'non_canonical_backend_origin', 421); const origin = request.headers.get('origin'); requireCondition(!origin || origin === canonical, 'cross_origin_request_denied', 403); - if (url.pathname === '/health' && request.method === 'GET') return Response.json({ status: 'ok', version: '0.1.2' }); + if (url.pathname === '/health' && request.method === 'GET') return Response.json({ status: 'ok', version: '0.1.3' }); if (url.pathname === '/' && request.method === 'GET') return onboarding(env); const web = await webRoute(request, env); if (web) return web; if (url.pathname === '/v1/workload/check' && request.method === 'POST') { diff --git a/tests/backend.test.ts b/tests/backend.test.ts index 9a18e10..1bde681 100644 --- a/tests/backend.test.ts +++ b/tests/backend.test.ts @@ -11,7 +11,7 @@ await test('hosted config, manifest and generated callers agree on Workers.dev w assert.equal(DEFAULT_BACKEND, 'https://codexbot.appsolves.workers.dev'); const config = JSON.parse(await readFile('wrangler.jsonc', 'utf8')); assert.equal(config.name, 'codexbot'); assert.equal(config.workers_dev, true); assert.equal(config.preview_urls, false); - assert.equal(config.vars.PUBLIC_URL, DEFAULT_BACKEND); assert.equal(config.vars.MERGE_DEPLOYMENT_AUTHORIZED, 'true'); + assert.equal(config.vars.PUBLIC_URL, DEFAULT_BACKEND); assert.equal(config.vars.MERGE_DEPLOYMENT_AUTHORIZED, 'false'); assert.equal(config.vars.TRUSTED_WORKFLOW, 'AppSolves/codexbot/.github/workflows/review.yml@439877953ca77ea6c43a4f6c69481e1509932f61'); assert.equal(config.vars.WEB_ENABLED,'false');assert.equal(config.vars.OPENAI_HOSTED_INFERENCE_AUTHORIZED,'false'); assert.equal(config.vars.ACCEPTANCE_USER_PER_DAY,'');assert.equal(config.vars.MERGE_ACCEPTANCE_REPOSITORY_ID,'');assert.equal(config.vars.MERGE_ACCEPTANCE_INSTALLATION_ID,''); diff --git a/wrangler.jsonc b/wrangler.jsonc index 9583366..69509e8 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -33,7 +33,7 @@ "GITHUB_APP_SLUG": "codexbot-review", "TRUSTED_WORKFLOW": "AppSolves/codexbot/.github/workflows/review.yml@439877953ca77ea6c43a4f6c69481e1509932f61", "CHATGPT_DEPLOYMENT_AUTHORIZED": "true", - "MERGE_DEPLOYMENT_AUTHORIZED": "true", + "MERGE_DEPLOYMENT_AUTHORIZED": "false", "MERGE_ACCEPTANCE_REPOSITORY_ID": "", "MERGE_ACCEPTANCE_INSTALLATION_ID": "", "ACCEPTANCE_USER_PER_DAY": "",