GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(core): delegate credential activation by kitlangton · Pull Request #45692 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Why
Integration credential activation currently duplicates credential lookup and active-selection reconstruction before calling the credential service. That creates a second implementation of missing-ID and idempotence behavior outside the transaction that owns activation ordering and switch events.

What Changes
Integration.connection.activate remains the named Integration facade but now delegates directly to Credential.activate.

Case Result
Missing credential ID No-op
Already active credential No-op
Inactive credential Transactionally activates it and publishes one switch event

Environment precedence, connection projection, credential ordering, event publication, and the HTTP-facing Integration contract remain unchanged.

Scope
This PR only removes redundant activation logic from the Integration facade. It does not change credential persistence, Integration locking/state reads, events, or API schemas.

Verification

cd packages/core
bun run test test/credential.test.ts
bun run test test/integration.test.ts -t "projects credential and env connections"
bun typecheck
cd ../..
bunx prettier --check packages/core/src/integration.ts
bunx oxlint packages/core/src/integration.ts
bunx ast-grep scan -c script/ast-grep/sgconfig.yml packages/core/src/integration.ts
bunx ast-grep scan -c script/ast-grep/effect-simplifications/sgconfig.yml --off=unused-suppression packages/core/src/integration.ts
git diff --check origin/v2...HEAD

All four credential tests and the focused Integration projection/activation test pass. Core typechecking and the pre-push workspace typecheck pass; formatting and both scoped scans are clean. Oxlint completes with existing warnings outside the changed line.

A broader combined credential/Integration run completed 16 tests and timed out only in the unrelated command-authentication polling test; that path was not retried or changed here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kitlangton
refactor(core): delegate credential activation
9a8154f
@github-actions github-actions Bot added the contributor label Aug 27, 2026
@kitlangton kitlangton mentioned this pull request Aug 27, 2026
refactor(core): express operation policies as transforms #45713
Merged
@kitlangton
kitlangton merged commit 62d9aa9 into v2 Aug 27, 2026
10 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kitlangton
kitlangton deleted the credential-activation branch August 27, 2026 23:39
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
@kitlangton
refactor(core): delegate credential activation (anomalyco#45692)
1070499
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kitlangton
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.