chore: nudge cooldown sentinel opens its file with its own O_NOFOLLOW code instead of internal/nofollow
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Read internal/nudge/cooldown.go and inspect recordFire, then check the internal/nofollow API added in #378. Change the sentinel open to use nofollow.OpenFile while keeping the existing Lstat checks on the directory and sentinel; look for tests covering refused symlinks and matching error types in the nudge gate and index files.
Written by the indexing model from the issue text.
Description
What kind of chore?
Other
What needs doing?
internal/nudge/cooldown.go opens its sentinel file with its own os.OpenFile(path, os.O_WRONLY|os.O_CREATE|syscall.O_NOFOLLOW, 0o600) call in recordFire. #378 added internal/nofollow, which opens a file without following a symbolic link. It also maps ELOOP, and EEXIST on a link, to *nofollow.SymlinkError, which matches nofollow.ErrSymlink.
Change recordFire to use nofollow.OpenFile. Keep the existing Lstat checks on the directory and the sentinel. Then a refused link gives the same error type in the nudge gate as in the index files.
Why now?
Tidiness. The sentinel already refuses a link, so this is not a security fix. It removes a second copy of the open rule that #378 put in one place.
Does this touch anything load-bearing?
- None of these
Before submitting
- I searched existing issues and this is not a duplicate
🤖 Generated with Claude Code
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- Avg merge
- 5h 16m
- Merged PRs (30d)
- 107
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from seanb4t/codegraph-go
-
area:indexer bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#385 ·
Maintainers usually reply within 1 day
-
chore needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
seanb4t/codegraph-go#380 ·
Maintainers usually reply within 1 day
-
chore needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
seanb4t/codegraph-go#362 ·
Maintainers usually reply within 1 day
-
area:query bug priority:low spec-needed
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
seanb4t/codegraph-go#355 ·
Maintainers usually reply within 1 day
-
area:ci chore priority:low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
seanb4t/codegraph-go#329 ·
Maintainers usually reply within 1 day
All issues in seanb4t/codegraph-go
Similar issues
-
enhancement exporter/awskinesis needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-collector-contrib#53334 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
erigontech/erigon#26523 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
SocialGouv/iterion#3376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
seaweedfs/seaweedfs#12740 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day