Skip to content

Workbench .NET tests: 7 pre-existing failures on Linux CI (path assumptions + stale storage-introspection) #426

Closed

Description

@nockawa

Parent: Epic #418 (Testing & CI)

Summary

The Workbench .NET test suite (test/Typhon.Workbench.Tests) has 7 pre-existing failures on the Linux CI gate box (c6id / ubuntu). Surfaced 2026-07-01 by the merge-gate run of PR #424 — the first PR since the gate went live (#405) to trigger the Workbench suite. They are not caused by #424 (which touched only the engine + Typhon.slnx); the engine suite passed clean. Green on a Windows dev box, red on the Linux CI box.

workbench.trx: 620 total / 594 passed / 7 failed.

Failures — two categories

A. Linux platform assumptions (pass on Windows, fail on ubuntu)

  1. ResolveAbsolutePath_AlreadyAbsolute_DoesNotJoinWorkspaceRoot — feeds a Windows path C:\different\workspace\…; on Linux that is not absolute, so the code joins it to the workspace root → Does.Not.Contain("workspace") fails.
  2. GetSource_CSharpFile_ReturnsEnclosingMethodBlock — writes a temp .cs file then gets File not found → 404 instead of 200 (temp-dir/path handling).
  3. GetSource_AbsolutePath_BypassesWorkspaceGuardAndReadsFile — same temp-file 404.

B. Stale storage-introspection tests vs. the v4 directory-root rework

  1. GetPage_DecodesOccupancyRoot — expects PageType == "Occupancy", engine now returns "Root".
  2. GetPage_OccupancyRoot_RendersGovernedRegionMap — same "Occupancy" vs "Root".
  3. GetPage_VsbsPage_CarriesElementFill — expects non-empty ChunkFill, engine returns empty.
  4. GetPage_IndexPage_ClassesLeafInternalAndHatchesDirectory — expects non-empty ChunkClass, engine returns empty.

Category B lines up with the recent v4 directory-only-root storage change (root now holds only the page directory) — the introspection page-type taxonomy changed and these Workbench tests were never updated.

Fix directions

  • A — make the path/temp handling OS-agnostic (don't rely on C:\-style absolute detection in the test inputs; use Path.GetTempPath() consistently on both the test and server side).
  • B — update the expected PageType / ChunkFill / ChunkClass to the current v4 introspection output (verify against DatabaseEngine.StorageIntrospection).

Evidence

Activity

  1. self-assigned this
    on Jul 1, 2026
  2. added theissue type on Jul 1, 2026
  3. moved this to Todo in Typhonon Jul 1, 2026
  4. added a commit that references this issue on Jul 4, 2026
  5. nockawa commented on Jul 4, 2026

    @nockawa
    CollaboratorAuthor

    These 7 are now disabled at execution via NUnit [Ignore("… tracked by #426")] on main (merged in PR #451), so the merge gate is green while the real fix stays tracked here. This issue remains open — the tests are skipped, not fixed.

    Tests carrying the [Ignore]:

    • ProfilerSourceControllerTests — Linux path assumptions:
      • ResolveAbsolutePath_AlreadyAbsolute_DoesNotJoinWorkspaceRoot
      • GetSource_AbsolutePath_BypassesWorkspaceGuardAndReadsFile
      • GetSource_CSharpFile_ReturnsEnclosingMethodBlock
    • StorageMapDetailTests — stale vs the v4 directory-root introspection:
      • GetPage_DecodesOccupancyRoot
      • GetPage_OccupancyRoot_RendersGovernedRegionMap
      • GetPage_VsbsPage_CarriesElementFill
      • GetPage_IndexPage_ClassesLeafInternalAndHatchesDirectory

    To resolve: apply the two fix directions from the description — (A) OS-agnostic path/temp handling so a /-rooted input is treated as absolute; (B) update the expected PageType / ChunkFill / ChunkClass to the current v4 introspection output — then remove the 7 [Ignore] attributes (grep tracked by #426).

  6. moved this from Todo to In Progress in Typhonon Jul 4, 2026
  7. nockawa commented on Jul 4, 2026

    @nockawa
    CollaboratorAuthor

    Implemented on fix/426-workbench-ci-tests (pending review + commit)

    All 7 [Ignore] attributes removed; both root causes fixed.

    A — path assumptions (product fix, ProfilerSourceController.cs). The absolute-path detection was hand-rolled to recognize only Windows forms (X:, \\, //), so a POSIX-absolute path (IsPathRooted==true but no drive letter) was mis-classified as relative and joined onto the workspace root on Linux. Replaced with Path.IsPathFullyQualified in both ResolveAbsolutePath and GetSource — OS-agnostic (drive/UNC on Windows, /-rooted on Linux), with the /_/ repo-relative branch still checked first and the traversal guard intact.

    B — stale v4 introspection (test fix, StorageMapDetailTests.cs). The 4 tests probed stale page indices. Retargeted to the correct v4 pages, discovered from the segment table (not hardcoded):

    • Occupancy tests → the Occupancy segment's root (was hardcoded page 1, now the directory Root). RendersGovernedRegionMap further moved to the first occupancy data page (renamed GetPage_OccupancyPage_…) because the directory-only root governs zero pages in v4 (GetOccupancyPageGovernedRange rootGoverned == 0).
    • Vsbs/Index tests → the first non-root data page (new FirstDataPageAsync helper), since the v4 root carries zero chunks.

    Finding: the demo's 8 index segments are the engine's schema-catalog indexes and are all node-less (directory chunk only). The original IndexPage test Assert.Ignored wholesale when it found no node — even after its directory-hatch assertions passed. Restructured so the directory-hatch verification is the spine (runs + passes on the first data page) and the leaf/internal node-role decode is an optional cross-check (if (node exists)). Strictly stronger than the original on this demo.

    Verification: full Typhon.Workbench.Tests suite green locally — 600 passed / 0 failed / 9 skipped; all 7 target tests confirmed running and passing (not skipped). B is platform-independent (fully verified). A is a Linux-specific bug (passes on Windows regardless) — the Linux fix holds by Path.IsPathFullyQualified's cross-platform semantics and will be confirmed on the merge-gate Linux runner.

  8. moved this from In Progress to Done in Typhonon Jul 4, 2026
  9. added a commit that references this issue on Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Estimate

None yet

Area

None yet

Start date

None yet

Target date

None yet

Bug status

None yet

Product

CI

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions