Skip to content

test(vscode): pin the settings shape that actually exists in the wild - #190

Merged
PYDuquesnoy merged 1 commit into
masterfrom
test/vscode-servers-map-absent
Sep 3, 2026
Merged

test(vscode): pin the settings shape that actually exists in the wild#190
PYDuquesnoy merged 1 commit into
masterfrom
test/vscode-servers-map-absent

Conversation

@PYDuquesnoy

Copy link
Copy Markdown
Contributor

The SKILLS session swept its tree for #187 exposure and found three .vscode/settings.json of one shape, none of which the test suite covered:

{ "objectscript.conn": { "active": true, "server": "workshop-iris", "ns": "HOSPITAL" },
  "objectscript.export": { "folder": "src", "atelier": true } }

active: true, a server name, and no intersystems.servers map at all — because Server Manager keeps the server definition in USER-scope settings, which this binary does not read. That is the commonest real entry in the wild, and under 0.17.0's precedence it is now reached at step 4, ahead of the port scan that currently serves those directories.

Why the neighbouring test didn't already cover it

a_named_server_with_no_matching_entry_is_not_configured covers map present, key absent. This shape takes a different sub-expression: intersystems_servers.as_ref() yields None before .get() is ever reached. Two branches that ought to agree are not evidence that they do.

Evidence

Behaviour was verified at the wire on the shipped 0.17.0 binary before this test existed — 0 #187 warnings, the scans ran, ✓ Compiled: T.cls, with a no-.vscode control returning zero. The branch simply had no test.

Distinguishing mutation control. Making a missing map skip the named path and fall through to direct host/port fails only the new test:

test result: FAILED. 13 passed; 1 failed
  a_server_name_with_no_servers_map_at_all_is_not_configured
  → reported a missing password for a server that was never resolved

A mutation on the shared match arm would have killed both tests and proved nothing about coverage. This one isolates the branch, which is the whole claim being made.

Scope

Tests only. No behaviour change, no version bump. Gate run as one command: cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace → 47 suites green.

Issue 187 stays open for the search-path gap this shape is a symptom of: user-scope VS Code settings are still not read, and there is no keychain reader.

🤖 Generated with Claude Code

The SKILLS session swept its tree for #187 exposure and found three .vscode/settings.json
of one shape, none of which my tests covered:

  {"objectscript.conn": {"active": true, "server": "workshop-iris", "ns": "HOSPITAL"},
   "objectscript.export": {"folder": "src", "atelier": true}}

active:true, a server NAME, and no intersystems.servers map at all — because Server
Manager keeps the server definition in USER-scope settings, which this binary does not
read. That is the commonest real entry, and under 0.17.0's precedence it is now reached
at step 4, ahead of the port scan that currently serves those directories.

a_named_server_with_no_matching_entry_is_not_configured covers the NEIGHBOURING case:
map present, key absent. This shape takes a different sub-expression —
intersystems_servers.as_ref() yields None before .get() is ever reached — and two
branches that should agree are not evidence that they do.

Behaviour was already verified at the wire on the shipped 0.17.0 binary before this
test existed: 0 warnings, the scans ran, `✓ Compiled`. The branch simply had no test.

Distinguishing mutation control, not just a mutation: making a missing map skip the
named path and fall through to direct host/port fails ONLY the new test (13 passed,
1 failed) with "reported a missing password for a server that was never resolved".
A mutation on the shared match arm would have killed both tests and proved nothing
about coverage; this one isolates the branch.

Tests only — no behaviour change, no version bump. #187 stays open for the search-path
gap this shape is a symptom of: user-scope settings are still not read.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PYDuquesnoy
PYDuquesnoy merged commit f47f186 into master Sep 3, 2026
5 checks passed
@PYDuquesnoy
PYDuquesnoy deleted the test/vscode-servers-map-absent branch September 3, 2026 03:59
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.

1 participant