Repository navigation
1.11.3: a foreign image's kernel runs in the contract's working directory - #44
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The regression assertion still accepts /home/datalayer/content, the path that caused the conformance failure, so it must check the complete assignment to distinguish the required working directory from its subdirectories.
1 open issue
What changed in this PR
This PR makes foreign-image kernels use the contract’s working directory rather than a directory inherited from the base channel’s Jupyter configuration.
Changes:
- Pins
MappingKernelManager.root_dirin the contract layer. - Adds a regression test for the generated configuration.
- Bumps the package version to
1.11.3.
| File | Description |
|---|---|
tests/test_environment_foreign_contract_layer.py |
Adds a check for the kernel working-directory override. |
code_sandboxes/environments/adapters/datalayer.py |
Appends the contract’s kernel root directory to Jupyter configuration. |
code_sandboxes/__version__.py |
Updates the version to 1.11.3. |
Review effort: Balanced
| from code_sandboxes.environments.adapters.datalayer import _contract_user | ||
|
|
||
| pinned = next(line for line in _contract_user() if "MappingKernelManager.root_dir" in line) | ||
| assert "/home/datalayer" in pinned and "/usr/local/share/jupyter_config.py" in pinned |
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.

A foreign image copies
jupyter_config.pyfrom the approved base, and the 2026.09 channel's starts a kernel in/home/datalayer/content. A real build then failedconformance:2:cwd is '/home/datalayer/content', not '/home/datalayer', with every other gating check passing. The contract layer now pinsMappingKernelManager.root_diras the current base's Dockerfile does.