Skip to content

Duplicate repo record for ProAgentStore/platform is stuck in cloning, and the session attached to it runs unguarded because the platform sends no repository scope for a record with no GitHub coordinates #760

Description

@proagentstore

What is wrong

Two repo records point at the same GitHub repository:

record state workdir
pags/platform ready ~/dev/stores/pags/platform
ProAgentStore/platform (repo_2b2657fb-31e5-48a4-99f3-147fffde0925) cloning

The second has been stuck in cloning and never resolved GitHub coordinates.

Why it is more than untidy

The guard report shows 1 of 2 tracked sessions guarded. The unguarded one is the session attached to the stuck record: because that record carries no GitHub coordinates, the platform sends no repository scope for it, and the guard has nothing to enforce against.

That is a containment gap, not a cosmetic duplicate. A gh write outside the intended scope is not refused before it runs — on the repository that hosts the coder that repairs this platform. #679 (closed) scoped the engine's git and gh credentials so a wrong-repo write fails rather than being reported afterwards; a record with no coordinates appears to route around that, since there is no scope to apply. #676 covers the same asymmetry from the credential side.

This is also the exact failure mode that produced misfiled PR #675 — work pushed to the wrong repository from an instance registered elsewhere.

Asks

  1. Fail closed when scope is unavailable. A session whose repo record yields no repository scope should be refused or run with writes disabled, never run unguarded. Absence of scope must not read as absence of restriction.
  2. Surface unguarded sessions. The guard count (1 of 2) is currently only visible if you go looking. An unguarded session should be an error condition, not a ratio in a diagnostic.
  3. Reconcile duplicate repo records. Two records for one GitHub repo should be detected at creation. Decide whether to merge or reject, and clear records wedged in cloning with no coordinates after a timeout rather than leaving them attachable.
  4. Remove or repair repo_2b2657fb-31e5-48a4-99f3-147fffde0925 specifically; pags/platform is the correct record.

Related: #679, #676, #684 (runner identity resolving to a deploy key over SSH).

Activity

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