Repository navigation
test(lk): allow the project fallback only for an unconfigured livekit.toml - #1086
Merged
Topherhindman merged 1 commit intoOct 29, 2026
Conversation
….toml TestCredentialResolution let room list fall back to the only configured project in every API-key case, because a --project or --subdomain that didn't resolve used to fall back to it. #1076 made that an error and #1084 made --dev with an API key or secret one too, so lk now falls back only when no project is named on the command line and a livekit.toml names a project that isn't configured. Allowing it anywhere else hid a return of the mistyped-project fallback.
rektdeckard
approved these changes
Oct 29, 2026
Topherhindman
deleted the
topherhindman/devx-889-lk-property-test-narrow-the-mistyped-project-allowance
branch
October 29, 2026 22:52
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.
Fixes DEVX-889
TestCredentialResolutionletroom listfall back to the only configured project in every API-key case. That allowance dates from when a--projector--subdomainthat didn't resolve fell back to the only project. #1076 made that an error, and #1084 made--devwith an API key or secret an error too. Since then, lk falls back only when no project is named on the command line and alivekit.tomlnames a project that isn't configured. That fallback is on purpose: an agent repo still gets a project to choose. Allowing the fallback anywhere else would hide the #1076 bug if it came back.What changed
livekit.tomlnames an unconfigured project and nothing earlier in the resolution order (--project,--subdomain, a full inline key pair,--dev) has picked a project.--devwith an inline key or secret is removed. With fix(lk): --dev with an API key or secret is an error #1084 merged,mustFailcovers that case.How tested
go test ./cmd/lk -run '^TestCredentialResolution$' -rapid.checks=1000 -rapid.seed={1,42,20261027}passes.requireProjectWithOpts, the property fails on all three seeds. The counterexamples arelk --subdomain one room listandlk --project one room listwith onlytwoconfigured. With the old allowance, the same revert passes on all three seeds.livekit.tomlallowance removed, the property fails on two of the three seeds (42 and 20261027), withlk room listand alivekit.tomlnamingonewhile onlytwois configured. So the allowance is still needed.go test ./...,go vet ./...andgolangci-lint runall pass.