Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 0 additions & 22 deletions .github/actions/setup-build-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ inputs:
description: "Rust toolchain"
required: false
default: "stable"
install-protoc:
description: "Install the legacy native protobuf compiler when explicitly required"
required: false
default: "false"
components:
description: "Rust components (comma-separated)"
required: false
Expand Down Expand Up @@ -84,21 +80,3 @@ runs:
if: inputs.install-dioxus == 'true'
shell: bash
run: dx --version

- name: Install protoc
if: inputs.install-protoc == 'true' && runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends \
protobuf-compiler \
libprotobuf-dev
protoc --version
test -f /usr/include/google/protobuf/empty.proto

- name: Install protoc
if: inputs.install-protoc == 'true' && runner.os == 'macOS'
shell: bash
run: |
brew install protobuf
protoc --version
14 changes: 1 addition & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
install-nextest: "false"
install-zig: "false"
components: "rustfmt"
Expand All @@ -46,7 +45,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
install-nextest: "false"
install-zig: "false"
components: "clippy"
Expand All @@ -67,7 +65,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
install-nextest: "false"
install-zig: "false"
components: "clippy"
Expand Down Expand Up @@ -208,7 +205,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
install-zig: "${{ matrix.install_zig }}"
components: ""

Expand All @@ -228,17 +224,14 @@ jobs:
if: matrix.prepare_runtime
run: |
just pvisor debug
cargo build --locked \
-p persisting-pchronicle-cli --bin pchronicle \
-p persisting-ppilot --bin ppilot
just build-components debug pchronicle-ppilot
echo "${GITHUB_WORKSPACE}/target/debug" >> "${GITHUB_PATH}"

- name: Run ${{ matrix.shard }} tests
env:
# GitHub-hosted Linux runners may disable unprivileged user
# namespaces. The dedicated isolation job remains strict.
PERSISTING_TEST_ALLOW_NO_USERNS: "1"
RUST_MIN_STACK: "8388608"
run: cargo nextest run --locked ${{ matrix.packages }}

- name: Test shared event control contract
Expand Down Expand Up @@ -283,8 +276,6 @@ jobs:
# Keep property tests out of the regular pChronicle package shard so
# nextest can schedule the two workloads on separate runners.
- name: Run pChronicle property-test regression
env:
RUST_MIN_STACK: "8388608"
run: just proptest pchronicle

pchronicle-web-test:
Expand All @@ -296,7 +287,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
install-dioxus: "true"
install-zig: "false"
components: ""
Expand All @@ -322,7 +312,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
install-zig: "false"
components: ""

Expand Down Expand Up @@ -455,7 +444,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
install-nextest: "false"
install-zig: "false"
components: ""
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
python-version: "3.12"
install-protoc: "false"
install-dioxus: "true"

- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -90,7 +89,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
python-version: "3.12"
install-protoc: "false"
install-dioxus: "true"

- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -132,7 +130,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"

- name: Install hyperfine
uses: taiki-e/install-action@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pchronicle-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
install-nextest: "false"
install-zig: "false"

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pvisor-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
components: ""

- uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
python-version: "3.12"
install-protoc: "false"
install-dioxus: "true"

- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -92,7 +91,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
python-version: "3.12"
install-protoc: "false"
install-dioxus: "true"

- uses: Swatinem/rust-cache@v2
Expand Down
109 changes: 54 additions & 55 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[workspace.package]
version = "0.2.0"
edition = "2024"
authors = ["reiase"]
license = "Apache-2.0"
description = "Agent execution, orchestration, and durable history infrastructure"

