You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Artipod 0.14.0 exposes native Bash through the CLI. This change gives Linux Node hosts a public API for running the same SRT backend against an existing virtual pod. Pass a confined sandbox to createNativePodShell from @artipod/core/native, then pass the resulting shell to createSandboxTools or call shell.exec() directly.
The library verifies protected working storage, stages the pod's files, captures bounded output and reconciles changes after the native process finishes. It uses the existing Artipod SRT worker and its startup and shutdown acknowledgements. Cancellation, deadlines and loss of the calling worker retire the protected checkout. The embedding application chooses the authorized pod, serializes access to its overlay and decides when to commit its ref.
The package export and CLI were built and checked with TypeScript and ESLint. Tests cover lazy encrypted overlays, binary edits, renames, failed imports, cancellation and worker loss. Linux regression tests cover Ctrl+C cleanup, cancellation while a virtual file read is stalled, and observer notification after reconciliation. Encrypted project tests verify that restricted file and directory modes survive reopening and that a surviving child retains its private ancestors after a concurrent deletion. Hosted native tests · Merge regression
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Stalled lazy-file reads ignore aborts, so shell.exec() can remain pending after a timeout, cancellation, or disposal, retaining the protected checkout and keeping the shell busy. Separately, Ctrl+C during staging or reconciliation can terminate the worker without cleanup, leaving the decrypted checkout behind. Directory permissions are also discarded, so restrictive mkdir modes and chmod changes can be silently lost.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
On unprivileged Linux hosts, a successful command that leaves a regular file with mode 000 causes output inspection to fail with EACCES, discarding all completed edits. Separately, native execution omits the post-reconciliation fs:changed notification for sandboxes created with pod.createSandbox(), leaving event-driven consumers such as TreeSource stale.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Emit fs:changed after native execution reconciliation
src/native/pod-shell.ts:92
Native execution bypasses the supplied sandbox's execution path and never emits a command-boundary fs:changed notification after reconciliation. For a sandbox created by pod.createSandbox(), native edits therefore leave event-driven consumers such as TreeSource (src/host/tree-source.ts:39–40) stale, unlike ordinary shell edits. Preserve access to the pod's event bus or add an explicit notification hook, and notify it after reconciliation completes; pushing the ref alone does not invalidate these consumers.
Allow inspection of files changed to mode 000
src/native/project-tree.ts:137
On an unprivileged Linux host, a valid command such as printf updated > note; chmod 000 note succeeds, but this O_RDONLY open fails with EACCES. Inspection then rejects the entire output, discarding all completed edits instead of importing the file and its mode. Directories already receive temporary traversal permissions; provide similarly safe access to verified single-link regular files while retaining their original mode for reconciliation.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
When one head deletes a 0700 directory and its file while the other edits the file after the deletion timestamp, the merge keeps the file but drops the directory metadata. OciViewFS then recreates the directory as 0755 instead of 0700, widening its permissions.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Preserve ancestor directory permissions when descendants survive deletion
src/manager/merge.ts:299
When one head deletes /private (mode 0700) and its file while the other only edits that file after the deletion timestamp, this drops the unchanged directory but keeps the file. OciViewFS then recreates /private as 0755, widening its permissions. After choosing winners, retain explicit ancestor-directory metadata for surviving descendants and add a deletion-versus-child-edit regression test.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Merges and served-folder round trips may lose empty directories or directory metadata, potentially broadening private-directory permissions, so preservation of these properties needs human review.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Security-sensitive native execution relies on Linux PID-namespace teardown and protected-checkout retirement across worker loss. Those kernel/runtime guarantees still need human validation with real SRT, particularly during cancellation and supervisor failure.
No open issues 🎉
Review effort: Balanced
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
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.
Artipod 0.14.0 exposes native Bash through the CLI. This change gives Linux Node hosts a public API for running the same SRT backend against an existing virtual pod. Pass a confined sandbox to
createNativePodShellfrom@artipod/core/native, then pass the resulting shell tocreateSandboxToolsor callshell.exec()directly.The library verifies protected working storage, stages the pod's files, captures bounded output and reconciles changes after the native process finishes. It uses the existing Artipod SRT worker and its startup and shutdown acknowledgements. Cancellation, deadlines and loss of the calling worker retire the protected checkout. The embedding application chooses the authorized pod, serializes access to its overlay and decides when to commit its ref.
The package export and CLI were built and checked with TypeScript and ESLint. Tests cover lazy encrypted overlays, binary edits, renames, failed imports, cancellation and worker loss. Linux regression tests cover Ctrl+C cleanup, cancellation while a virtual file read is stalled, and observer notification after reconciliation. Encrypted project tests verify that restricted file and directory modes survive reopening and that a surviving child retains its private ancestors after a concurrent deletion. Hosted native tests · Merge regression