Repository navigation
feat(ios): sources live in a folder as long as the device set #1573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
858a63e
test: iOS sources live in a folder as long as the device set, an owne…
V3RON 914083a
feat(ios): sources live in an owned folder as long as the device set …
V3RON e145cf1
test: iOS is refused sources-path-unfit where no sources folder can h…
V3RON 1da3680
feat(ios): iOS is refused sources-path-unfit where the sources folder…
V3RON 607f90e
test: a seed or a leftover row naming another set is deleted there an…
V3RON 8dbedb4
feat(ios): a seed in another set is deleted there and made again in t…
V3RON 4818a31
test: converge stores a baseline's stale reason at startup (#1569)
V3RON 73230b5
feat(core): an old baseline is stale from the first request after sta…
V3RON adc6b75
test: switching deviceSet with sources left in either setting's sourc…
V3RON 1df9f4f
feat(ios): switching deviceSet refuses sources left in either setting…
V3RON 86bb59a
feat(e2e): the slow lane's homes sit under $HOME/.sls and find the so…
V3RON 2e5c072
refactor(ios): sources-folder and staleness helpers and their tests l…
V3RON 3208f29
refactor(ios): sourcesFolderFor stays inside its file (#1569)
V3RON 202be77
test(core): a baseline's stale reason is stored before the warm pool …
V3RON 701deb2
fix(ios): own seeds never read as the other setting's leftovers, old-…
V3RON 3a08797
refactor(ios): the earlier-sources-folder check lives in sources-fold…
V3RON 2c6d716
fix(e2e): a connected agent-device agent names its session (agent-dev…
V3RON 7e4bb3d
Merge remote-tracking branch 'origin/feature/1561-adr' into HEAD
V3RON 086c5f4
chore(hygiene): the iOS driver index may be 2702 lines (#1569)
V3RON 262f004
fix(e2e): the lane home's restore keeps the adb server's record, so t…
V3RON File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import { mkdtemp, readdir, rm, writeFile } from "node:fs/promises"; | ||
| import { tmpdir } from "node:os"; | ||
| import { join } from "node:path"; | ||
| import { describe, expect, it } from "vitest"; | ||
|
|
||
| import { clearAllButState } from "./lane-home.js"; | ||
|
|
||
| // why: lane-home is a helper file of the e2e lane, outside any module surface; the daemon start and stop that puts a kept seed's rows back runs only on the slow lane, where a server left behind fails a flow far from its cause. | ||
| describe("clearAllButState", () => { | ||
| it("keeps the adb server's record, which the flow's own daemon needs to adopt a server left running under an attached emulator", async () => { | ||
| const home = await mkdtemp(join(tmpdir(), "simlock-lane-home-test-")); | ||
| try { | ||
| for (const name of [ | ||
| "state.db", | ||
| "adb-server.json", | ||
| "daemon.log", | ||
| "history.db", | ||
| "admin.token", | ||
| ]) { | ||
| await writeFile(join(home, name), "x"); | ||
| } | ||
|
|
||
| await clearAllButState(home); | ||
|
|
||
| expect((await readdir(home)).sort()).toEqual(["adb-server.json", "state.db"]); | ||
| } finally { | ||
| await rm(home, { force: true, recursive: true }); | ||
| } | ||
| }); | ||
| }); |
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A failed startup stale check can leave an earlier iOS baseline unmarked for the first request.
checkBaselinesAtStartuplogs a failedcheckStale()and continues startup.#checkStale()reads every platform before its firstUPDATE, and#readSourcesrethrows any read error other thanNoDriverError. One platform's failinglistSources()can therefore skip the stale writes for every platform, including iOS. The lease request path reads only the storedstale_reason, and it throwsBaselineStaleErroronly when that value is set. The first request for an earlier-set iOS baseline can then bypass theBASELINE_STALErefusal. The mark stays absent until a laterlist,doctor, orcomponent.removedcheck succeeds.Record each platform's read result separately in
#readSources. A failed platform then leaves only its own rows unchanged, and the readable platforms still write their stale reasons. Rows with no readable source are already skipped in#checkStale.