Repository navigation
Conversation
… its pending check
…ith a signed-out session
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 #267
In a hosted editor, a request could be answered with the result of a pending session check that was started for other tokens.
SessionStore._authenticatenow ties every pending check to the tokens it checks:AGENTS.md(hosted sessions) describes the token-bound checks.How do you test this PR?
New tests in
packages/server-core/test/session/session-store.spec.ts, with stand-inverifyfunctions (no real auth API):expected [ 'access-ada' ] to deeply equal [ 'access-ada', 'access-bob' ]: the second request reused the first check (1 failed, 7 passed)The other new tests cover a refused check with a waiter on other tokens, an outage after the record was replaced, and a session dropped during a pending check.
Commands run from the worktree on the last code commit (14b9c3e): server-core unit tests (24 files, 135 passed, 0 skipped),
pnpm typecheck,pnpm build,pnpm lint, commit hooks: all pass.prettier --check AGENTS.mdpasses after the final docs edit (0bce216). e2e not run (unit-level change).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
@nanoforge-dev/editor-server-corehas no runtime dependents outside the editor. This is auth-state code on the hosted path; merging tomaindeploys the editor app.AGENTS.md: fix/server-core-fs-safety (fix(server-core): keep project file operations inside the project #384) edits the same hosted-sessions line. Whoever merges second keeps both texts, as the integration branch did.Follow-up issues
None filed.
Quality gate
AGENTS.mdhosted sessions (a5c225b, b693fd6, 0bce216)pnpm linton 14b9c3e