Skip to content

feat(chat): use current GitHub authorization in Chat Devbox - #298

Draft
zjy365 wants to merge 3 commits into
mainfrom
codex/chat-github-credentials
Draft

zjy365 wants to merge 3 commits into
mainfrom
codex/chat-github-credentials

Conversation

@zjy365

@zjy365 zjy365 commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Sync the verified user's GitHub OAuth token into Chat Devbox login shells as GH_TOKEN.
  • Configure git through gh auth setup-git and expose structured connection status diagnostics.
  • Redact GitHub tokens from command output and clear credentials from active runtimes on revoke.
  • Add retry/fencing, namespace isolation, identity-merge re-keying, migrations, tests, and ADR updates.

Validation

  • bun check
  • bun typecheck
  • git diff --check
  • Isolated targeted tests: 110 passing

Scope

The fixed-version gh installation in the Chat Devbox image is intentionally out of scope for this PR and will be handled separately.

Refs #42

zjy365 and others added 3 commits August 25, 2026 11:04
The Assistant had no way to discover the 215 curated Sealos templates: it
could emit a `template` source but not learn a valid `templateName`, and the
system prompt said nothing about choosing a Deployment Source. Asked to
deploy GLPI — which ships a curated template — it invented a Docker image
instead.

Add `searchDeployCatalog`, shaped like `loadSkill` (ranked index query, detail
on demand) and backed by the already-cached `listTemplateCatalog`. It degrades
to a tool-level error when the provider is unreachable so the turn survives.
Give the system prompt an explicit source-preference order and forbid
inventing an image name.

Unblock GitHub deployment from chat, and let a GitHub task exist without a
Deployment Credential Binding (ADR-0062). The runner already treated the
token as optional everywhere; only one throw required it. An unbound task
clones a public repository anonymously and deploys an already-published
image, which is the common case. Creation fast-fails a repository GitHub
positively refuses, and fails open on rate limits. The managed gateway prompt
tells the agent it cannot push, so an unsupported source build fails at
detection rather than after the image is built.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Materialize the verified user's OAuth credential at ensure-time, clean it up across active runtimes on revoke, and preserve lifecycle safety across retries and identity merges.

Refs #42
@zjy365

zjy365 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

先搁置,需要测试。完成测试并确认结果后,再继续推进评审与合并。

@zjy365
zjy365 marked this pull request as draft September 8, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant