Skip to content

Review backlog (style): Permission cache mutex held across the GitHub API call #14313

Closed

Description

@hivecommons-hive

Blocked on PR #14304. This finding came from reviewing PR #14304 and is about code that PR is changing. Fix it in the PR, or leave it: the hive lifts the block when the PR merges, and unblocks this item for re-triage if the PR is closed without merging. Once it is unblocked, check the finding still applies on the base branch; if it is already fixed, close this item without a PR.

Filed from an out-of-scope finding in the Hive review of PR #14304.

PR: #14304 (#14304)
Perspective: style
Severity: info (P3)
Evidence: src/pkg/github/automerge/automerge_contributor_adopt.go:558 (

if entry, ok := c.adoptionPermissions[key]; ok && now.Before(entry.expires) {
)
Finding: Permission cache mutex held across the GitHub API call

adoptionAuthorPermission locks adoptionPermissionsMu for the whole function including Repositories.GetPermissionLevel, so any concurrent caller serializes on the network round-trip. Harmless while the sweep is single-threaded, but differs from the map-access-only locking of the other Engine caches; narrow the critical section if lookups ever run concurrently.

Fingerprint: 9565fd2c846ccbb4ae06afdc4d46668618db2fc0a10ed30bbe6960886af8f2ee

filed by Hive review backlog

Activity

  1. added
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Oct 25, 2026
  2. hivecommons-hive commented on Oct 25, 2026

    @hivecommons-hive
    ContributorAuthor

    Same file as #14311: both cite src/pkg/github/automerge/automerge_contributor_adopt.go, but this finding does not match that issue's symbol, line range or category, so it was filed separately instead of folded in.

    filed by Hive review backlog

  3. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 25, 2026
  4. removed
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 25, 2026
  5. clubanderson commented on Oct 26, 2026

    @clubanderson
    Member

    Fix in #14304 (decision posted there: lock around map access only, not the API call).

  6. hivecommons-hive commented on Oct 26, 2026

    @hivecommons-hive
    ContributorAuthor

    Re-targeted: blocker #14304 was superseded by #14320.

  7. hivecommons-hive commented on Oct 26, 2026

    @hivecommons-hive
    ContributorAuthor

    Additional finding (folded in — same finding area and category). Raised in the Hive review of PR #14320 (#14320) and folded into this issue because it is a style finding at the same symbol or lines of src/pkg/github/automerge/automerge_contributor_adopt.go as this issue. Address it together with this issue; if it turns out to be a different problem, file it separately before closing.

    Review backlog (style): No per-head note on the maintainer's PR when adoption is skipped

    • No per-head note on the maintainer's PR when adoption is skipped (src/pkg/github/automerge/automerge_contributor_adopt.go:567)

    Perspective: style
    Severity: info (P3)
    Evidence: src/pkg/github/automerge/automerge_contributor_adopt.go:567 (

    if maintainer, err := c.authorMaintainsRepo(ctx, obs, now); maintainer || err != nil {
    )
    Finding: No per-head note on the maintainer's PR when adoption is skipped

    Issue #14301's proposed change asked for one note per head telling the maintainer the hive will not take over their PR; the new gate in adoptContributorPR (automerge_contributor_adopt.go:567-570) only emits a log line. Not in the issue's acceptance criteria and not claimed by the PR body or changelog, so it does not block; candidate follow-up.

    Fingerprint: 3439220c500a6bd63bcbc738407171d8489a9a964db7c1120976f866f6ab727c

    filed by Hive review backlog

  8. removed
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Oct 26, 2026
  9. hivecommons-hive commented on Oct 26, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: #14320 is no longer open. This issue is actionable again.

  10. hivecommons-hive commented on Oct 26, 2026

    @hivecommons-hive
    ContributorAuthor

    🌱 Good first issue — bring your own coding agent

    Hi! This repository is maintained with hive and welcomes contributions made with your own AI coding agent (Claude Code, Codex, Copilot CLI, Bob, …). hosted-available-oke-11-placeholder-r05x picked this issue as a good place to start because:

    • scoped to two packages (hivecommons/hive, pkg/github)
    • short, focused description

    How to land it (no waiting on a human):

    1. Claim it through the relay: open https://hosted-kubestellar-hive-ojv6.hive.hivecommons.dev/contribute?issue=hivecommons%2Fhive%2314313 and sign in with GitHub. Claiming stamps the issue so hive leaves it to you.
    2. Fork or branch, make the change with your agent, and sign each commit with DCO (git commit -s).
    3. Open a PR whose description says Fixes #14313 — that closing keyword is how hive's contributor lane links the PR to your claim.
    4. Hive runs CI and merges green PRs from claimed contributors automatically.
    Paste this to your agent
    Fix #14313 in github.com/hivecommons/hive (https://github.com/hivecommons/hive/issues/14313). First open https://hosted-kubestellar-hive-ojv6.hive.hivecommons.dev/contribute?issue=hivecommons%2Fhive%2314313 and claim the issue through the hive relay (sign in with GitHub). Work on a fork/branch; keep the change scoped to the issue; sign every commit with DCO (git commit -s); open a PR whose description contains the line 'Fixes #14313' so the hive's contributor lane can auto-merge it once CI is green. Read and follow https://github.com/hivecommons/hive/blob/HEAD/AGENTS.md before changing code.
    

    Prefer not to drive the loop by hand? Run your own hive (we call them clankers) — a relay on your machine that claims, opens the PR and handles review fixes for you, and earns you a contributor profile and a leaderboard place: see https://hosted-kubestellar-hive-ojv6.hive.hivecommons.dev/contribute.

    If nobody claims it, hive may pick it up itself — claiming first prevents that. Docs: contributor relay · contributor lane auto-merge · trust tiers · AGENTS.md.

  11. added
    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    stage/010-actionableTriaged; eligible for the hive to pick up
    on Oct 26, 2026
  12. hivecommons-hive commented on Oct 26, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: #14320 merged. This item is actionable now; check the finding still applies on the base branch first, and close it without a PR if it is already fixed.

  13. hivecommons-hive commented on Oct 26, 2026

    @hivecommons-hive
    ContributorAuthor

    Closing: adoptionAuthorPermission / adoptionPermissionsMu were introduced only on PR #14304's branch, which was closed without merging. Neither symbol exists in src/pkg/github/automerge/automerge_contributor_adopt.go on v5, so the finding does not apply to the base branch.


    🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

    — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

    agent/reviewerFiled by the reviewer agentgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions