Let the guest make hard links in a volume #3
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 247 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.330
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3"
general
weight: 0.35
fzakaria
A guest could not make a hard link in a volume.
lnfailed with EPERM, and so did every package manager that puts a file in place with a link. WithUV_CACHE_DIRon a volume,uv syncstops with:Change
rootfs.DirTreegetsHardlink(target, path), served as the POST operationhardlink(pthe new name,tthe existing file).os.Root.Linkkeeps both names inside the volume. I checked that it refuses..and a symlinked parent on either side. A symlink as the last component is linked as itself, not followed (linkat with flags 0).volumeFspasses the SDK'slink(target, path)on to the new operation.failWithnow names EXDEV and EMLINK. A tool that copies when it cannot link needs to tell those apart from EIO.This needs pithings/unkernel#46, which makes the SDK's 9p server call
Fs.linkforTlink(it answered EPERM always). Until the pinned unkernel innix/unkernel.nixhas that change, this PR changes nothing the guest can see.Tests
internal/rootfs,TestHardlink:- a second name for one file (
os.SameFile, link count 2)- EEXIST when the name is taken
- a directory refused
- through the handler
- a link to a file outside the volume refused
- 403 on a read-only tree
go test ./internal/...passes.End to end
I applied unkernel#46's
Tlinkto the share's SDK bundle by hand and used this branch'sgo build:ln /s/a /s/bin a volume gives one inode on the host (2 links). A secondlnsays "File exists". The release binary says "Operation not permitted".uv syncwithUV_CACHE_DIRon a volume works and fills the cache. The release binary fails as above.Not run:
nix flake check(no nix on this machine).🤖 Generated with Claude Code