Repository navigation
[local-test-e2e-worker-daemon-idle-auto-update] test(e2e): worker-daemon — idle auto-update installs a newer release and hands over - #852
Merged
danii1 merged 1 commit intoDec 4, 2026
Conversation
…e2e): worker-daemon — idle auto-update installs a newer release and hands over
Contributor
Author
Artifacts & verificationRun: 1727 · Commit: Verification reportProduced by Show artifactAuto-review summaryProduced by Show artifact |
danii1
deleted the
feature/local-test-e2e-worker-daemon-idle-auto-update
branch
December 4, 2026 14:24
Contributor
Author
|
🤖 Auto-merge: merged (squash) at Every changed file is inside the workspace's safe paths. |
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.
Why
Task local-test-e2e-worker-daemon-idle-auto-update: test(e2e): worker-daemon — idle auto-update installs a newer release and hands over
Nothing exercised the worker's idle self-update end to end. A broken update loop (installing mid-task, a crash loop after install, or never updating) could break every unattended worker at once. The e2e helpers force
DEVINTERN_NO_UPDATE=1, so the path was never run.What changed
packages/e2e/helpers/auto-update-fixture.ts(new) hasAutoUpdateWorker, aWorkerFixturesubclass. It copies the builtdistto<tmp>/prefix/lib/node_modules/@getdevintern/code/so install detection really returnsnpm-global.latest = 99.0.0and records requests.npmshim first onPATHthat logs its argv and exits 0 or 1.DEVINTERN_SERVICE=1and removesDEVINTERN_NO_UPDATE.packages/e2e/helpers/npm-registry-redirect-preload.cjs(new) redirectsregistry.npmjs.orgto the fake. It also shortens the 60 s update tick to 1 s, following the existing preload pattern.packages/e2e/helpers/worker.ts: two optional fixture options,daemonEntryanddaemonArgs. They let a test run a different CLI entry and pass--no-update. This is a small change to shared test-helper code, not product code.packages/e2e/tests/local/worker-auto-update.test.ts(new) has four tests:latestcalls the shim exactly once withinstall -g @getdevintern/code@99.0.0, logs "Updated devintern to 99.0.0", and exits 1 (the service-manager path).[worker] auto_update = falseand--no-updateinstall nothing and poll nothing further.packages/e2e/docs/coverage/worker-daemon.md: the Auto-update row is nowdefaultwith evidence and Missing items, last reviewed 2026-12-04. Backlog item 18 notes auto-update as covered. A Test notes entry describes the new test.Scope
Included: gap
e2e-worker-daemon-auto-update, scenarios (a), (b), (c) and (d). Excluded: the successor-spawn path used when no service manager is present, re-exec onto the new binary (the shim installs nothing), a realbun-globallayout, launchd, and any product code change.Tradeoffs
DEVINTERN_SERVICE=1so the exit code is deterministic. The cost is that the successor-spawn handover is not covered, and the doc lists it as Missing.packages/codeand read aslocal. The copy is a few MB per worker and takes a moment.Blast Radius
WorkerFixturegained two optional fields that existing callers don't use, so they are unaffected.[worker] auto_update = false, the CLI's non-installing startup update notice still reads the registry once.--no-updatesends no request. The test asserts that exact current behavior.Verification
bun run --filter @getdevintern/code build: passed.bun run --filter @devintern/e2e test: 503 pass, 1 fail. The failure isworker doctor --json offers try-first-task…inworker-doctor.test.ts. It gotrun-foregroundwhere it expectedservice, because this sandbox has no service manager. I did not touch that test, and I did not re-run it on the base commit. The 4 new tests pass; I ran that file standalone twice and it passed both times.bun run --filter @devintern/e2e typecheck,lintandformat:check: all clean.bun run lint(including knip and the lint ratchet): the output I saw reached the knip and ratchet steps with no errors. It ended there, and I did not read a final exit status. The oxlint run printed a read-only filesystem warning.🤖 Opened by DevIntern from local-test-e2e-worker-daemon-idle-auto-update