[workspace]
resolver = "3"
members = [
Expand All @@ -22,60 +29,6 @@ default-members = [
"crates/persisting-pvisor",
]

[workspace.package]
version = "0.2.0"
edition = "2024"
authors = ["reiase"]
license = "Apache-2.0"
description = "Agent execution, orchestration, and durable history infrastructure"

[profile.dev]
# This workspace links several large Lance/DataFusion binaries. Keep incremental
# compilation for the normal edit/build/check loop, but omit debug information
# to limit artifact size. The test profile below disables incremental state
# because its many binaries and feature combinations otherwise dominate disk.
# Use `--profile dev-debug` when source-level debugger information is needed.
# `debug = 0` already omits debug info; `strip = "none"` avoids a redundant
# post-link copy that doubles peak disk usage for large test executables.
# Keep split DWARF disabled on macOS, where the active toolchain may not ship a
# runnable `rust-objcopy`/LLVM pair.
debug = 0
incremental = true
codegen-units = 64
strip = "none"
split-debuginfo = "off"

[profile.dev.package."*"]
debug = false

[profile.test]
debug = 0
incremental = false
codegen-units = 64
strip = "none"
split-debuginfo = "off"

[profile.test.package."*"]
debug = false

[profile.dev-debug]
inherits = "dev"
debug = "line-tables-only"
incremental = true
codegen-units = 256
strip = "none"
split-debuginfo = "off"

[profile.release]
# Release artifacts are distributed binaries, so optimize their installed and
# download size by default. Thin LTO retains most cross-crate size wins without
# imposing the full link-time cost of Fat LTO.
opt-level = "z"
lto = "thin"
strip = "symbols"
codegen-units = 1
panic = "abort"

[workspace.dependencies]
anyhow = "1"
async-trait = "0.1"
Expand All @@ -85,7 +38,6 @@ blake3 = "1"
bytes = "1"
chrono = "0.4"
clap = "4"
criterion = { version = "0.8.2", default-features = false, features = ["cargo_bench_support", "html_reports", "plotters"] }
dashmap = "6"
datafusion = { version = "54.1.0", default-features = false }
dirs = "6"
Expand Down Expand Up @@ -146,6 +98,53 @@ url = "2"
uuid = "1"
zstd = "0.13"

[profile.dev]
# This workspace links several large Lance/DataFusion binaries. Keep incremental
# compilation for the normal edit/build/check loop, but omit debug information
# to limit artifact size. The test profile below disables incremental state
# because its many binaries and feature combinations otherwise dominate disk.
# Use `--profile dev-debug` when source-level debugger information is needed.
# `debug = 0` already omits debug info; `strip = "none"` avoids a redundant
# post-link copy that doubles peak disk usage for large test executables.
# Keep split DWARF disabled on macOS, where the active toolchain may not ship a
# runnable `rust-objcopy`/LLVM pair.
debug = 0
incremental = true
codegen-units = 64
strip = "none"
split-debuginfo = "off"

[profile.dev.package."*"]
debug = false

[profile.test]
debug = 0
incremental = false
codegen-units = 64
strip = "none"
split-debuginfo = "off"

[profile.test.package."*"]
debug = false

[profile.dev-debug]
inherits = "dev"
debug = "line-tables-only"
incremental = true
codegen-units = 256
strip = "none"
split-debuginfo = "off"

[profile.release]
# Release artifacts are distributed binaries, so optimize their installed and
# download size by default. Thin LTO retains most cross-crate size wins without
# imposing the full link-time cost of Fat LTO.
opt-level = "z"
lto = "thin"
strip = "symbols"
codegen-units = 1
panic = "abort"

[patch.crates-io]
# Lance 9.0.1 invokes prost-build from six build scripts. This compatibility
# adapter preserves Prost's code generation API but parses .proto files with
Expand Down
8 changes: 6 additions & 2 deletions crates/persisting-pchronicle-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ or isolate Agent Runs (pVisor / pPilot).
Current commands include `onboard`, `default`, `alias`, `ls`/`list`, `status`,
bounded read-only `query`, built-in `analysis`, assisted `agent` sessions,
Source-local `find`, create/append/replace `import`, destructive `drop`,
complete-trajectory `export`, `echo`, and loopback-only `serve`. Import and export support ATIF, OpenAI
Messages, ACTF, and Storyline JSON.
complete-trajectory `export`, directory `sync`, `echo`, and loopback-only
`serve`. Import and export support ATIF, OpenAI Messages, ACTF, and Storyline
JSON. `sync --from SOURCE --to WAREHOUSE --convert OUTPUT` polls a local source
directory, atomically mirrors supported JSON files into a local Warehouse
Dataset byte-for-byte, and rebuilds a Storyline Lance Dataset at the conversion
output on each coalesced batch; use `--once` for a finite run.

`pchronicle serve --control 127.0.0.1:0 URI` is normally launched by pPilot or
pVisor. `serve --listen` is the read-only Warehouse. Public bind addresses are
Expand Down
60 changes: 60 additions & 0 deletions crates/persisting-pchronicle-cli/src/exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,66 @@ pub(super) async fn run_import(
Ok(())
}

/// Run one full snapshot import for the resident sync worker.
///
/// The existing import path already stages local outputs atomically, mirrors
/// deletions, and rebuilds a Storyline Lance destination from the same source
/// directory. Keeping the orchestration here avoids a second decoder or
/// Dataset publication protocol in the sync command.
pub(crate) async fn sync_snapshot(
source: &Path,
warehouse: &Path,
storyline: &Path,
input_format: ExchangeFormat,
) -> Result<()> {
// ponytail: rebuild one atomic snapshot per coalesced batch; add affected-document mutation
// when profiling shows full-directory rebuilds are the bottleneck.
let mut stdout = std::io::sink();
let mut stderr = std::io::sink();
let mut stdin = std::io::empty();
run_import(
ImportArgs {
from: source.to_string_lossy().into_owned(),
output: Some(warehouse.to_string_lossy().into_owned()),
format: input_format,
output_format: Some(ImportOutputFormat::Preserve),
mode: ImportMode::Replace,
on_duplicate: None,
yes: true,
stream: false,
max_input_bytes: Some(256 * 1024 * 1024),
},
None,
false,
&mut stdin,
&mut stdout,
&mut stderr,
)
.await
.context("sync source into Warehouse")?;
run_import(
ImportArgs {
from: source.to_string_lossy().into_owned(),
output: Some(storyline.to_string_lossy().into_owned()),
format: input_format,
output_format: Some(ImportOutputFormat::Storyline),
mode: ImportMode::Replace,
on_duplicate: None,
yes: true,
stream: false,
max_input_bytes: Some(256 * 1024 * 1024),
},
None,
false,
&mut stdin,
&mut stdout,
&mut stderr,
)
.await
.context("sync source into Storyline Lance")?;
Ok(())
}

struct StorylineImportOptions {
max_input_bytes: usize,
directory_input: bool,
Expand Down
Loading
Loading