Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/contributing/go-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,17 @@ See [`forge.IsTransient`](../../internal/forge/forge.go) for the canonical examp

**When reviewing PRs:** Flag any `Timeout() bool` interface assertion without a preceding `errors.Is(err, context.DeadlineExceeded)` guard as a medium-severity finding. The fix is to add the context-error check before the `Timeout()` check.

## Injectable function variables (test seams)

Package-level variables that hold function values for test overriding must:
Comment thread
rh-hemartin marked this conversation as resolved.

Comment thread
rh-hemartin marked this conversation as resolved.
- Use an `XxxFn` suffix (e.g., `BuildWASMFn`, `RetrySleepFn`, `WranglerWhoamiFn`)
- Default to the real implementation
Comment thread
rh-hemartin marked this conversation as resolved.
Comment thread
rh-hemartin marked this conversation as resolved.
- Include a doc comment starting with "Override in tests to..." that describes what the override achieves
- Be restored in a `t.Cleanup` callback when overridden

Examples: `internal/sandbox/sandbox.go` (`RetrySleepFn`), `internal/dispatch/cf/provisioner.go` (`BuildWASMFn`, `CopyWASMExecFn`).

## Running the fullsend CLI

**Audience:** contributors and agents working from a **repo checkout**. Do not
Expand Down
Loading