Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cce6e9d
Unify filesystem storage accounting
kmatasfp Aug 7, 2026
f732dc7
Fix filesystem accounting recovery and streams
kmatasfp Aug 8, 2026
eefc53b
Serialize filesystem storage reservations
kmatasfp Aug 8, 2026
81e4c2e
Clean up filesystem accounting abstractions
kmatasfp Aug 8, 2026
26d6cea
Keep filesystem baseline internal
kmatasfp Aug 9, 2026
c57e493
Fix filesystem stream reservation deadlocks
kmatasfp Aug 9, 2026
253e844
Aggregate filesystem storage permits
kmatasfp Aug 9, 2026
6c0ff05
Harden filesystem storage accounting
kmatasfp Aug 10, 2026
f18ed37
Merge branch 'main' into kaurmatas/gol-416-unify-filesystem-storage-a…
kmatasfp Aug 13, 2026
101ea40
Unify durable filesystem state across WASI previews
kmatasfp Aug 10, 2026
b79bc52
Handle filesystem writer task failures
kmatasfp Aug 10, 2026
99afb7e
Harden filesystem accounting lifecycle
kmatasfp Aug 10, 2026
79effe6
Complete filesystem accounting hardening
kmatasfp Aug 11, 2026
e3a49b6
address feedback
kmatasfp Aug 13, 2026
8f5bec9
Merge branch 'main' into kaurmatas/gol-416-unify-filesystem-storage-a…
kmatasfp Aug 13, 2026
2e33e13
revert(filesystem): remove logical accounting
kmatasfp Aug 13, 2026
9aea527
feat(filesystem): own agent filesystem lifecycle
kmatasfp Aug 14, 2026
1d5eb9d
feat(filesystem): add managed XFS storage
kmatasfp Aug 14, 2026
32582b4
feat(filesystem): materialize initial files
kmatasfp Aug 15, 2026
921eec0
feat(filesystem): enforce XFS agent quotas
kmatasfp Aug 16, 2026
18c77ca
feat(filesystem): reconstruct filesystems from oplog
kmatasfp Aug 17, 2026
d7f21bf
feat(filesystem): classify mutation failures
kmatasfp Aug 18, 2026
92ee725
feat(filesystem): recover physical pressure
kmatasfp Aug 18, 2026
65ba4c2
feat(filesystem): bill authoritative storage
kmatasfp Aug 19, 2026
45dede8
refactor(filesystem): remove legacy quota accounting
kmatasfp Aug 19, 2026
87e2ac8
Merge remote-tracking branch 'origin/main' into kaurmatas/gol-416-uni…
kmatasfp Aug 19, 2026
1739061
fix(executor): resolve CI regressions
kmatasfp Aug 19, 2026
47bbb4e
fix(ci): resolve remaining failures
kmatasfp Aug 19, 2026
1a66ea7
fix(ci): stabilize managed XFS tests
kmatasfp Aug 20, 2026
a9341cc
fix(ci): preserve Lima XFS build path
kmatasfp Aug 20, 2026
485de1b
fix(ci): borrow XFS test path during sync
kmatasfp Aug 20, 2026
acd2f39
fix(ci): run XFS tests in nested Lima VM
kmatasfp Aug 20, 2026
1d3cda1
fix(ci): support built-in KVM on Blacksmith
kmatasfp Aug 20, 2026
b83704b
fix(debug): allow reads before session registration
kmatasfp Aug 20, 2026
014562b
refactor(executor): isolate filesystem backends
kmatasfp Aug 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,58 @@ jobs:
artifact-name: worker-executor-tests-${{ matrix.group.name }}-report
github-token: ${{ secrets.GITHUB_TOKEN }}

managed-xfs-tests:
name: managed-xfs-tests
runs-on: blacksmith-8vcpu-ubuntu-2404
needs:
- build-and-store
- merge-test-components
timeout-minutes: 45
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- uses: ./.github/actions/setup-rust
with:
use-cache: 'false'
install-cargo-binstall: 'true'
- uses: ./.github/actions/restore-binaries
with:
run-id: ${{ github.run_id }}
fail-on-cache-miss: 'true'
- uses: ./.github/actions/restore-test-components
with:
run-id: ${{ github.run_id }}
- name: Set up Lima
id: lima
env:
GH_TOKEN: ${{ github.token }}
LIMA_VERSION: v2.2.0
run: |
sudo apt-get update -qq
sudo apt-get install -qqy --no-install-recommends ovmf qemu-system-x86 qemu-utils
test -c /dev/kvm
sudo chown "$(whoami)" /dev/kvm
archive="lima-${LIMA_VERSION#v}-Linux-x86_64.tar.gz"
curl -fOSL "https://github.com/lima-vm/lima/releases/download/${LIMA_VERSION}/${archive}"
gh attestation verify --owner lima-vm "${archive}"
sudo tar -C /usr/local -xzf "${archive}"
rm "${archive}"
echo "version=${LIMA_VERSION}" >> "${GITHUB_OUTPUT}"
- name: Cache Lima images
uses: actions/cache@v5
with:
path: ~/.cache/lima
key: lima-${{ runner.os }}-${{ steps.lima.outputs.version }}
- name: Run managed XFS suite
env:
GOLEM_MANAGED_XFS_REUSE_TEST_BINARIES: 1
GOLEM_MANAGED_XFS_TARGET_DIR: ${{ github.workspace }}/target
GOLEM_MANAGED_XFS_CARGO_TEST_R: ${{ github.workspace }}/target/cargo-test-r
run: |
cp "$(command -v cargo-test-r)" "${GOLEM_MANAGED_XFS_CARGO_TEST_R}"
integration-tests/scripts/managed-filesystem/run-lima.sh

build-cli-test-bins:
env:
CARGO_BUILD_JOBS: 20
Expand Down Expand Up @@ -1020,6 +1072,7 @@ jobs:
- unit-tests-and-checks
- golem-schema-guest
- worker-tests
- managed-xfs-tests
- it
- it-cli
if: "startsWith(github.ref, 'refs/tags/v')"
Expand Down
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ bitflags = "2.6.0"
blake3 = { version = "1.8.2", features = ["rayon"] }
bytes = "1.10.1"
camino = "1.1.10"
cap-fs-ext = "3.4.5" # keep in sync with wasmtime
cap-std = "3.4.5" # keep in sync with wasmtime
cap-time-ext = "3.4.5"
cargo_metadata = "0.21.0"
Expand Down Expand Up @@ -153,6 +154,8 @@ kube-derive = "0.98.0"
lazy_static = "1.5.0"
leb128 = "0.2.5"
lenient_bool = "0.1.1"
libc = "0.2.186"
linux-raw-sys = { version = "0.12.1", features = ["general", "ioctl"] }
log = "0.4.26"
mac_address = "1.1.8"
mappable-rc = "0.1.1"
Expand Down Expand Up @@ -220,6 +223,7 @@ rsa = "0.9.7"

rust_decimal = "1.39.0"
rustc-hash = "2.1.1"
rustix = { version = "1.1.4", features = ["fs"] }
rustls = { version = "0.23.23", features = ["ring"] }
rustls-pemfile = "2.2.0"
sanitize-filename = "0.6.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4347,7 +4347,6 @@
{ "$ref": "#/definitions/PublicOplogEntrySuccessfulUpdate" },
{ "$ref": "#/definitions/PublicOplogEntryFailedUpdate" },
{ "$ref": "#/definitions/PublicOplogEntryGrowMemory" },
{ "$ref": "#/definitions/PublicOplogEntryFilesystemStorageUsageUpdate" },
{ "$ref": "#/definitions/PublicOplogEntryCreateResource" },
{ "$ref": "#/definitions/PublicOplogEntryDropResource" },
{ "$ref": "#/definitions/PublicOplogEntryLog" },
Expand Down Expand Up @@ -4553,12 +4552,6 @@
"properties": { "type": { "const": "GrowMemory" }, "timestamp": { "type": "string" }, "delta": { "type": "integer", "minimum": 0 } },
"additionalProperties": false
},
"PublicOplogEntryFilesystemStorageUsageUpdate": {
"type": "object",
"required": ["type", "timestamp", "delta"],
"properties": { "type": { "const": "FilesystemStorageUsageUpdate" }, "timestamp": { "type": "string" }, "delta": { "type": "integer" } },
"additionalProperties": false
},
"PublicOplogEntryCreateResource": {
"type": "object",
"required": ["type", "timestamp", "id", "name", "owner"],
Expand Down
11 changes: 0 additions & 11 deletions cli/golem-cli/src/model/agent/oplog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,17 +354,6 @@ impl TextOutput for PublicOplogEntry {
format_id(&format_binary_size(&params.delta)),
));
}
PublicOplogEntry::FilesystemStorageUsageUpdate(params) => {
logln(format_message_highlight("STORAGE USAGE UPDATE"));
logln(format!(
"{pad}at: {}",
format_id(&params.timestamp)
));
logln(format!(
"{pad}delta: {}",
format_id(&params.delta.to_string()),
));
}
PublicOplogEntry::CreateResource(params) => {
logln(format_message_highlight("CREATE RESOURCE"));
logln(format!(
Expand Down
4 changes: 0 additions & 4 deletions cli/golem-cli/src/model/cli_output/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1972,10 +1972,6 @@ fn sample_public_oplog_entries() -> Vec<golem_common::model::oplog::PublicOplogE
timestamp: timestamp(),
delta: 64,
}),
PublicOplogEntry::FilesystemStorageUsageUpdate(FilesystemStorageUsageUpdateParams {
timestamp: timestamp(),
delta: -5,
}),
PublicOplogEntry::CreateResource(CreateResourceParams {
timestamp: timestamp(),
id: AgentResourceId(1),
Expand Down
11 changes: 0 additions & 11 deletions cli/golem-cli/wit/deps/golem-1.x/golem-oplog.wit
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,6 @@ interface oplog {
delta: u64
}

record filesystem-storage-usage-update-parameters {
timestamp: datetime,
delta: s64
}

type agent-resource-id = u64;

record create-resource-parameters {
Expand Down Expand Up @@ -566,8 +561,6 @@ interface oplog {
exceeded-table-limit,
exceeded-http-call-limit,
exceeded-rpc-call-limit,
node-out-of-filesystem-storage,
agent-exceeded-filesystem-storage-limit,
agent-terminated-by-quota(agent-terminated-by-quota-error),
ephemeral-sleep-too-long(ephemeral-sleep-too-long),
ephemeral-fuel-exhausted(ephemeral-fuel-exhausted),
Expand Down Expand Up @@ -786,8 +779,6 @@ interface oplog {
failed-update(failed-update-parameters),
/// Increased total linear memory size
grow-memory(grow-memory-parameters),
/// Updated filesystem usage by a signed delta
filesystem-storage-usage-update(filesystem-storage-usage-update-parameters),
/// Created a resource instance
create-resource(raw-create-resource-parameters),
/// Dropped a resource instance
Expand Down Expand Up @@ -895,8 +886,6 @@ interface oplog {
failed-update(failed-update-parameters),
/// Increased total linear memory size
grow-memory(grow-memory-parameters),
/// Updated filesystem usage by a signed delta
filesystem-storage-usage-update(filesystem-storage-usage-update-parameters),
/// Created a resource instance
create-resource(create-resource-parameters),
/// Dropped a resource instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Each text entry is printed with its index (e.g. `#00042:`) followed by a labeled
| `INTERRUPTED` / `EXITED` | Agent interrupted or exited |
| `NOP` | No-operation marker |
| `JUMP` | Oplog jump — shows from/to indices |
| `STORAGE USAGE UPDATE` | Filesystem storage usage change |

### Examples

Expand Down
10 changes: 2 additions & 8 deletions golem-api-grpc/proto/golem/worker/public_oplog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import "golem/schema/schema.proto";
// removed and replaced by `Start`, `End`, `Cancelled`. Their tag numbers are reserved to
// prevent accidental reuse should we ever need rolling-version compatibility in the future.
message OplogEntry {
reserved 2, 14, 15;
reserved "HostCall", "BeginRemoteWrite", "EndRemoteWrite";
reserved 2, 14, 15, 41;
reserved "HostCall", "BeginRemoteWrite", "EndRemoteWrite", "FilesystemStorageUsageUpdate";

oneof entry {
CreateParameters Create = 1;
Expand Down Expand Up @@ -60,7 +60,6 @@ message OplogEntry {
RemoteTransactionParameters RolledBackRemoteTransaction = 38;
SnapshotDataParameters Snapshot = 39;
OplogProcessorCheckpointParameters OplogProcessorCheckpoint = 40;
FilesystemStorageUsageUpdateParameters FilesystemStorageUsageUpdate = 41;
SetRetryPolicyParameters SetRetryPolicy = 42;
RemoveRetryPolicyParameters RemoveRetryPolicy = 43;
StartParameters Start = 44;
Expand Down Expand Up @@ -411,11 +410,6 @@ message GrowMemoryParameters {
uint64 delta = 2;
}

message FilesystemStorageUsageUpdateParameters {
google.protobuf.Timestamp timestamp = 1;
int64 delta = 2;
}

message CreateResourceParameters {
google.protobuf.Timestamp timestamp = 1;
uint64 resource_id = 2;
Expand Down
8 changes: 3 additions & 5 deletions golem-api-grpc/proto/golem/worker/raw_oplog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import "google/protobuf/timestamp.proto";

// An oplog entry in its raw/internal representation.
message RawOplogEntry {
reserved 21;
reserved "filesystem_storage_usage_update";

google.protobuf.Timestamp timestamp = 1;
oneof entry {
RawCreateParameters create = 2;
Expand All @@ -34,7 +37,6 @@ message RawOplogEntry {
RawSuccessfulUpdateParameters successful_update = 18;
RawFailedUpdateParameters failed_update = 19;
RawGrowMemoryParameters grow_memory = 20;
RawFilesystemStorageUsageUpdateParameters filesystem_storage_usage_update = 21;
RawCreateResourceParameters create_resource = 22;
RawDropResourceParameters drop_resource = 23;
RawLogParameters log = 24;
Expand Down Expand Up @@ -232,10 +234,6 @@ message RawGrowMemoryParameters {
uint64 delta = 1;
}

message RawFilesystemStorageUsageUpdateParameters {
int64 delta = 1;
}

message RawResourceTypeId {
string name = 1;
string owner = 2;
Expand Down
9 changes: 3 additions & 6 deletions golem-api-grpc/proto/golem/worker/worker_error.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ package golem.worker;
import "golem/common/environment.proto";

message AgentError {
reserved 11, 12;
reserved "node_out_of_filesystem_storage", "agent_exceeded_filesystem_storage_limit";

oneof error {
StackOverflow stack_overflow = 1;
OutOfMemory out_of_memory = 2;
Expand All @@ -16,8 +19,6 @@ message AgentError {
TransientError transient_error = 8;
PermanentError permanent_error = 9;
ExceededTableLimit exceeded_table_limit = 10;
NodeOutOfFilesystemStorage node_out_of_filesystem_storage = 11;
AgentExceededFilesystemStorageLimit agent_exceeded_filesystem_storage_limit = 12;
ExceededHttpCallLimit exceeded_http_call_limit = 13;
ExceededRpcCallLimit exceeded_rpc_call_limit = 14;
AgentTerminatedByQuota agent_terminated_by_quota = 15;
Expand Down Expand Up @@ -64,10 +65,6 @@ message ExceededHttpCallLimit {}

message ExceededRpcCallLimit {}

message NodeOutOfFilesystemStorage {}

message AgentExceededFilesystemStorageLimit {}

message AgentTerminatedByQuota {
golem.common.EnvironmentId environment_id = 1;
string resource_name = 2;
Expand Down
12 changes: 0 additions & 12 deletions golem-common/src/base_model/oplog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,18 +386,6 @@ oplog_entry! {
delta: u64
}
},
/// Updated storage usage by a signed delta (positive = write, negative = delete/shrink)
FilesystemStorageUsageUpdate {
hint: true
wit_raw_type: "filesystem-storage-usage-update-parameters"
wit_public_type: "filesystem-storage-usage-update-parameters"
raw {
delta: i64
}
public {
delta: i64
}
},
/// Created a resource instance
CreateResource {
hint: true
Expand Down
2 changes: 0 additions & 2 deletions golem-common/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,6 @@ pub struct AgentStatusRecord {
pub component_revision: ComponentRevision,
pub component_size: u64,
pub total_linear_memory_size: u64,
pub current_filesystem_storage_usage: u64,
pub owned_resources: HashMap<AgentResourceId, AgentResourceDescription>,
pub oplog_idx: OplogIndex,
pub active_plugins: HashSet<EnvironmentPluginGrantId>,
Expand Down Expand Up @@ -746,7 +745,6 @@ impl Default for AgentStatusRecord {
component_revision: ComponentRevision::INITIAL,
component_size: 0,
total_linear_memory_size: 0,
current_filesystem_storage_usage: 0,
owned_resources: HashMap::new(),
oplog_idx: OplogIndex::default(),
active_plugins: HashSet::new(),
Expand Down
4 changes: 0 additions & 4 deletions golem-common/src/model/oplog/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,6 @@ impl PublicOplogEntry {
Self::string_match("growmemory", &[], query_path, query)
|| Self::string_match("grow-memory", &[], query_path, query)
}
PublicOplogEntry::FilesystemStorageUsageUpdate(_params) => {
Self::string_match("filesystemstorageusageupdate", &[], query_path, query)
|| Self::string_match("filesystem-storage-usage-update", &[], query_path, query)
}
PublicOplogEntry::CreateResource(_params) => {
Self::string_match("createresource", &[], query_path, query)
|| Self::string_match("create-resource", &[], query_path, query)
Expand Down
Loading
Loading