Skip to content

test(tests): isolate tokenizer cache mounts process table and path - #2956

Merged
dan-petty merged 1 commit into
mainfrom
test/2165-hermetic-floor-host-independence
Nov 1, 2026
Merged

dan-petty merged 1 commit into
mainfrom
test/2165-hermetic-floor-host-independence

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

This change enforces floor isolation across hosts:

  • Sets TIKTOKEN_CACHE_DIR and DATA_GYM_CACHE_DIR to an empty temporary directory in tests/conftest.py by default.
  • Provides isolated test doubles for ci.diagnostics._PROC_MOUNTS and k8s.port_forward_daemon._PROC_ROOT.
  • Updates tests/k8s/test_k8s_port_forward_daemon.py to use process_start_ticks.
  • Configures scanner_fake to construct a hermetic PATH with only stand-in binaries and the Python interpreter directory.
  • Installs an open guard in tests/conftest.py that fails any test trying to open files under /proc, /usr/local/share/tiktoken, or host paths outside the repository, temporary directory, and interpreter.
  • Removes host-decided skips across the test suite for symlinks, Latin-1 paths, and root file access permissions.

Closes #2165

@dan-petty dan-petty added the type/test Type test: a new or changed test label Oct 31, 2026
@dan-petty dan-petty changed the title test(floor): isolate tokenizer cache mounts process table and path across hosts test(tests): isolate tokenizer cache mounts process table and path across hosts Oct 31, 2026
@dan-petty
dan-petty force-pushed the test/2165-hermetic-floor-host-independence branch 2 times, most recently from 267574a to 66e986a Compare October 31, 2026 23:22
@dan-petty dan-petty changed the title test(tests): isolate tokenizer cache mounts process table and path across hosts test(tests): isolate tokenizer cache mounts process table and path Oct 31, 2026
@dan-petty
dan-petty force-pushed the test/2165-hermetic-floor-host-independence branch 5 times, most recently from 1aa0ea5 to 0f793c6 Compare November 1, 2026 00:29
Enforce floor isolation for tokenizer cache, mounts, and process tables. Scanner fakes now construct a hermetic PATH containing only stand-ins and the interpreter. Host-decided skips are removed so tests execute consistently across devcontainer and CI runners.

Closes #2165
@dan-petty
dan-petty force-pushed the test/2165-hermetic-floor-host-independence branch from 0f793c6 to 6dbbcd4 Compare November 1, 2026 00:49
@dan-petty
dan-petty marked this pull request as ready for review November 1, 2026 00:56
@dan-petty
dan-petty merged commit 61eb6c4 into main Nov 1, 2026
19 checks passed
@dan-petty
dan-petty deleted the test/2165-hermetic-floor-host-independence branch November 1, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/test Type test: a new or changed test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(floor): every test sees the same tokenizer cache, mounts, process table, PATH and programs on every host, and no skip depends on the host

1 participant