The first half of removing the shared bind mount. Not wired yet — this adds the mechanism and its tests. One cause, four fixes so far: .git/objects permission denied (core.sharedRepository), the capture base being overwritten each phase, COMMIT_EDITMSG root-owned, and reset --hard deleting a prior phase's work (.git/clawmates-in-use). core.sharedRepository was never a general solution — it covers objects and refs, and every OTHER file git touches is a fresh opportunity. Copy-in/copy-out removes the cause instead: the agent owns its filesystem with no second writer. Measured before building, because the plan named copy cost as the open risk: a real 65 MB checkout of this repo copies in 0.23s and out 0.18s on gw-04. Not a risk at this size; re-measure an order of magnitude larger. No compression — the payload crosses a local socket, so gzip would spend CPU to save nothing. Two safety properties, both tested: - The archive comes back from a container the agent controls as ROOT, so it is untrusted input. A `../ESCAPED` entry must not write outside the destination. The test writes the tar header bytes by hand because the tar crate refuses to BUILD such an entry through its safe API — which is reassuring, but means the hostile case has to be constructed the way an attacker would. - Symlinks are packed as links, never dereferenced. Following them on copy-IN would smuggle host files into the container; the test plants a host secret behind a symlink and asserts its contents never appear in the archive. Ownership is deliberately not preserved on unpack: the archive's uids are the container's root, and re-applying them on the host would recreate the exact uid split this exists to remove. 413 tests, clippy clean. Co-Authored-By: Claude Opus 5 <[email protected]>
80 lines
2.8 KiB
TOML
80 lines
2.8 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"crates/cm-domain",
|
|
"crates/cm-topology",
|
|
"crates/cm-orchestrator",
|
|
"crates/cm-config",
|
|
"crates/cm-db",
|
|
"crates/cm-llm",
|
|
"crates/cm-runtime",
|
|
"crates/cm-tools",
|
|
"crates/cm-safety",
|
|
"crates/cm-sandbox",
|
|
"crates/cm-secrets",
|
|
"crates/cm-files",
|
|
"crates/cm-scheduler",
|
|
"crates/cm-billing",
|
|
"crates/cm-telemetry",
|
|
"crates/cm-testkit",
|
|
"crates/cm-auth",
|
|
"crates/cm-brain",
|
|
"crates/cm-api",
|
|
"crates/bins/clawmates-server",
|
|
"crates/bins/clawmates-broker",
|
|
"crates/bins/clawmates-node",
|
|
"tools/bundler",
|
|
]
|
|
|
|
[workspace.package]
|
|
edition = "2021"
|
|
rust-version = "1.96"
|
|
license = "UNLICENSED"
|
|
publish = false
|
|
|
|
[workspace.dependencies]
|
|
# Shared dependency versions; crates opt in via { workspace = true }.
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
# Streaming tar for mission copy-in/copy-out (no compression: the payload is
|
|
# a git checkout on a local socket, so CPU spent zipping buys nothing).
|
|
tar = "0.4"
|
|
thiserror = "2"
|
|
uuid = { version = "1", features = ["v7", "serde"] }
|
|
proptest = "1"
|
|
time = { version = "0.3", features = ["serde", "serde-well-known"] }
|
|
tokio = { version = "1", features = ["macros", "rt-multi-thread", "fs", "net", "time", "sync", "io-util", "process"] }
|
|
sqlx = { version = "0.8", default-features = false, features = [
|
|
"runtime-tokio",
|
|
"tls-rustls",
|
|
"postgres",
|
|
"uuid",
|
|
"time",
|
|
"json",
|
|
"migrate",
|
|
"macros",
|
|
"bigdecimal",
|
|
] }
|
|
testcontainers-modules = { version = "0.13", features = ["postgres"] }
|
|
|
|
[workspace.lints.rust]
|
|
unsafe_code = "deny"
|
|
|
|
[workspace.lints.clippy]
|
|
todo = "deny"
|
|
unimplemented = "deny"
|
|
dbg_macro = "deny"
|
|
|
|
# ClawSync (claw-brain `sync` feature) pulls clawhdf5-onion/clawsync-onion/
|
|
# clawsync-agent from the clawsync repo, whose crates internally path-dep on a
|
|
# sibling ../clawhdf5 (absent in a git checkout). clawverse patches this for its
|
|
# own build, but `[patch]` only applies from the root workspace — so we mirror it
|
|
# here, redirecting clawsync's clawhdf5 view to the same quantumclaw rev cm-brain
|
|
# already uses (one clawhdf5 in the graph, types unify).
|
|
[patch."https://git.redclaw.dev/redclaw/clawsync.git"]
|
|
clawhdf5 = { git = "https://git.redclaw.dev/quantumclaw/clawhdf5.git", rev = "8534c7d204959c6f8959f3983f3edf6475ba25b9" }
|
|
clawhdf5-format = { git = "https://git.redclaw.dev/quantumclaw/clawhdf5.git", rev = "8534c7d204959c6f8959f3983f3edf6475ba25b9" }
|
|
clawhdf5-io = { git = "https://git.redclaw.dev/quantumclaw/clawhdf5.git", rev = "8534c7d204959c6f8959f3983f3edf6475ba25b9" }
|
|
clawhdf5-filters = { git = "https://git.redclaw.dev/quantumclaw/clawhdf5.git", rev = "8534c7d204959c6f8959f3983f3edf6475ba25b9" }
|
|
clawhdf5-agent = { git = "https://git.redclaw.dev/quantumclaw/clawhdf5.git", rev = "8534c7d204959c6f8959f3983f3edf6475ba25b9" }
|