You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Protected files were modified in this change.
This pull request is in request_review mode and requires explicit human scrutiny before merge.
Protected files: .github/fp-enhancer-cache.json
Summary
First run of the Functional and Immutability Enhancer workflow, processing pkg/actionpins (round-robin pass 1).
Package processed
pkg/actionpins — Action pin resolution for GitHub Actions
Improvement made
Explicit sort mutation in buildByRepoIndex
File:pkg/actionpins/actionpins.go
Replaced the range-value sort pattern with key-indexed access:
// Before — sorts via implicit backing-array sharing (correct but non-obvious)for_, repoPins:=rangebyRepo {
slices.SortFunc(repoPins, ...)
}
// After — mutation intent is explicitforkey:=rangebyRepo {
slices.SortFunc(byRepo[key], ...)
}
Why this matters: When ranging over a map[K][]T, the loop variable is a copy of the slice header. slices.SortFunc sorts the shared backing array in-place, so the original pattern is correct — but a reader could reasonably conclude the sort is lost on the copy. Using byRepo[key] directly:
Makes the mutation intent unambiguous
Removes the implicit reliance on backing-array sharing
Prevents a future "fix" that adds a redundant byRepo[key] = repoPins reassignment
Cache initialised
.github/fp-enhancer-cache.json created to track round-robin progress.
Next run will process: pkg/agentdrain
Checklist
All tests pass (go test ./pkg/actionpins/... -cover — 93.1%)
The bundle file is available in the agent artifact in the workflow run linked above.
To create a pull request with the changes:
# Download the artifact from the workflow run
gh run download 28163510263 -n agent -D /tmp/agent-28163510263
# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-28163510263/aw-fp-enhancer-pkg-actionpins.bundle refs/heads/fp-enhancer/pkg-actionpins:refs/bundles/create-pr-fp-enhancer-pkg-actionpins-9f50014669df00f7-ddaedd23
git update-ref refs/heads/fp-enhancer/pkg-actionpins-9f50014669df00f7 refs/bundles/create-pr-fp-enhancer-pkg-actionpins-9f50014669df00f7-ddaedd23
git checkout fp-enhancer/pkg-actionpins-9f50014669df00f7
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-fp-enhancer-pkg-actionpins-9f50014669df00f7-ddaedd23
# Push the branch to origin
git push origin fp-enhancer/pkg-actionpins-9f50014669df00f7
# Create the pull request
gh pr create --title '[fp-enhancer] Improve pkg/actionpins' --base main --head fp-enhancer/pkg-actionpins-9f50014669df00f7 --repo github/gh-aw
Caution
Protected files were modified in this change.
This pull request is in
request_reviewmode and requires explicit human scrutiny before merge.Protected files:
.github/fp-enhancer-cache.jsonSummary
First run of the Functional and Immutability Enhancer workflow, processing
pkg/actionpins(round-robin pass 1).Package processed
pkg/actionpins— Action pin resolution for GitHub ActionsImprovement made
Explicit sort mutation in
buildByRepoIndexFile:
pkg/actionpins/actionpins.goReplaced the range-value sort pattern with key-indexed access:
Why this matters: When ranging over a
map[K][]T, the loop variable is a copy of the slice header.slices.SortFuncsorts the shared backing array in-place, so the original pattern is correct — but a reader could reasonably conclude the sort is lost on the copy. UsingbyRepo[key]directly:byRepo[key] = repoPinsreassignmentCache initialised
.github/fp-enhancer-cache.jsoncreated to track round-robin progress.Next run will process:
pkg/agentdrainChecklist
go test ./pkg/actionpins/... -cover— 93.1%)make fmtcleanReferences: §28163510263
Note
This was originally intended as a pull request, but the git push operation failed.
Original error: pushSignedCommits: refusing unsigned push for branch 'fp-enhancer/pkg-actionpins-9f50014669df00f7': Signed-commit payload violates file-protection policy (request_review): .github/fp-enhancer-cache.json
Workflow Run: View run details and download bundle artifact
The bundle file is available in the
agentartifact in the workflow run linked above.To create a pull request with the changes: