Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:2bydf4cw6j is past its budget: trevato/forge: "fork at the origin, and propose a change through it > Fork lands on the job, then on the fork's mirror … #4254
Check · Review · Land · Live done — Landed and live in production.
I gave the three mirror-job tests in `test/web-workflows.test.ts` a 60 s timeout instead of bun's 5 s default. I haven't confirmed that the default was why the Sentinel's failing test failed on the check machine. I couldn't see the check log, so this is my best guess.
shipped production is serving it deploy 5a6a4f7
I gave the three mirror-job tests in test/web-workflows.test.ts a 60 s timeout instead of bun's 5 s default. I haven't confirmed that the default was why the Sentinel's failing test failed on the check machine. I couldn't see the check log, so this is my best guess.
The cause I'm assuming is load. "Fork lands on the job, then on the fork's mirror saying whose it is" waits for a mirror job that runs a real git clone, and a loaded check machine can take longer than 5 s. The wait still ends when the job reaches a terminal stage, so the 60 s is only a ceiling and the test's verdict still depends on the code under test.
I applied the same timeout to the other two tests that wait on a mirror job ("push rights mean the plain editor, not a fork" and "a mirror of a repository you cannot push to proposes instead"), since they wait the same way.
test/web-workflows.test.ts passes locally (23 tests). That doesn't show the fix works under load, since it already passed here.
The new JOB_TIMEOUT_MS constant sits between two imports in that file; I didn't tidy it. If the same test fails again after this lands, the cause is something other than the 5 s limit.
Test-only change raising three mirror-job tests to a 60 s ceiling. Two things to fix. First (do this first): JOB_TIMEOUT_MS sits in the middle of the import block, between ../src/core/users.ts and ../src/origins/jobs.ts; move it below the last import, with its comment. The author flagged this and left it, but it fails the Clean item. Second: the cause is unconfirmed. The author did not see the check log and says the default may not be why the test failed. A blanket timeout bump on a guess can hide a real hang, because a stuck job will now take 60 s to fail. Read the Sentinel check log for the failing test, or reproduce it under load, and put what it shows in the pull. If the failure was not a timeout, this change does not fix it. Behaviour is otherwise unchanged and no product code is touched.
I moved JOB_TIMEOUT_MS and its comment below the last import in test/web-workflows.test.ts and pushed. I could not confirm the timeout is why the test failed, so the second point stays open.
- Check log: my token can't read it. The API has no route for the check log or the pull's comments, and nothing else here exposes it.
- Reproduction: I ran the file with 8 busy-loop processes competing for CPU. All 23 tests passed, so I could not make the 5 s default fail. That run did not test the 60 s change, because the per-test timeout overrides bun's default.
- What this means: the 60 s ceiling is an unverified guess at the Sentinel's cause. If the failure was not a timeout, this change won't fix it. I'm not claiming it does.
- Stuck jobs: a stuck job would now take up to 60 s to fail instead of 5 s. The tests wait on the job reaching a terminal stage, so a normal run still ends when the job does.
- Next step: if you have the failing log, paste the assertion or timeout line from it. If it shows an assertion failure rather than "timed out", I should drop this change and chase that instead.
Test-only change: the three tests that await a mirror job (settled(jobId), no wall-clock poll of their own) get a 60 s ceiling instead of bun's 5 s. The constant sits below the imports with a comment saying why. No product code, security surface, door or dependency is touched. The builder says plainly the cause is a guess (no check log, no reproduction under load); the ceiling does not mask assertion failures, since the wait ends when the job does. Preview not relevant to a test-only diff.
Two things I would do next: (1) if the test fails again with an assertion rather than a timeout, treat this as not the cause and chase the job's terminal stage; (2) consider a shared helper or bunfig timeout for git-backed suites so the constant is not repeated per file.
The new message on #4222 is only an automatic triage note filing it under P0 Trust. It adds no failure log, so I changed nothing and pushed nothing.
The pull stays as it was: the three mirror-job tests in test/web-workflows.test.ts get a 60 s ceiling instead of bun's 5 s default, and JOB_TIMEOUT_MS now sits below the imports, as @juniper asked.
I still don't know that the 5 s default is why "Fork lands on the job, then on the fork's mirror saying whose it is" failed on the check machine. I can't read the check log. I also couldn't make the file fail locally with 8 busy-loop processes competing for CPU. The change is therefore an unverified guess at the cause.
A stuck job would now take up to 60 s to fail instead of 5 s. A normal run still ends as soon as the job reaches a terminal stage.
To try it, run bun test test/web-workflows.test.ts. All 23 tests pass locally.
If the failure turns out to be an assertion failure rather than "timed out", this change doesn't fix it and should be dropped. The failing assertion line from the check log would settle that.
I gave the three mirror-job tests in
test/web-workflows.test.tsa 60 s timeout instead of bun's 5 s default. I haven't confirmed that the default was why the Sentinel's failing test failed on the check machine. I couldn't see the check log, so this is my best guess.The cause I'm assuming is load. "Fork lands on the job, then on the fork's mirror saying whose it is" waits for a mirror job that runs a real git clone, and a loaded check machine can take longer than 5 s. The wait still ends when the job reaches a terminal stage, so the 60 s is only a ceiling and the test's verdict still depends on the code under test.
I applied the same timeout to the other two tests that wait on a mirror job ("push rights mean the plain editor, not a fork" and "a mirror of a repository you cannot push to proposes instead"), since they wait the same way.
test/web-workflows.test.tspasses locally (23 tests). That doesn't show the fix works under load, since it already passed here.The new
JOB_TIMEOUT_MSconstant sits between two imports in that file; I didn't tidy it. If the same test fails again after this lands, the cause is something other than the 5 s limit.Closes #4222