diff --git a/README.md b/README.md index 1b7d9cd..465e22f 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,11 @@ Set `bot.trigger: "@CBReview"` to use the example above. The legacy default `@co ## Status -**Release acceptance in progress.** The existing production review pipeline is operational. The browser onboarding and management flow is implemented and tested locally against real workerd/D1 with synthetic GitHub/OpenAI providers. It remains disabled until the operator provisions the actual approved website OAuth client, callbacks, inference scopes and workspace claim, then completes staged acceptance. No production deployment follows from a PR or local test. +**CLI release acceptance in progress.** Real complete COMMENT and inline advisory reviews, native APPROVE, high-confidence REQUEST_CHANGES, token rotation and an exact-head autonomous App merge without human approval have been verified. Final unattended-contributor and Human-in-the-Loop live acceptance is still pending; no public release is claimed yet. -See [web onboarding, credentials and activation](docs/web-onboarding.md) for the explicit hosted credential trust boundary and remaining live gates. AI reviews can miss defects; keep required CI and choose human oversight according to repository policy. Automatic merging remains disabled. +Browser ChatGPT onboarding is intentionally deferred and is **not a release blocker**. Keep `WEB_ENABLED=false` and `OPENAI_HOSTED_INFERENCE_AUTHORIZED=false`. Installation redirects lead to the CLI instructions; no website OAuth client is needed for the approved existing CLI connection. Reviews and merges then run without an ongoing CLI process. See [configuration](docs/configuration.md) for explicit repository-owner credential assignment and the two merge modes. + +AI reviews can miss defects. GitHub protections, required CI, separate merge authorization and repository opt-in always apply. The global merge gate stays closed during final acceptance; live merge tests are restricted to the exact disposable repository and installation. ## What is implemented @@ -54,10 +56,10 @@ npm run check ```sh npm run cli -- setup --repository OWNER/REPO --backend https://codexbot.appsolves.workers.dev \ - --source AppSolves/codexbot --ref 4ed668864cac0682e09ec49a2515a6e1893a2780 + --source AppSolves/codexbot --ref FULL_TRUSTED_WORKFLOW_SHA ``` -The source must match the Worker's trusted reusable workflow. If you prefer a temporary personal setup token to granting the App Workflows write, add `--setup-as-user`; the user credential needs Contents/Pull requests/Workflows write. No files are overwritten. See [manual setup](docs/installation.md). +Use the full 40-character revision from the operator’s deployed `TRUSTED_WORKFLOW` (the published deployment configuration records it). The source must match the Worker's trusted reusable workflow. If you prefer a temporary personal setup token to granting the App Workflows write, add `--setup-as-user`; the user credential needs Contents/Pull requests/Workflows write. No files are overwritten. See [manual setup](docs/installation.md). 4. Choose authentication: @@ -103,4 +105,4 @@ AI review can miss defects and is vulnerable to semantic prompt manipulation. Is See [the per-finding matrix](docs/remediation.md), [changelog](CHANGELOG.md), [migration/recovery runbook](docs/operations.md) and [live acceptance](docs/acceptance.md). Durable outbox/publication recovery, installation-bound session encryption, required-first context and deterministic output quarantine are implemented and locally tested. Existing OAuth sessions require reconnect after migration 0002. -Both hosted ChatGPT eligibility and actual provider/GitHub acceptance remain external gates. MERGE_DEPLOYMENT_AUTHORIZED defaults false independently of repository policy. Initial smoke is advisory/no-merge. Private GitHub Free repositories lack the supported credential Environment path; merge queues are manual-only. No deployment or paid inference is performed by local checks. +The approved CLI ChatGPT deployment is supported independently of the deferred website registration. New self-hosted operators must establish their own applicable authorization and acceptance. The merge deployment gate is independent of repository policy; verify the exact deployed settings and start new installations with advisory/no-merge acceptance. Private GitHub Free repositories lack the supported credential Environment path; merge queues are manual-only. No deployment or paid inference is performed by local checks. diff --git a/docs/installation.md b/docs/installation.md index 9822bfc..d88c785 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,6 +1,6 @@ # Repository installation and CLI provisioning -This release uses the CLI once for credential provisioning. Install/select the GitHub App, protect the default branch, create and merge the workflow/configuration setup PR, then connect ChatGPT using the commands below. Ongoing automatic reviews and merges run on GitHub Actions without a running CLI or personal machine. Browser OAuth is deferred; WEB_ENABLED and OPENAI_HOSTED_INFERENCE_AUTHORIZED remain false until the separate website client is provisioned. +This release uses the CLI once for credential provisioning. Install/select the GitHub App, protect the default branch, create and merge the workflow/configuration setup PR, then connect ChatGPT using the commands below. Ongoing automatic reviews and merges run on GitHub Actions without a running CLI or personal machine. With browser onboarding disabled, the GitHub App installation callback at `/dashboard` redirects to the canonical public CLI setup landing page; callback query values never authorize configuration. Browser OAuth is deferred; WEB_ENABLED and OPENAI_HOSTED_INFERENCE_AUTHORIZED remain false until the separate website client is provisioned. The hosted backend and CLI default is `https://codexbot.appsolves.workers.dev`. Self-hosted operators supply their own `--backend` and source pin. Existing ChatGPT connections must follow the [origin cutover and reconnect procedure](origin-migration.md) before using this new origin; they are not transferable ciphertext. diff --git a/src/worker/web.ts b/src/worker/web.ts index 1be11bb..984b6f4 100644 --- a/src/worker/web.ts +++ b/src/worker/web.ts @@ -40,6 +40,7 @@ export async function webRoute(request: Request, env: WebConfig): Promise

Connection needs attention.

Sign-in or credential provisioning could not finish. No approval or inference was authorized. Return to the repository to resume pending provisioning, or start sign-in again.

Return to dashboard'); diff --git a/tests/web-auth.test.ts b/tests/web-auth.test.ts index 13d35af..7c532c7 100644 --- a/tests/web-auth.test.ts +++ b/tests/web-auth.test.ts @@ -163,6 +163,8 @@ await test('identity-only website OAuth cannot activate inference and web remain assert.throws(() => websiteOAuth({ ...f.env, OPENAI_HOSTED_INFERENCE_AUTHORIZED: 'true', OPENAI_WEB_CLIENT_ID:'oaiapp_test', OPENAI_WEB_AUTH_METHOD:'none', OPENAI_WEB_SCOPES:'openid email profile' }), /inference_scopes/); const disabled = await worker.fetch(new Request('https://web.invalid/auth/github'), { ...f.env, WEB_ENABLED:'false' } as Env); assert.equal(disabled.status, 503); assert.ok(!(await disabled.text()).includes(f.env.GITHUB_CLIENT_SECRET!)); + const cliLanding=await worker.fetch(new Request('https://web.invalid/dashboard?installation_id=untrusted&next=https://evil.invalid'),{...f.env,WEB_ENABLED:'false'} as Env);assert.equal(cliLanding.status,303);assert.equal(cliLanding.headers.get('location'),'/'); + assert.equal((await worker.fetch(new Request('https://web.invalid/dashboard',{method:'POST'}),{...f.env,WEB_ENABLED:'false'} as Env)).status,503); const missing = await worker.fetch(new Request('https://web.invalid/dashboard'), f.env as Env); assert.equal(missing.status, 401); } finally { f.close(); } });