Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 15, 2026
Closed
scttfrdmn
added a commit
that referenced
this pull request
Oct 16, 2026
The Secret Scan job checked out with fetch-depth 0, which fetches every branch, and ran `gitleaks detect` with no --log-opts, i.e. `git log --all`. One open PR's finding therefore failed every other PR's Secret Scan until that branch was force-pushed (seen with fix/968's old commit failing #1011). Run `gitleaks git --log-opts="HEAD"` instead, keeping the full-history checkout: on pull_request HEAD is the merge commit, so main plus every PR commit is scanned (a secret added and removed within the PR is still caught); on push and schedule it is main's full history. workflow_secret_scan_test.go parses security.yml and fails if the gitleaks invocation loses --log-opts="HEAD", widens with --all/--branches/--remotes/ --glob, stops scanning git history, its job loses fetch-depth 0, or no gitleaks invocation is found. Fixes #1024
scttfrdmn
added a commit
that referenced
this pull request
Oct 16, 2026
The Secret Scan job checked out with fetch-depth 0, which fetches every branch, and ran `gitleaks detect` with no --log-opts, i.e. `git log --all`. One open PR's finding therefore failed every other PR's Secret Scan until that branch was force-pushed (seen with fix/968's old commit failing #1011). Run `gitleaks git --log-opts="HEAD"` instead, keeping the full-history checkout: on pull_request HEAD is the merge commit, so main plus every PR commit is scanned (a secret added and removed within the PR is still caught); on push and schedule it is main's full history. workflow_secret_scan_test.go parses security.yml and fails if the gitleaks invocation loses --log-opts="HEAD", widens with --all/--branches/--remotes/ --glob, stops scanning git history, its job loses fetch-depth 0, or no gitleaks invocation is found. Fixes #1024
) TestSporedNotifyEventsHandledBySporeBot parses every non-test Go file of the root module, finds each Notifier.Notify call and resolves its event argument (string literals, consts, locals assigned in the function such as idle_stopped/idle_hibernated, and struct fields such as #1005's stopAttempt.failEvent). It fails on an event missing from spore-bot's list, on an argument it cannot resolve, on a Notify method value, on a second Notify method, and on empty discovery. spore-bot's list is vendored at testdata/spore-bot/spored_events.txt so the unit test is offline; TestSporeBotEventsVendoredCopyIsCurrent runs in CI with SPORE_BOT_EVENTS_SYNC=1, fetches spore-host main and fails on drift. (#1004)
…ork sync check behind -tags=spore_bot_sync (#1004)
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.
Fixes #1004
What
TestSporedNotifyEventsHandledBySporeBot(root package,spored_events_test.go) discovers every event spored sends and fails if spore-bot's handled-events list lacks one.X.Notify(...)whereXis not an imported package (excludessignal.Notify). That is sound only while(*Notifier).Notifyis the module's one method namedNotify, so it checks that too and fails on a second one. A.Notifymethod value fails as well.action, event := "stop", "idle_stopped"/event = "idle_hibernated"from Back off a failed idle stop, announce only success, and restore DNS on failure (#948) #977, and switch-chosen values), and struct fields (every keyed-literal orx.f = vvalue of that field name in the package; covers Announce an on-complete stop once and back off a failed one, sharing the idle stop's backoff (#978) #1005'sstopAttempt.failEvent). A parameter, a multi-value assignment, an unkeyed literal of a struct declaring the field, or anything else unresolvable fails the test with the call site.Vendored vs fetched
Vendored.
testdata/spore-bot/spored_events.txtis a byte-exact copy of spore-hostmain:lambda/spore-bot/testdata/spored_events.txt(at 6177b57), sogo teststays offline.TestSporeBotEventsVendoredCopyIsCurrentskips unlessSPORE_BOT_EVENTS_SYNC=1; CI sets it in its own step, fetches upstream from raw.githubusercontent.com (3 attempts), compares the parsed event sets (comment-only edits don't trip it), and prints thecurlre-vendor command on drift. Both run as named CI steps next to the API-surface gate.Missing-from-bot fails. Bot-lists-but-spored-doesn't-send is only logged; spore-bot's own
TestSporedEventsMatchSpawncovers that direction. On main that shows up foridle_stop_failed, which #977 adds.Watched it fail
Each case below compiled and the test ran:
a.notifier.Notify(ctx, "fake_event", region)→ FAIL naming"fake_event" (sent at pkg/agent/agent.go:1941)Notify(ctx, ev, "")witheva parameter → FAIL "ev is a parameter"return a.notifier.Notify(method value) → FAILidle_stopped/idle_hibernatedthrougheventat agent.go:1806; changing the variable's value toidle_fake_hib→ FAILstopAttempt{...}literal → FAILbogus_xto the vendored copy → FAIL with the diffOpen PRs that touch events
idle_stop_failedand movesidle_stopped/idle_hibernatedbehind a variable. spore-bot already handles all three, so Back off a failed idle stop, announce only success, and restore DNS on failure (#948) #977 passes this gate.Notifychanges.completion_stop_failed, which spore-bot does not handle. With this gate merged, Announce an on-complete stop once and back off a failed one, sharing the idle stop's backoff (#978) #1005 fails until spore-bot: handle completion_stop_failed (sent by spawn PR #1005) spore-host#563 (filed for this) lands and Announce an on-complete stop once and back off a failed one, sharing the idle stop's backoff (#978) #1005 re-vendors the list. That is the gate doing its job.(I scanned every open spawn PR's diff for added
.Notify(lines. Only Back off a failed idle stop, announce only success, and restore DNS on failure (#948) #977 and Announce an on-complete stop once and back off a failed one, sharing the idle stop's backoff (#978) #1005 have any.)Checks
make check: the only failure is the known Docker-onlyTestGenerateWrapper_ChownFixesCrossUIDStickyUnlink_Docker.make check-nested: all 9 nested modules clean. Both ran with AWS credentials stripped (#968).