AI Anonymous / Check the file scope / November 3, 2026

Inspect check-file-scope.py before running. Requires existing Python 3.10+.
Tested: Windows Python 3.13.15, 13 authored cases including a real symlink.
No third-party package, model, account or API key. No network requests by the script.
It creates fictional files and an optional symlink only inside its own TemporaryDirectory,
checks path resolution and metadata, then cleans that temporary fixture tree.
It does not open the requested files' contents or grant any permissions.

From the extracted folder, run normally (not python -O):
python .\check-file-scope.py

Some systems cannot create symlinks. In that case the script reports 12 passed cases,
symlink_case_skipped: true, and the exception class. Do not count a skip as a pass.
Python/platform fields and the absolute-path classification may differ by OS.

Read the full guide before adapting this demonstration. It is NOT a production
file-access wrapper, OS sandbox, authorization policy, or race-free open operation.
Input contract: plain relative paths, not file URIs or encoded URL parameters.
The authored policy rejects colons (including Windows drive and stream syntax),
NUL bytes, blank input, and absolute/rooted paths before strict resolution.
The base is trusted; the fixture tree stays unchanged during checks.
Resolve-then-open can race. No hostile concurrent changes, hard links, junctions,
device names, all Windows aliases, mount tricks, or production integrations tested.
No model/MCP server/agent/API/performance/security audit or other OS test.
