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 — fix(core): a failed Console reload drops the policy refusal, re-enabling a refused instance's catalog copy · Issue #375 · developing-today-forks/opencode

fix(core): a failed Console reload drops the policy refusal, re-enabling a refused instance's catalog copy #375

New issue
Copy link
New issue
Copy link
Closed
#377
Closed
fix(core): a failed Console reload drops the policy refusal, re-enabling a refused instance's catalog copy#375
#377
Copy link

Description

@dezren39
dezren39
opened on Oct 24, 2026
Issue body actions

Finding

PR #373 (merged, merge commit be06d5d) refuses a Console instance whose organization sends policies: load() in packages/core/src/plugin/provider/opencode.ts returns { ...next, config: undefined, mcp: undefined, refused: true } (line 253 on current main), and the provider transform disables that instance's own catalog copy only while snapshot.refused is set (line 376):

if (snapshot.refused && providers.get(ids.providerID))
  providers.update(ids.providerID, (provider) => {
    provider.activation = "disabled"
  })

That refusal does not survive a failed reload. load()'s error fallback (line 267) rebuilds the snapshot from the previous one but drops the flag:

return IntegrationConnection.key(connection) === IntegrationConnection.key(snapshot.connection)
  ? { config: snapshot.config, connection, organization: snapshot.organization, mcp: snapshot.mcp }
  : { config: undefined, connection, organization: undefined, mcp: undefined }

check() re-runs load() every minute (line 536) and on inference 401/403, and apply() (line 483) replaces the snapshot and reloads providers whenever it differs — and a snapshot with refused: true differs from one without it. So one transient Console fetch failure (network error, 5xx, malformed body) for the same connection re-runs the provider transforms with snapshot.refused === undefined, the disable at line 376 no longer applies, and the refused instance's catalog copy (opencode.work, added by ProviderInstancePlugin) becomes available again — serving that organization without its policies, exactly the outcome commit 5840b5b ("fix(core): disable a refused Console instance's own catalog copy") was added to prevent. The next successful load re-refuses it, so the exposure window is from the first failed load until the next successful one, and it reopens on every later failure.

Why it matters

The policy refusal is a security boundary: ManagedPolicy holds one organization's statements, so a second org's providers must never run unenforced (PR #373 body). A routine network blip silently lifts that boundary for the refused account's own catalog copy, with no status change the user would notice (the connection status stays whatever it was unless the error is a well-formed Console error).

Evidence

  • PR: feat(core): use several accounts of one provider at once with instanceOf #373 (commits d242325, 3874ddf, 5840b5b)
  • packages/core/src/plugin/provider/opencode.ts:253 — refusal sets refused: true
  • packages/core/src/plugin/provider/opencode.ts:267 — same-connection failure fallback omits refused
  • packages/core/src/plugin/provider/opencode.ts:376 — catalog copy disabled only when snapshot.refused
  • packages/core/src/plugin/provider/opencode.ts:483,536 — apply() on any snapshot difference; check() every minute
  • Existing test provider-opencode.test.ts "refuses a second Console account whose organization sends policies" covers only the initial refusal; no test fails a subsequent load.

Acceptance criteria

  • The same-connection failure fallback in load() preserves refused from the previous snapshot (or the refusal is otherwise stable across failed reloads).
  • A regression test extends the refusal scenario: after the initial refusal, a failing Console fetch for the same connection leaves opencode.work unavailable (providers.available() still excludes it) and the integration status still needs_auth.
  • Behavior for the main connection is unchanged: a failed load still keeps its last config so organization policy is not lifted.

Activity

  1. dezren39
    closed this as completedin #377on Oct 24, 2026
  2. dezren39
    added a commit that references this issue on Oct 24, 2026

    docs(roadmap): record the #375 completion in Done (#380) (#381)

    e163328
  3. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 24, 2026 – with developing.today fleet
    More actions

    AUDIT-7 Lane 2 slice 3 — closing evidence. Verified against the issue body and merged implementation PR(s):

    • PR #377 — fix(core): keep a Console instance's policy refusal across failed reloads (merged 2026-10-24)

    The issue had zero comments in the fresh pre-action read; this comment records the missing close evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.