Skip to content

PR #242: nine branch-added assertions that cannot pass against any implementation #243

Description

@MelbourneDeveloper

Nine assertions on the fixes branch (PR #242) cannot pass against any implementation. Each was read in full and traced to the code it exercises; none of them exists on main.

Filing these together because they are the whole of what stands between PR #242 and a green build. The product-side defects behind the rest of the red are fixed and pushed (a249624..0ec88e5, 17 defects, no test file touched).

Cannot pass

1-3. debug-test-groups-e2e.test.ts:180 and two siblings — "the launch was answered"
eq(recorder.responses('launch').length >= 1, true). A Test Explorer debug run is an attach: src/editors/vscode/src/test-debug.ts:127 builds request: 'attach'. No launch request is ever issued, so none is ever answered.

4. debug-exceptions-e2e.test.ts:287 — "unticking every exception filter mid-session silences the next throw"
Traced with SHARPLSP_DAP_TRACE=1: the empty setExceptionBreakpoints reaches the adapter and is answered ok=true; 44 ms later netcoredbg stops on "An unhandled exception of type...". MODE.both ends with ThrowUnhandled() — the program cannot both crash by design and run to completion, and suppressing that stop would take the user's crash site away.

5. debug-callstack-e2e.test.ts:267 — "a stack that stopped at Main is a truncated stack, not a filtered one"
The debuggee is a plain console app; its managed stack at a breakpoint in Add is Add -> Accumulate -> Main, and Main is the bottom. Nothing is filtering: isForeignMachinery only ever matches F# machinery names.

6. debug-exception-filters-e2e.test.ts:155 — "the request carries filterOptions"
Asserts on onlyType(NEVER_THROWN_TYPE), a literal the test constructs as { filters, exceptionOptions } and never sends. It has no filterOptions and never will.

7. test-explorer-coverage.test.ts:292 (and the readdirSync at ~983)
reportDirsOf returns bare directory names; the assertions path.join(dir, REPORT_NAME) and fs.readdirSync(dir) them as paths, resolving against the extension host's cwd. That is the ENOENT: scandir '4b6bcf60-...'. The identical block ~20 lines below joins through the results directory correctly.

8. test-explorer-coverage.test.ts — the TRX contradiction
One assertion requires at least one .trx to survive in the results directory; a later one requires zero. No dotnet test runs between the two reads.

9. testing-lens-status.test.ts:1241
Demands a lens for Cs.Xunit.Fixtures.LibraryTests.Covers_The_Library inside Tests.cs. The fixture defines that method in LibraryTests.cs and comments it as "the C# test project's SECOND source file".

Also: fsharp-lsp-hierarchy.test.ts:58 — "no two lenses may share an anchor"
Contradicts [TEST-STATUS-LENS]. src/editors/vscode/src/test-lens.ts:134-152 deliberately pushes three lenses at the same range (status, Run Test, Debug Test); VS Code renders them inline side by side. Satisfying this would mean collapsing them into one.

And: debug-test-fsharp-e2e.test.ts — "both user frames resolve to the .fs file the user wrote"
Interaction 4 re-reads the stack after Interaction 3 has stepped out of the helper. One user frame can remain; never two.

Needs a ruling rather than a fix

lsp-refactor-spec-gaps.test.ts:132 wants Encapsulate-field at kind refactor. The currently-green lsp-refactor-core asserts refactor.rewrite for the same Roslyn provider and the same title template — the titles differ only in the substituted field name. No mapping rule keyed on provider, title, span or caret can satisfy both. Special-casing the field name would be a suppression wearing a mapping rule's clothes.

Not blocked, just not small

Four lsp refactoring rows (generate constructor, inline method, convert method to property, introduce parameter) need three new Roslyn refactoring providers plus container-action resolution. That is feature work, not a fix.

Two more, correctly failing for environmental reasons

  • lsp-integration.test.ts selection ranges expects MyClass and gets My — that is VS Code's own sub-word smart-select provider, which merges with ours and cannot be overridden by a server.
  • lsp-integration.test.ts parameter-name inlay hints filters hints by line, so it catches the var total type hint sitting on the same line as Add(1, 2). The wire types and kinds match end to end.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions