Repository navigation
Conversation
…on trust and open
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.
What does this PR do?
Closes #313
The first Trust and open on
/loadlogged two 404s andCould not load the project plugins RpcError: Project … is not open, and could show a git error toast. The window loaded the untrusted project, then trusting it made the server close that instance and open a new one under the same id, so reads still in flight went to a closed project.packages/project(ProjectService.open):open(ref, { trust })now trusts the folder on the server before the window loads it. If the window already holds that project untrusted, it closes it first.trust()is unchanged.apps/editor(follow-project-plugins.ts): a per-call counter drops the remaining steps and errors of an earlier call, even when the project reopens under the same id./loadpage: Trust and open callsopen(ref, { trust: true })instead ofopenthentrust()(3 lines).How do you test this PR?
trust.spec.ts"the first Trust and open of a folder logs no error" (collects console errors, waits for the plugins and git reads, checks no git toast)Could not load the project plugins RpcError: Project … is not opentrust.spec.ts --repeat-each 8 --retries 0: 16 passed; after the last round,--repeat-each 4: 8 passedpackages/project/test/service/project-service.spec.ts(3 tests)apps/editor/test/plugin/follow-project-plugins.spec.ts(stale call guard)follow()The unit test checks that no request reaches the untrusted instance: the calls are exactly
projects.open, projects.trust, projects.open, with no fs or model request in between.The last round (test only) names each trust copy per repeat and retry, so a CI retry still runs the trust branch, and replaces a fixed sleep with a wait on the plugins and git responses. With the old
/loadcall put back, the new wait still fails the test (red); with the fix it passes.Commands run from the worktree on cc9483b:
pnpm build(17/17),pnpm lint(29/29, knip included),pnpm typecheck(41/41),packages/projectunit tests (66 passed),apps/editorunit tests (13 passed, 1 skipped:editor-native.spec.ts, no.examples/), trust e2e on Chromium. On 5fe854a: the trust e2e, the two unit specs andpnpm lint. Not run: the full e2e suite on this branch, Firefox.Integration: a scratch branch with every editor branch of this sweep merged passed
pnpm build, lint, typecheck,pnpm test --force(1014 passed, 1 skipped) and the full e2e suite with the engine (141/141, Chromium only).Merge danger
ProjectService.opengains an optional parameter. Editor app only. Merging tomaindeploys the editor app.apps/editor/src/routes/(editor)/load/+page.svelteis also edited by fix/load-missing-folder (fix(editor): say a missing folder of a link is missing before the trust prompt #371). The two merged cleanly on the integration branch.Follow-up issues
Quality gate
Last round 306e063 and 5fe854a (test only): producer red→green, not re-reviewed.