Skip to content

docs(conformance): make the query string part of the namespace identity - #186

Merged
magnusp merged 1 commit into
mainfrom
docs/issue-182-query-string-namespace
Oct 24, 2026
Merged

magnusp merged 1 commit into
mainfrom
docs/issue-182-query-string-namespace

Conversation

@magnusp

@magnusp magnusp commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Why

The URL mapping section said the query string is ignored when deriving the namespace. That contradicts XerialConformanceDriver.plan(), its class Javadoc, and two harness tests. A conformance author reading the README would treat two spellings of the same file as one database when they are isolated databases.

What changed

  • The URL mapping paragraph now says the query string is part of the namespace identity.
  • It keeps the correct fact that the option values are not applied to the server.
  • The "ignored" wording is gone.

Scope

Docs only. No code or test changes. The canonical statement work in #171 and #174 is untouched.

Blast Radius

Only the conformance README. No runtime behavior changes.

Verification

  • XerialHarnessTest#queryStringIsPartOfTheFileNamespace: Tests run: 1, Failures: 0, Errors: 0. ?mode=ro and ?mode=rw derive different namespaces.
  • XerialHarnessTest#fileNamespacesWithDifferentQueryStringsAreIsolated: Tests run: 1, Failures: 0, Errors: 0. The two variants cannot see each other's tables.
  • ./mvnw spotless:check exits 0.

Closes #182.

The URL mapping section said the query string was ignored, which contradicted XerialConformanceDriver.plan() and the harness tests. State that a different query string addresses a different namespace and that the option values are not applied to the server.
@magnusp

magnusp commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Verdict: PASS

Revision verified

  • Head SHA: a0a408e416c19e06e8f298acdacfe4e99eb17fed
  • Base SHA: fc3f819282cbeff71accb34b7a006b6e90400e81 (base branch main)
  • Patch-id (stable): fe92fd7c29721867157ead61218ce08db213c5e6
  • Diff: 1 file changed, +4 / -2, libsql-conformance/README.md only

Acceptance criteria (issue #182)

  1. README no longer says the query string is ignored — MET. grep -rn "query string is ignored\|ignored when deriving" --include=*.md returns nothing repo-wide; the only "query string" mentions left are the new paragraph.
  2. Paragraph states both facts — MET. New §URL mapping text: "The query string is part of the namespace identity, so two URLs that differ only in their query string address different namespaces. The option values themselves are not applied to the conformance server; a URL pragma such as ?journal_mode=WAL selects a separate namespace rather than changing server behavior." The first fact matches plan() (identity = normalized + "?" + query, hashed into the namespace); the second fact (option values not applied) is retained.
  3. Wording consistent with the XerialConformanceDriver class Javadoc — MET. Javadoc: "The query string is part of the namespace identity, so two URLs with different options address different namespaces; the options themselves are not applied to the server." The README restates the same two claims with no contradiction.

Behavior verified from the head checkout (commands exactly as requested)

  1. mise exec -- ./mvnw -q -pl libsql-conformance -am -Dit.test='XerialHarnessTest#queryStringIsPartOfTheFileNamespace' -Dfailsafe.failIfNoSpecifiedTests=false verify → exit 0; report line: Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
  2. mise exec -- ./mvnw -q -pl libsql-conformance -am -Dit.test='XerialHarnessTest#fileNamespacesWithDifferentQueryStringsAreIsolated' -Dfailsafe.failIfNoSpecifiedTests=false verify → exit 0; report line: Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

Reviewer notes

  • The second test genuinely exercised sqld, not a short-circuit. It starts the container lazily, but the JUnit LauncherSessionListener guard (LibsqlConformanceGuard.verify()) opens a connection before test execution, which starts the container. That is why the reported testcase time is only ~0.06-0.1 s while total Maven wall time was ~9 s. The guard fails the run unless the connection reports the libSQL driver/product and an alt1 source id; the run used ghcr.io/tursodatabase/libsql-server:v0.24.33 and reported Skipped: 0.
  • Both tests are pre-existing. This PR changes docs only, so they confirm the documented behavior rather than the diff itself.
  • Non-blocking, outside Fix libsql-conformance README: query string is part of the namespace identity #182's scope: the paragraph does not call out the file:...?mode=memory special case, where the URL maps to a fresh in-memory namespace per connection (retained=false). It does not contradict the new wording.

@magnusp
magnusp merged commit ce020d1 into main Oct 24, 2026
6 checks passed
@magnusp
magnusp deleted the docs/issue-182-query-string-namespace branch October 24, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix libsql-conformance README: query string is part of the namespace identity

1 participant