docs(#6439): add context-aware blocking guidance to go-code.md - #6441
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
docs(#6439): add context-aware blocking guidance to go-code.md#6441fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
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
Site previewPreview: https://b4629ec0-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 10:59 AM UTC · Completed 11:08 AM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsMedium
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new "Context-aware blocking" section to
docs/contributing/go-code.mdcodifying the requirement that functions acceptingcontext.Contextmust useselectwithctx.Done()instead oftime.Sleepor other unconditionally-blocking calls. This guidance was missing when the code agent authored PR #6437 with a baretime.SleepinEnsureProvider, which a human reviewer caught and requested a fix for.Changes
## Context-aware blockingsection todocs/contributing/go-code.mdwith:select-based vstime.Sleeppatternssandbox.RetrySleepFn) for testabilityAGENTS.mdtopic index to mention "context-aware blocking" so agents discover the guidanceTesting
Checklist
!for breaking changes)Closes #6439
Post-script verification
agent/6439-context-aware-blocking-docs)65d0138df1e7585e8d994e8f322f91d17d12a72b..HEAD)