Skip to content

feat: secure browser onboarding and bounded review context - #19

Merged
AppSolves merged 1 commit into
mainfrom
feat/review-context-and-web-onboarding
Nov 14, 2026
Merged

AppSolves merged 1 commit into
mainfrom
feat/review-context-and-web-onboarding

Conversation

@AppSolves

Copy link
Copy Markdown
Owner

Adds browser onboarding and connection management behind WEB_ENABLED=false, together with bounded review-context exploration and clearer native review summaries. Existing CLI connections, OIDC/workflow identity checks, isolated Docker execution, tenant authorization, quotas and non-approving fallback publication are retained.

Implemented flow: GitHub OAuth with PKCE and browser-bound state, native installation/repository reconciliation, administrator/capability checks, protected Environments, idempotent setup/configuration PRs, registered-client ChatGPT OAuth, encrypted credential provisioning/recovery, API-key connection, reconnect/disconnect and live readiness. Configuration proposals preserve existing YAML comments and unchanged workflows.

Security-sensitive decisions:

  • Hosted web sessions introduce an explicit operator decryption capability: D1 stores encrypted hosted vault records under a separate Worker master key. Existing CLI vaults are unchanged and cannot be silently migrated. Activation requires the actual approved website client, callback, scopes and signed workspace contract; no registration is invented.
  • Provisioning and refresh use owner-fenced SQL writes, unique provisioning identifiers and version CAS. An uncertain refresh requires reconnect. Tests simulate lease takeover immediately before persistence and an accepted secret write with a lost response.
  • Automatic traces are disabled to keep callback codes out of URL telemetry; structured safe logs remain active. Browser mutations require exact Origin and CSRF, with secure HttpOnly cookies and no browser token storage.
  • On-demand context retains the narrowly scoped read token until bounded immutable lookups finish, then revokes it. The reviewer still has no credentials, network, write mounts or privileged client tools.

Validation: npm run check passes all 170 tests (zero skipped), typecheck, lint and build. Clean-checkout npm ci/check, actual workerd/D1, Chromium onboarding, pinned model catalog, Actionlint, npm audit (zero vulnerabilities), Docker build and actual pinned Codex synthetic-provider isolation tests pass. Trivy reports no High/Critical vulnerabilities; Wrangler dry-run passes. Scripted provider tests establish protocol/tool execution, not new live AI quality or website-provider acceptance.

Rollout requires additive migration 0004_web_onboarding.sql, actual registered OAuth values/secrets and native installer consent for setup permissions. Keep browser activation and automatic merge disabled until operator acceptance. After this source PR is normally merged, scripts/prepare-pin-upgrade.mjs --source-pr NUMBER --caller OWNER/REPOSITORY derives the actual merge SHA and prepares the coordinated Worker/test and caller pin PRs. Existing pins are deliberately unchanged here; no guessed SHA or mutable reference is introduced.

See docs/web-onboarding.md for the threat boundary, configuration, acceptance matrix and activation/rollback procedure; docs/adaptive-context.md for context limits and opt-in quality evaluation. No production deployment, migration, settings/secret/session changes, real inference or PR merge was performed.

@AppSolves
AppSolves merged commit bb9a701 into main Nov 14, 2026
4 checks passed
@AppSolves
AppSolves deleted the feat/review-context-and-web-onboarding branch November 14, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant