Skip to content

lint: enable contextcheck and thread a context through the forge chain (P4-QUAL-07 residual) #113

Description

@Reederey87

Audit finding: P4-QUAL-07 residual (P3) — see docs/audits/README.md (Pass 5 notes).

The contextcheck linter was deferred because the forge detection/PR chain (internal/forge, called from agent pr) does not thread a context.Context end-to-end, so subprocess calls there cannot be cancelled.

What to do

  • Thread context.Context from the agent pr command through the forge helpers to every exec.Command call site (make them exec.CommandContext).
  • Enable contextcheck in .golangci.yml and fix any remaining findings it raises.
  • No behavior change expected; cancellation via Ctrl-C during agent pr becoming effective is the win.

Gates: gofmt -w cmd internal, golangci-lint run, go test -race ./.... Spec-drift/work-log bookkeeping is advisory on fork PRs; the maintainer completes it at merge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions