Skip to content

Commit 4cb636d

Browse files
committed
chore: run-precommit on everything
1 parent 4006312 commit 4cb636d

File tree

62 files changed

+1898
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1898
-940
lines changed

.cspell.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"useGitignore": true,
66
"ignorePaths": [
77
"specs/Initial Developer Input/**",
8-
"specs/Research/**"
8+
"specs/Research/**",
9+
"repomix.md",
10+
".obsidian/**"
911
],
1012
"words": [
1113
"Blocksense","zellij","devcontainers","sandboxed","preconfigured","agentic","triager",
@@ -20,6 +22,12 @@
2022
"tailscaled","Headscale","tailnet","bytestreams",
2123
"cachix","sccache","GOPATH","ccache","substituters","pipx","ZDOTDIR","OPENROUTER","tini","WCAG","automations",
2224
"scriptable","Rakefile","Ilib","subvolumes","reflinks","lowerdir","upperdir","venv","MSYS","pytest","rescan","lockfiles","virtualenv","exfiltration",
23-
"LOCALAPPDATA","AUTOINCREMENT","pijul"
25+
"LOCALAPPDATA","AUTOINCREMENT","pijul",
26+
"Sandboxing","pids","distro","userns","openat2","overlayfs","slirp","netns","nodev","nosuid","noexec","devpts","ptys","newinstance","GOCACHE","EACCES","EPERM","PTRACER","dumpable","veth","PRIVS","setuid","syscalls","kexec","tunables","DNAT","cgroupfs","netdev","securebits","privs","ADDFD","TOCTOU","fanotify","resolv",
27+
"unshares","notif","NEWUSER","newuidmap","newgidmap","NEWNS","NEWPID","NEWUTS","NEWIPC","NEWTIME","NEWNET","hidepid","ptmxmode","urandom","ptmx","setattr","RDONLY","upperdirs","statx","fstatat","faccessat","execve","execveat","linkat","renameat","syscall","MAGICLINKS","NOTIF","errno","tracee","mmap","nftables","chowning","openat",
28+
"exitstatus","autorun","mountpoint","rebornix","rdbg","popen","envgen","progname",
29+
"tagxref","tagid","tagname","revset","objid","whatchanged","revno","mlink","fnid",
30+
"DEVNULL","autosync","fslckout","hgrc","revid","autopush","EDQUOT","Repomix","optparse","hexdigest","mktmpdir","envrc","rubocop","Justfile","Shellwords","shellwords","gettime","nprocessors","pipefail","esac","elif","incovenient","Futhermore","dispay","Rubo","metacraft",
31+
"pico","testuser","NOSYSTEM","ASKPASS","subvol","qgroup","Workstreams","binwrite","extensionless","choco","Itest","mswin"
2432
]
2533
}

.devcontainer/scripts/efficient-copy.sh

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -18,64 +18,64 @@ set -euo pipefail
1818
# $2 - Destination directory path
1919
# $3 - Optional: --verbose for detailed output
2020
efficient_copy() {
21-
local source_dir="$1"
22-
local dest_dir="$2"
23-
local verbose=false
21+
local source_dir="$1"
22+
local dest_dir="$2"
23+
local verbose=false
2424

25-
# Parse optional verbose flag
26-
if [[ "${3:-}" == "--verbose" ]]; then
27-
verbose=true
28-
fi
25+
# Parse optional verbose flag
26+
if [[ "${3:-}" == "--verbose" ]]; then
27+
verbose=true
28+
fi
2929

30-
# Validate source directory exists and is not empty
31-
if [[ ! -d "$source_dir" ]] || [[ -z "$(ls -A "$source_dir" 2>/dev/null)" ]]; then
32-
[[ "$verbose" == true ]] && echo "Source directory '$source_dir' doesn't exist or is empty"
33-
return 1
34-
fi
30+
# Validate source directory exists and is not empty
31+
if [[ ! -d "$source_dir" ]] || [[ -z "$(ls -A "$source_dir" 2>/dev/null)" ]]; then
32+
[[ "$verbose" == true ]] && echo "Source directory '$source_dir' doesn't exist or is empty"
33+
return 1
34+
fi
3535

36-
# Ensure destination directory exists
37-
if ! mkdir -p "$dest_dir"; then
38-
[[ "$verbose" == true ]] && echo "Failed to create destination directory '$dest_dir'"
39-
return 2
40-
fi
36+
# Ensure destination directory exists
37+
if ! mkdir -p "$dest_dir"; then
38+
[[ "$verbose" == true ]] && echo "Failed to create destination directory '$dest_dir'"
39+
return 2
40+
fi
4141

42-
# Strategy 1: Copy-on-write (fastest, zero disk usage until modification)
43-
if command -v cp >/dev/null 2>&1 && cp --help 2>/dev/null | grep -q "\--reflink"; then
44-
[[ "$verbose" == true ]] && echo "Attempting copy-on-write..."
45-
if cp -r --reflink=auto "$source_dir"/* "$dest_dir/" 2>/dev/null; then
46-
[[ "$verbose" == true ]] && echo "✓ Copy-on-write successful"
47-
return 0
48-
fi
49-
[[ "$verbose" == true ]] && echo "✗ Copy-on-write failed, trying hard links..."
42+
# Strategy 1: Copy-on-write (fastest, zero disk usage until modification)
43+
if command -v cp >/dev/null 2>&1 && cp --help 2>/dev/null | grep -q "\--reflink"; then
44+
[[ "$verbose" == true ]] && echo "Attempting copy-on-write..."
45+
if cp -r --reflink=auto "$source_dir"/* "$dest_dir/" 2>/dev/null; then
46+
[[ "$verbose" == true ]] && echo "✓ Copy-on-write successful"
47+
return 0
5048
fi
49+
[[ "$verbose" == true ]] && echo "✗ Copy-on-write failed, trying hard links..."
50+
fi
5151

52-
# Strategy 2: Hard links (fast, space-efficient, same filesystem required)
53-
if cp -rl "$source_dir"/* "$dest_dir/" 2>/dev/null; then
54-
[[ "$verbose" == true ]] && echo "✓ Hard link copy successful"
55-
return 0
56-
fi
57-
[[ "$verbose" == true ]] && echo "✗ Hard link copy failed, trying rsync..."
52+
# Strategy 2: Hard links (fast, space-efficient, same filesystem required)
53+
if cp -rl "$source_dir"/* "$dest_dir/" 2>/dev/null; then
54+
[[ "$verbose" == true ]] && echo "✓ Hard link copy successful"
55+
return 0
56+
fi
57+
[[ "$verbose" == true ]] && echo "✗ Hard link copy failed, trying rsync..."
5858

59-
# Strategy 3: Rsync with deduplication (good for incremental updates)
60-
if command -v rsync >/dev/null 2>&1; then
61-
if rsync -a --link-dest="$source_dir" "$source_dir"/ "$dest_dir/" 2>/dev/null; then
62-
[[ "$verbose" == true ]] && echo "✓ Rsync copy successful"
63-
return 0
64-
fi
65-
[[ "$verbose" == true ]] && echo "✗ Rsync failed, trying regular copy..."
59+
# Strategy 3: Rsync with deduplication (good for incremental updates)
60+
if command -v rsync >/dev/null 2>&1; then
61+
if rsync -a --link-dest="$source_dir" "$source_dir"/ "$dest_dir/" 2>/dev/null; then
62+
[[ "$verbose" == true ]] && echo "✓ Rsync copy successful"
63+
return 0
6664
fi
65+
[[ "$verbose" == true ]] && echo "✗ Rsync failed, trying regular copy..."
66+
fi
6767

68-
# Strategy 4: Regular copy (slowest but most compatible)
69-
if cp -r "$source_dir"/* "$dest_dir/" 2>/dev/null; then
70-
[[ "$verbose" == true ]] && echo "✓ Regular copy successful"
71-
return 0
72-
fi
68+
# Strategy 4: Regular copy (slowest but most compatible)
69+
if cp -r "$source_dir"/* "$dest_dir/" 2>/dev/null; then
70+
[[ "$verbose" == true ]] && echo "✓ Regular copy successful"
71+
return 0
72+
fi
7373

74-
[[ "$verbose" == true ]] && echo "✗ All copy methods failed"
75-
return 3
74+
[[ "$verbose" == true ]] && echo "✗ All copy methods failed"
75+
return 3
7676
}
7777

7878
# If script is executed directly (not sourced), call the function with arguments
7979
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
80-
efficient_copy "$@"
80+
efficient_copy "$@"
8181
fi

.devcontainer/scripts/setup-nix-substituters.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
# Check if we've already configured the substituters
88
if grep -q "extra-substituters.*file:///nix/host-store" ~/.config/nix/nix.conf 2>/dev/null; then
9-
# Already configured, exit silently
10-
exit 0
9+
# Already configured, exit silently
10+
exit 0
1111
fi
1212

1313
if [ -d "/nix/host-store" ] && [ "$(ls -A /nix/host-store 2>/dev/null)" ]; then
14-
echo "Host Nix store detected, enabling substituter..."
15-
echo "extra-substituters = file:///nix/host-store" >> ~/.config/nix/nix.conf
16-
echo "trusted-substituters = file:///nix/host-store" >> ~/.config/nix/nix.conf
14+
echo "Host Nix store detected, enabling substituter..."
15+
echo "extra-substituters = file:///nix/host-store" >>~/.config/nix/nix.conf
16+
echo "trusted-substituters = file:///nix/host-store" >>~/.config/nix/nix.conf
1717
else
18-
echo "No host Nix store found, using container-only mode"
18+
echo "No host Nix store found, using container-only mode"
1919
fi

.devcontainer/scripts/sync-cargo-caches.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,35 @@ mkdir -p "$CONTAINER_CARGO_HOME"/{bin,registry,git}
1515

1616
# Sync host cache to container cache if available
1717
if [ -d "$HOST_CARGO_HOME" ] && [ "$(ls -A $HOST_CARGO_HOME 2>/dev/null)" ]; then
18-
echo "Host Cargo cache detected, syncing with container cache..."
19-
20-
# Sync registry data using efficient copying utility
21-
if [ -d "$HOST_CARGO_HOME/registry" ]; then
22-
echo "Syncing registry cache (this may take a moment on first run)..."
23-
24-
# Execute the efficient copy utility as a standalone script
25-
if "$SCRIPT_DIR/efficient-copy" "$HOST_CARGO_HOME/registry" "$CONTAINER_CARGO_HOME/registry" --verbose; then
26-
echo "✓ Registry cache synced from host"
27-
28-
# Show some stats about what we have
29-
if [ -d "$CONTAINER_CARGO_HOME/registry/cache" ]; then
30-
cache_count=$(find "$CONTAINER_CARGO_HOME/registry/cache" -name "*.crate" 2>/dev/null | wc -l)
31-
echo "$cache_count cached crate files available"
32-
fi
33-
else
34-
echo "⚠ Warning: Failed to sync cache from host, using existing container cache"
35-
fi
18+
echo "Host Cargo cache detected, syncing with container cache..."
19+
20+
# Sync registry data using efficient copying utility
21+
if [ -d "$HOST_CARGO_HOME/registry" ]; then
22+
echo "Syncing registry cache (this may take a moment on first run)..."
23+
24+
# Execute the efficient copy utility as a standalone script
25+
if "$SCRIPT_DIR/efficient-copy" "$HOST_CARGO_HOME/registry" "$CONTAINER_CARGO_HOME/registry" --verbose; then
26+
echo "✓ Registry cache synced from host"
27+
28+
# Show some stats about what we have
29+
if [ -d "$CONTAINER_CARGO_HOME/registry/cache" ]; then
30+
cache_count=$(find "$CONTAINER_CARGO_HOME/registry/cache" -name "*.crate" 2>/dev/null | wc -l)
31+
echo "$cache_count cached crate files available"
32+
fi
33+
else
34+
echo "⚠ Warning: Failed to sync cache from host, using existing container cache"
3635
fi
36+
fi
3737

38-
echo "Container cache is now up-to-date with host. New downloads will be stored in container."
38+
echo "Container cache is now up-to-date with host. New downloads will be stored in container."
3939
else
40-
echo "No host Cargo cache found, using container-only mode"
40+
echo "No host Cargo cache found, using container-only mode"
4141
fi
4242

4343
# Ensure Cargo configuration exists (idempotent)
4444
if [ ! -f "$CONTAINER_CARGO_HOME/config.toml" ]; then
45-
echo "Setting up Cargo configuration..."
46-
cat > "$CONTAINER_CARGO_HOME/config.toml" << 'EOF'
45+
echo "Setting up Cargo configuration..."
46+
cat >"$CONTAINER_CARGO_HOME/config.toml" <<'EOF'
4747
# Cargo configuration for container environment
4848
# Reference: https://doc.rust-lang.org/cargo/reference/config.html
4949
@@ -55,9 +55,9 @@ git-fetch-with-cli = true
5555
# [build]
5656
# target-dir = "/tmp/cargo-target"
5757
EOF
58-
echo "✓ Cargo configuration created"
58+
echo "✓ Cargo configuration created"
5959
else
60-
echo "✓ Cargo configuration already exists"
60+
echo "✓ Cargo configuration already exists"
6161
fi
6262

6363
echo "Development cache sync complete!"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ test/logs/
99
# linter cache
1010
.rubocop-cache/
1111
.pre-commit-config.yaml
12+
13+
.cspellcache
14+
.lycheecache
15+
16+
repomix.md

.obsidian/core-plugins.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@
2727
"file-recovery": true,
2828
"publish": false,
2929
"sync": true,
30-
"webviewer": false
30+
"webviewer": false,
31+
"footnotes": false,
32+
"bases": true
3133
}

.obsidian/workspace.json

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,22 @@
1313
"state": {
1414
"type": "markdown",
1515
"state": {
16-
"file": "specs/Research/Sandboxing Technologies.md",
16+
"file": "specs/Public/Sanboxing/Local Sandboxing on Linux.md",
1717
"mode": "source",
18-
"source": false
18+
"source": false,
19+
"backlinks": true,
20+
"backlinkOpts": {
21+
"collapseAll": false,
22+
"extraContext": false,
23+
"sortOrder": "alphabetical",
24+
"showSearch": false,
25+
"searchQuery": "",
26+
"backlinkCollapsed": false,
27+
"unlinkedCollapsed": true
28+
}
1929
},
2030
"icon": "lucide-file",
21-
"title": "Sandboxing Technologies"
31+
"title": "Local Sandboxing on Linux"
2232
}
2333
},
2434
{
@@ -184,6 +194,7 @@
184194
},
185195
"left-ribbon": {
186196
"hiddenItems": {
197+
"bases:Create new base": false,
187198
"switcher:Open quick switcher": false,
188199
"graph:Open graph view": false,
189200
"canvas:Create new canvas": false,
@@ -194,13 +205,20 @@
194205
},
195206
"active": "01bf72509d2b5652",
196207
"lastOpenFiles": [
208+
"lychee.toml",
209+
"specs/Research/Restricting Guest Internet Access to a Whitelist of Websites.md",
210+
"specs/Research/Supervisor Process for Dynamic File Access Control on Linux.md",
211+
"specs/Research/fds.md",
212+
"specs/Public/Sanboxing/Agents Workflow Sandboxing Strategies.md",
213+
"specs/Public/Sanboxing/Local Sandboxing on Linux.md",
214+
"specs/Research/Sandboxing Technologies.md",
215+
"specs/Public/Sanboxing",
197216
"docs/state-persistence.md",
198217
"docs/marketing-one-pager.md",
199218
"docs/guide.md",
200219
"docs/AI Development Guide.md",
201220
"specs/Public/State Persistence.md",
202221
"docs/Product One Pager.md",
203-
"specs/Research/Sandboxing Technologies.md",
204222
"specs/Public/CLI.md",
205223
"specs/Research/MicroVM Research.md",
206224
"specs/Public/Nix Devcontainer/Devcontainer Design.md",
@@ -215,12 +233,6 @@
215233
"specs/Public/Nix Devcontainer/Devcontainer Cache Guidelines.md",
216234
"specs/Public/FS Snapshots/FS Snapshots Overview.md",
217235
"specs/Public/Agent Browsers/Agent Browser Profiles.md",
218-
"specs/Public/Browser Automation/Codex.md",
219-
"specs/Public/Extras Framework.md",
220-
"specs/Public/Lima VM Images.md",
221-
"specs/Public/Agent Time Travel.md",
222-
"specs/Public/WebUI PRD.md",
223-
"specs/Public/TUI PRD.md",
224236
"specs/Public",
225237
"agent-task-0.1.0.gem",
226238
"test/logs/temp_output_20250828_001209.log",

.vale.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Minimal Vale configuration for repository Markdown
2-
MinAlertLevel = warning
2+
MinAlertLevel = error
33

44
StylesPath = .vale
55
Vocab = AgentsWorkflow
@@ -8,3 +8,5 @@ Vocab = AgentsWorkflow
88
BasedOnStyles = Vale
99
Vale.Spelling = YES
1010
Vale.Terms = NO
11+
12+

.vale/Vale/Spelling.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
extends: spelling
2+
message: "Did you really mean '%s'?"
3+
level: warning
4+
ignore:
5+
- Blocksense
6+
- sandboxed
7+
- Sandboxing
8+
- GUIs
9+
- namespaces
10+
- cgroups
11+
- enablement
12+
- exfiltrate
13+
- distro
14+
- Overlayfs
15+
- hostname
16+
- devpts
17+
- ptys
18+
- overlayfs
19+
- ns
20+
- upperdirs
21+
- securebits
22+
- dirs
23+
- syscalls
24+
- syscall
25+
- tracee
26+
- ptrace
27+
- netns
28+
- slirp
29+
- nftables
30+
- Cgroups
31+
- subtree
32+
- chowning
33+
- pid
34+
- Ptrace
35+
- Podman

0 commit comments

Comments
 (0)