fix: keep the dev shell out of the daily driver's runtime file#101
Merged
Conversation
runChromium records runtime.json before the LICH_DEV_URL branch, so a `task dev` run overwrote the daily driver's coordinates and removed the file on its own clean exit. LICH_DEV now selects runtime-dev.json, mirroring the store's database split, so Write, Read and Detect all route through the same per-shell path.
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.
The bug
runChromiumrecordsruntime.jsonbefore theLICH_DEV_URLbranch, so everytask devrun wrote its own port andtoken into the daily driver's runtime file — and deleted that file on its clean exit (
defer os.Remove(path)). Twocasualties:
install.shcould no longer reach the running daily driver for/restart, and a second daily-driverlaunch stopped recognising itself as a duplicate, dying with a bare bind error instead of focusing the open window.
The fix
singleton.pathnow gates the filename onLICH_DEV, mirroringstore.databasePathandlogging.fileName:runtime-dev.jsonfor atask devshell,runtime.jsonfor the daily driver.The gate lives at the shared path rather than at the call site because
Write,ReadandDetectall route throughpath— one guard covers the write, the read and the exit-time removal, and the dev shell's duplicate detection nowfinds its own instance (on 47822) instead of reading the daily driver's record and mistaking a live app for a dead
port.
install.shkeeps readingruntime.jsonand keeps finding the real instance.No
CHANGELOG.mdentry: the bug is reachable only throughtask dev, so no user of a published version lived it.Test plan
TestDevSplitcovers both halves of the bug: a devWriteleaves the daily record intact, and removing the pathdev was handed (what
main.godefers) leavesruntime.jsonstanding.go test ./...— 405 passed in 19 packages.go vet ./...andgofmt -l .clean.