Skip to content

feat(review): golangci-lint runs in the review sandbox with a pre-fetched module cache and no network #2129

Description

@dan-petty

Friction

Part of the tracker #772. Since #2096, a review runs its tools in the network-less sandbox. golangci-lint was not proven there: it is not installed in the devcontainer, and it needs the Go toolchain, a writable GOCACHE and GOLANGCI_LINT_CACHE, and the module cache of the reviewed repository, which it fetches from the network by default.

What should happen

A review of a Go repository runs golangci-lint in the sandbox with no network: the sandbox binds the Go toolchain and a pre-fetched module cache read-only (GOFLAGS=-mod=mod, GOPROXY=off), and gives writable cache directories outside the tree. When the module cache is missing, the review reports a coverage gap with the reason.

Evidence

Acceptance criteria

  • golangci-lint runs in the sandbox with no network on a small Go module with a pre-fetched module cache, and gives its findings.
  • A Go repository with no module cache gives a coverage gap with the reason, not a failed scan.

Source: #772

regression of #603

Proposed design

Problem statement

golangci-lint cannot run in the review sandbox. It is not installed and it needs the Go toolchain, writable cache directories, and a module cache. A review of a Go repository cannot produce golangci-lint findings in the network-less sandbox without these.

Acceptance criteria

  • Criterion 1: golangci-lint runs in the sandbox with no network on a small Go module with a pre-fetched module cache and gives its findings.
    Verification: Run a review of a small Go module in the sandbox with the module cache pre-fetched. Verify golangci-lint completes and outputs findings. Verify no network call is made.
  • Criterion 2: A Go repository with no module cache gives a coverage gap with the reason, not a failed scan.
    Verification: Run a review of a Go repository without a module cache. Verify the review output contains a coverage gap entry that names the missing module cache as the reason. Verify the scan does not report a failure.

Key questions

  • What does the sandbox need to run golangci-lint?: The Go toolchain, writable GOCACHE and GOLANGCI_LINT_CACHE directories, and a pre-fetched module cache. [sources: openspec/changes/archive/2026-10-24-2096-review-tools-sandbox-by-default/tasks.md:36]
  • What environment variables control the module cache behavior?: GOFLAGS=-mod=mod and GOPROXY=off. (proposed)
  • What happens when the module cache is missing?: The review reports a coverage gap with the reason. It does not report a failed scan. (proposed)
  • Where are the writable cache directories placed?: Outside the tree of the reviewed repository. (proposed)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/feature
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/feature. The candidate adds new functionality for running golangci-lint in a sandbox with specific constraints.
    • Priority: P2-Medium. This feature improves tool support and sandboxing but is not critical to core functionality. The failed run 2096 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 on the board.
    • Value: Medium. It enhances review capabilities for Go repositories, improving code quality checks.
    • Effort: High. It requires changes to sandbox setup, module cache handling, and tool execution paths for Go tools.
    • Related: feat(review): a review runs its tools in the network-less sandbox by default #2096, which asks for a different change. The candidate item works on making golangci-lint run in a sandbox, while item #2096 sets the general framework for running tools in a sandbox.
  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at bb46660 (see proposed design in issue body).

  4. added
    priority/p2-medium
    status/ready
    value/medium
    effort/high
    on Oct 28, 2026
  5. added a commit that references this issue on Oct 29, 2026
  6. removed
    status/ready
    on Oct 30, 2026
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

    effort/highpriority/p2-mediumsource/agenttype/featurevalue/medium

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions