Skip to content

docs(#6439): add context-aware blocking guidance to go-code.md - #6441

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/6439-context-aware-blocking-docs
Open

docs(#6439): add context-aware blocking guidance to go-code.md#6441
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/6439-context-aware-blocking-docs

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Adds a new "Context-aware blocking" section to docs/contributing/go-code.md codifying the requirement that functions accepting context.Context must use select with ctx.Done() instead of time.Sleep or other unconditionally-blocking calls. This guidance was missing when the code agent authored PR #6437 with a bare time.Sleep in EnsureProvider, which a human reviewer caught and requested a fix for.

Changes

  • Added ## Context-aware blocking section to docs/contributing/go-code.md with:
    • Good/bad code examples showing select-based vs time.Sleep patterns
    • Guidance on injectable sleep functions (e.g., sandbox.RetrySleepFn) for testability
    • Exception handling for uninterruptible blocking syscalls
  • Updated AGENTS.md topic index to mention "context-aware blocking" so agents discover the guidance

Testing

  • Documentation-only change — no Go code modified
  • Secret scan passed
  • Gitlint passed

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • I wrote this contribution myself and can explain all changes in it

Closes #6439

Post-script verification

  • Branch is not main/master (agent/6439-context-aware-blocking-docs)
  • Secret scan passed (gitleaks — 65d0138df1e7585e8d994e8f322f91d17d12a72b..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

Add a new "Context-aware blocking" section to docs/contributing/go-code.md
documenting the requirement that functions accepting context.Context must
not use time.Sleep or other unconditionally-blocking calls. The section
provides a select-based pattern for respecting cancellation, notes the
existing sandbox.RetrySleepFn injectable sleep for testability, and covers
the exception for uninterruptible blocking syscalls.

This codifies the pattern that a human reviewer caught and requested in
PR #6437, where EnsureProvider used bare time.Sleep inside a context-bearing
function. Both code and review agents now have explicit guidance to follow
and enforce.

Also updates the AGENTS.md topic index to mention context-aware blocking
so agents discover the guidance when working on Go code.

Closes #6439
@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://b4629ec0-site.fullsend-ai.workers.dev

Commit: eed988cc02be02480f0976fbdde5d6a49527b46e

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 21, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:59 AM UTC · Completed 11:08 AM UTC

Commit: eed988c · View workflow run →

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] AGENTS.md — This PR modifies AGENTS.md, which is a governance file under protected-path enforcement. The change updates the topic index table to reference the new "Context-aware blocking" section added to go-code.md. The PR links to issue Add context-aware blocking guidance to go-code.md #6439 and the description explains the rationale. Human approval is always required for protected-path changes, regardless of context.

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Agent PR ready for human review requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add context-aware blocking guidance to go-code.md

0 participants