Replaces the 100ms sleep in TestHandleWebhookProcessesValidWebhook with a call to the webhook service's WaitForDeployments, the same fix #198 applied to the webhook service tests. The test context now keeps the webhook service that setupTestHandlers already built. No production code changes.
Only this test can start a deployment. TestHandleWebhookRejectsOversizedBody sends a payload that does not parse, so its branch is empty and never matches the app branch. TestHandleWebhookReturns404ForUnknownSecret returns before it reaches the webhook service. Neither needs a wait.
Replaces the 100ms sleep in `TestHandleWebhookProcessesValidWebhook` with a call to the webhook service's `WaitForDeployments`, the same fix https://git.eeqj.de/sneak/upaas/issues/198 applied to the webhook service tests. The test context now keeps the webhook service that `setupTestHandlers` already built. No production code changes.
Only this test can start a deployment. `TestHandleWebhookRejectsOversizedBody` sends a payload that does not parse, so its branch is empty and never matches the app branch. `TestHandleWebhookReturns404ForUnknownSecret` returns before it reaches the webhook service. Neither needs a wait.
`make check` is green.
Closes https://git.eeqj.de/sneak/upaas/issues/211
Model: opus-5-5
TODO.md, new Completed Steps entry: "Fixed the same t.TempDir cleanup race" has nothing to refer back to. The entry it means (the internal/service/webhook fix for #198) is two entries further down, so someone reading top-down cannot tell which race this is. The entry should name the race itself, for example: "Fixed the flaky t.TempDir cleanup race in internal/handlers (the one fixed in internal/service/webhook by #198): TestHandleWebhookProcessesValidWebhook now waits with the webhook service's WaitForDeployments instead of sleeping (#211)."
The test change, the PR body and the commit message are otherwise correct.
Model: opus-5-5
FAIL (needs-rework), tested `2d031f6` rebased onto `next` `567f982`.
- `TODO.md`, new Completed Steps entry: "Fixed the same `t.TempDir` cleanup race" has nothing to refer back to. The entry it means (the `internal/service/webhook` fix for https://git.eeqj.de/sneak/upaas/issues/198) is two entries further down, so someone reading top-down cannot tell which race this is. The entry should name the race itself, for example: "Fixed the flaky `t.TempDir` cleanup race in `internal/handlers` (the one fixed in `internal/service/webhook` by #198): `TestHandleWebhookProcessesValidWebhook` now waits with the webhook service's `WaitForDeployments` instead of sleeping (#211)."
The test change, the PR body and the commit message are otherwise correct.
Model: opus-5-5
Rebased onto next (567f982). TODO.md entry now names the race itself (the t.TempDir cleanup race fixed in internal/service/webhook by #198) instead of saying "the same". make check green.
Model: opus-5-5
Rebased onto `next` (`567f982`). `TODO.md` entry now names the race itself (the `t.TempDir` cleanup race fixed in `internal/service/webhook` by https://git.eeqj.de/sneak/upaas/issues/198) instead of saying "the same". `make check` green.
Model: opus-5-5
TestHandleWebhookProcessesValidWebhook slept 100ms after posting a
webhook, racing the background deployment that writes its log under the
test's temp directory against temp directory cleanup. The test context
now keeps the webhook service, and the test waits on its
WaitForDeployments, as the webhook service tests already do. The other
webhook handler tests never start a deployment.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Replaces the 100ms sleep in
TestHandleWebhookProcessesValidWebhookwith a call to the webhook service'sWaitForDeployments, the same fix #198 applied to the webhook service tests. The test context now keeps the webhook service thatsetupTestHandlersalready built. No production code changes.Only this test can start a deployment.
TestHandleWebhookRejectsOversizedBodysends a payload that does not parse, so its branch is empty and never matches the app branch.TestHandleWebhookReturns404ForUnknownSecretreturns before it reaches the webhook service. Neither needs a wait.make checkis green.Closes #211
Model: opus-5-5
FAIL (needs-rework), tested
2d031f6rebased ontonext567f982.TODO.md, new Completed Steps entry: "Fixed the samet.TempDircleanup race" has nothing to refer back to. The entry it means (theinternal/service/webhookfix for #198) is two entries further down, so someone reading top-down cannot tell which race this is. The entry should name the race itself, for example: "Fixed the flakyt.TempDircleanup race ininternal/handlers(the one fixed ininternal/service/webhookby #198):TestHandleWebhookProcessesValidWebhooknow waits with the webhook service'sWaitForDeploymentsinstead of sleeping (#211)."The test change, the PR body and the commit message are otherwise correct.
Model: opus-5-5
Rebased onto
next(567f982).TODO.mdentry now names the race itself (thet.TempDircleanup race fixed ininternal/service/webhookby #198) instead of saying "the same".make checkgreen.Model: opus-5-5
2d031f6fadtoe8e545f5b1PASS, tested
e8e545frebased ontonext567f982.Model: opus-5-5