Add workspace-scoped runtime path policy - #340
Open
Aaron Aspinwall (AaronAspinwall123) wants to merge 2 commits into
Open
Add workspace-scoped runtime path policy#340Aaron Aspinwall (AaronAspinwall123) wants to merge 2 commits into
Aaron Aspinwall (AaronAspinwall123) wants to merge 2 commits into
Conversation
Introduce canonical workspace roots and typed containment for configs, inputs, outputs, and managed trees. Cover traversal, external roots, linked paths, and Windows path normalization with focused tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 11b8494c-d35b-46ff-b5d5-bbe3dbff0586
Aaron Aspinwall (AaronAspinwall123)
requested review from
Chang Liu (changliu2),
Jake Present (jakepresent) and
tangym
as code owners
September 1, 2026 18:08
Chang Liu (changliu2)
requested changes
Sep 4, 2026
Chang Liu (changliu2)
left a comment
Collaborator
There was a problem hiding this comment.
Requesting changes on exact head 034fc7e for three path-policy correctness issues:
- Windows reserved device names are accepted as managed outputs.
resolve_output("NUL")returns<artifacts_root>\NUL; writing to it succeeds against the DOS device but creates no artifact. Reject reserved/device path components before authorizing output paths. - Canonical Windows handling is applied only to containment checks, not the public APIs that follow them.
WorkspaceService.reference()resolves relative inputs against the process CWD, an equivalent\\?\C:\...workspace path passes containment and then raises a rawValueErroratrelative_to, andrequire_managed_root()rejects the equivalent extended path as an override. Anchor relative references to the workspace and use the same canonical representation for relative/equality operations. - Root validation permits invalid or aliased trees. An existing file is accepted as
config_root, and anevalsjunction targetingartifactscollapses the config and managed-output roots so the same pathname is authorized for both. Reject existing non-directory roots and require config and managed-output roots to remain disjoint after canonical resolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce canonical workspace roots and typed containment for configs, inputs, outputs, and managed trees. Cover traversal, external roots, linked paths, and Windows path normalization with focused tests.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Summary
Motivation / linked issue
Changes
Testing
Checklist
pytestand/or viewer checks as applicable).CHANGELOG.mdentry is included.