The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
Pin the CI module digest from the registry, and guard the pair against drift
Shanu5bba7890c907
diff --git a/.github/workflows/ci-full.yml b/.github/workflows/ci-full.ymlindex 54918f7ed3..23c5e47429 100644--- a/.github/workflows/ci-full.yml+++ b/.github/workflows/ci-full.yml@@ -126,20 +126,28 @@ jobs:# tinybus validates every directory ancestor. GitHub mounts the# checkout as the host runner uid while this container runs as root,# so keep native fixtures in a root-owned, ephemeral tree.+ # Version and digest are ONE decision and live on adjacent lines for that+ # reason: the archive name, the release tag and the checksum each used to+ # carry the version independently, so a bump could update two of the three+ # and leave a stale digest that only fails after the download. Both values+ # are the ubuntu-22.04-x86_64 row of `src/openhuman/modules/registry.rs`,+ # which is the authoritative pin — copy them from there, never recompute.+ memory_version="1.6.0"+ memory_sha256="7b932203e56867d2c1a0cd22573bea096e664a713dddad37255f5f401affbd5e"module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"memory_dir="$module_root/tinymemory"juice_dir="$module_root/tinyjuice"- memory_archive="$memory_dir/tinymemory-module-1.6.0-ubuntu-22.04-x86_64.tar.gz"+ memory_archive="$memory_dir/tinymemory-module-${memory_version}-ubuntu-22.04-x86_64.tar.gz"juice_archive="$juice_dir/tinyjuice-module-0.2.2-ubuntu-22.04-x86_64.tar.gz"rm -rf "$memory_dir" "$juice_dir"mkdir -p "$memory_dir" "$juice_dir"curl --fail --location --silent --show-error \- "https://github.com/tinyhumansai/tinymemory/releases/download/v1.6.0/$(basename "$memory_archive")" \+ "https://github.com/tinyhumansai/tinymemory/releases/download/v${memory_version}/$(basename "$memory_archive")" \--output "$memory_archive"curl --fail --location --silent --show-error \"https://github.com/tinyhumansai/tinyjuice/releases/download/v0.2.2/$(basename "$juice_archive")" \--output "$juice_archive"- echo "d722d36e9fc35ef4ddbbb96499949a6a608f044e924d023f719deb9aa3f5875d $memory_archive" \+ echo "${memory_sha256} $memory_archive" \| sha256sum --checkecho "fd8caf7fccb53328870fd26922aa9768d253cd4b3bf758967847d6512df03863 $juice_archive" \| sha256sum --checkdiff --git a/.github/workflows/ci-lite.yml b/.github/workflows/ci-lite.ymlindex fbfc52404d..5831d6e0a2 100644--- a/.github/workflows/ci-lite.yml+++ b/.github/workflows/ci-lite.yml@@ -743,20 +743,28 @@ jobs:# checkout as the host runner uid while this container runs as root,# so a module below $GITHUB_WORKSPACE is correctly refused. Keep# native fixtures in a root-owned, container-ephemeral tree instead.+ # Version and digest are ONE decision and live on adjacent lines for that+ # reason: the archive name, the release tag and the checksum each used to+ # carry the version independently, so a bump could update two of the three+ # and leave a stale digest that only fails after the download. Both values+ # are the ubuntu-22.04-x86_64 row of `src/openhuman/modules/registry.rs`,+ # which is the authoritative pin — copy them from there, never recompute.+ memory_version="1.6.0"+ memory_sha256="7b932203e56867d2c1a0cd22573bea096e664a713dddad37255f5f401affbd5e"module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"memory_dir="$module_root/tinymemory"juice_dir="$module_root/tinyjuice"- memory_archive="$memory_dir/tinymemory-module-1.6.0-ubuntu-22.04-x86_64.tar.gz"+ memory_archive="$memory_dir/tinymemory-module-${memory_version}-ubuntu-22.04-x86_64.tar.gz"juice_archive="$juice_dir/tinyjuice-module-0.2.2-ubuntu-22.04-x86_64.tar.gz"rm -rf "$memory_dir" "$juice_dir"mkdir -p "$memory_dir" "$juice_dir"curl --fail --location --silent --show-error \- "https://github.com/tinyhumansai/tinymemory/releases/download/v1.6.0/$(basename "$memory_archive")" \+ "https://github.com/tinyhumansai/tinymemory/releases/download/v${memory_version}/$(basename "$memory_archive")" \--output "$memory_archive"curl --fail --location --silent --show-error \"https://github.com/tinyhumansai/tinyjuice/releases/download/v0.2.2/$(basename "$juice_archive")" \--output "$juice_archive"- echo "d722d36e9fc35ef4ddbbb96499949a6a608f044e924d023f719deb9aa3f5875d $memory_archive" \+ echo "${memory_sha256} $memory_archive" \| sha256sum --checkecho "fd8caf7fccb53328870fd26922aa9768d253cd4b3bf758967847d6512df03863 $juice_archive" \| sha256sum --checkdiff --git a/.github/workflows/e2e-reusable.yml b/.github/workflows/e2e-reusable.ymlindex 834ff28274..5c337348e3 100644--- a/.github/workflows/e2e-reusable.yml+++ b/.github/workflows/e2e-reusable.yml@@ -162,15 +162,23 @@ jobs:# Keep memory E2E independent of the GitHub release-metadata API.# tinybus validates every directory ancestor, so the fixture must# live outside the runner-owned checkout in this root-run container.+ # Version and digest are ONE decision and live on adjacent lines for that+ # reason: the archive name, the release tag and the checksum each used to+ # carry the version independently, so a bump could update two of the three+ # and leave a stale digest that only fails after the download. Both values+ # are the ubuntu-22.04-x86_64 row of `src/openhuman/modules/registry.rs`,+ # which is the authoritative pin — copy them from there, never recompute.+ memory_version="1.6.0"+ memory_sha256="7b932203e56867d2c1a0cd22573bea096e664a713dddad37255f5f401affbd5e"module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"memory_dir="$module_root/tinymemory"- memory_archive="$memory_dir/tinymemory-module-1.6.0-ubuntu-22.04-x86_64.tar.gz"+ memory_archive="$memory_dir/tinymemory-module-${memory_version}-ubuntu-22.04-x86_64.tar.gz"rm -rf "$memory_dir"mkdir -p "$memory_dir"curl --fail --location --silent --show-error \- "https://github.com/tinyhumansai/tinymemory/releases/download/v1.6.0/$(basename "$memory_archive")" \+ "https://github.com/tinyhumansai/tinymemory/releases/download/v${memory_version}/$(basename "$memory_archive")" \--output "$memory_archive"- echo "d722d36e9fc35ef4ddbbb96499949a6a608f044e924d023f719deb9aa3f5875d $memory_archive" \+ echo "${memory_sha256} $memory_archive" \| sha256sum --checktar --no-same-owner -xzf "$memory_archive" -C "$memory_dir"echo "TINYMEMORY_TEST_MODULE=$memory_dir/libtinymemory_module.so" \@@ -360,15 +368,23 @@ jobs:# memory-roundtrip runs in this shard. Supply the native module# directly so the packaged app never depends on GitHub's release# metadata API while the test is running.+ # Version and digest are ONE decision and live on adjacent lines for that+ # reason: the archive name, the release tag and the checksum each used to+ # carry the version independently, so a bump could update two of the three+ # and leave a stale digest that only fails after the download. Both values+ # are the ubuntu-22.04-x86_64 row of `src/openhuman/modules/registry.rs`,+ # which is the authoritative pin — copy them from there, never recompute.+ memory_version="1.6.0"+ memory_sha256="7b932203e56867d2c1a0cd22573bea096e664a713dddad37255f5f401affbd5e"module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"memory_dir="$module_root/tinymemory"- memory_archive="$memory_dir/tinymemory-module-1.6.0-ubuntu-22.04-x86_64.tar.gz"+ memory_archive="$memory_dir/tinymemory-module-${memory_version}-ubuntu-22.04-x86_64.tar.gz"rm -rf "$memory_dir"mkdir -p "$memory_dir"curl --fail --location --silent --show-error \- "https://github.com/tinyhumansai/tinymemory/releases/download/v1.6.0/$(basename "$memory_archive")" \+ "https://github.com/tinyhumansai/tinymemory/releases/download/v${memory_version}/$(basename "$memory_archive")" \--output "$memory_archive"- echo "d722d36e9fc35ef4ddbbb96499949a6a608f044e924d023f719deb9aa3f5875d $memory_archive" \+ echo "${memory_sha256} $memory_archive" \| sha256sum --checktar --no-same-owner -xzf "$memory_archive" -C "$memory_dir"echo "TINYMEMORY_TEST_MODULE=$memory_dir/libtinymemory_module.so" \diff --git a/src/openhuman/agent/harness/archivist_tests.rs b/src/openhuman/agent/harness/archivist_tests.rsindex 31f51ab834..53f0d7e821 100644--- a/src/openhuman/agent/harness/archivist_tests.rs+++ b/src/openhuman/agent/harness/archivist_tests.rs@@ -88,6 +88,12 @@ fn provider_over(workspace: &std::path::Path) -> (Arc<MemoryClient>, Arc<dyn Memdefault_temperature: 0.2,output_language: None,memory_sources: serde_json::Value::Null,+ // Added by tinymemory#100, which moved the periodic sync loops into the+ // module. A test fixture wants the same "no cadence configured" default+ // the module answers for an older host that sends nothing.+ memory_sync_interval_secs: None,+ composio_mode: String::new(),+ composio_entity_id: String::new(),};let provider: Arc<dyn MemoryProvider> = Arc::new(TinycortexProvider::new("tinycortex".into(),diff --git a/src/openhuman/memory/guard/families.rs b/src/openhuman/memory/guard/families.rsindex fcec9da2ae..79ea0ec1cf 100644--- a/src/openhuman/memory/guard/families.rs+++ b/src/openhuman/memory/guard/families.rs@@ -1324,11 +1324,18 @@ impl MemoryEpisodic for GuardedEpisodic {// A recorded turn is user-authored conversation content, so this is a// write and is admitted as one — the read/write split here is about// what the tier permits, not about how much data moves.+ // `carries_content: true`, unlike the tier note above, which is about+ // what the tier permits rather than how much data moves. This flag is a+ // different question: it decides whether the egress record classifies+ // the transfer as `FileContent` or `Metadata`. A turn IS the user's+ // prose, and an audit trail that calls a transcript "metadata"+ // understates what left the process — the one thing that record exists+ // to get right. `tree.append` has always passed `true` for this shape.self.policy.admit_write(Capability::Episodic,"episodic.insert_turn",NO_NAMESPACE,- false,+ true,)?;let mut turn = turn.clone();turn.content = self.policy.redact_outbound(&turn.content).into_owned();@@ -1415,11 +1422,13 @@ impl MemoryEpisodic for GuardedEpisodic {/// Admitted like its sibling writes; the event's namespace is the/// admission subject, since it is the one the record is scoped to.async fn insert_event(&self, event: &EpisodicEvent) -> Result<(), MemoryError> {+ // `carries_content: true` for the same reason as `insert_turn`: an+ // extracted event is the user's prose, not a descriptor of it.self.policy.admit_write(Capability::Episodic,"episodic.insert_event",&event.namespace,- false,+ true,)?;let mut event = event.clone();event.content = self.policy.redact_outbound(&event.content).into_owned();diff --git a/src/openhuman/memory/test_support/mod.rs b/src/openhuman/memory/test_support/mod.rsindex 98504c0213..fb8f59b94b 100644--- a/src/openhuman/memory/test_support/mod.rs+++ b/src/openhuman/memory/test_support/mod.rs@@ -38,6 +38,12 @@ pub(crate) fn install_tinycortex_for_test(config: &crate::openhuman::config::Conlocal_ai: config.local_ai.clone(),embeddings_provider: config.embeddings_provider.clone(),memory_provider: None,+ // Added by tinymemory#100, which moved the periodic sync loops into the+ // module. A test fixture wants the same "no cadence configured" default+ // the module answers for an older host that sends nothing.+ memory_sync_interval_secs: None,+ composio_mode: String::new(),+ composio_entity_id: String::new(),default_model: None,default_temperature: 0.2,output_language: None,diff --git a/src/openhuman/modules/memory_tests.rs b/src/openhuman/modules/memory_tests.rsindex 8b5bc37e61..dbaf69545c 100644--- a/src/openhuman/modules/memory_tests.rs+++ b/src/openhuman/modules/memory_tests.rs@@ -303,3 +303,69 @@ fn the_advertised_set_does_not_over_claim_the_artifact() {// registry bump.assert_eq!(advertised, Capabilities::all());}++/// The CI workflows download the TinyMemory module and verify it against a+/// digest written inline in the YAML. That digest is a second copy of the one+/// in [`super::super::registry`], and the two drifted: a version bump moved the+/// archive name and the release tag but left the checksum two releases behind,+/// so every lane that installs the module died on+/// `sha256sum: WARNING: 1 computed checksum did NOT match`.+///+/// The failure was loud, which is the system working — a mismatched digest is+/// exactly what should stop a build rather than silently running the wrong+/// artifact. What was missing is anything that catches the drift *before* CI+/// downloads a file, and a comment asking the next person to keep three places+/// in step is not that. This is.+///+/// Scoped to the one row the workflows actually install (`ubuntu-22.04-x86_64`,+/// the CI runner's triple) rather than all eleven, because that is the only+/// pair that can disagree.+#[test]+fn the_ci_workflows_pin_the_same_module_digest_as_the_registry() {+ const HOST_KEY: &str = "ubuntu-22.04-x86_64";++ let record = registry::find(MODULE_ID).expect("the memory module is registered");+ let asset = record+ .assets+ .iter()+ .find(|asset| asset.host_key == HOST_KEY)+ .unwrap_or_else(|| panic!("the registry has no {HOST_KEY} asset to compare against"));++ let workflows = [+ "../.github/workflows/ci-full.yml",+ "../.github/workflows/ci-lite.yml",+ "../.github/workflows/e2e-reusable.yml",+ ];+ let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"));++ let mut checked = 0usize;+ for relative in workflows {+ let path = root.join(relative.trim_start_matches("../"));+ let Ok(yaml) = std::fs::read_to_string(&path) else {+ continue;+ };+ for line in yaml.lines() {+ let Some(rest) = line.trim().strip_prefix("memory_sha256=") else {+ continue;+ };+ let pinned = rest.trim().trim_matches('"');+ assert_eq!(+ pinned,+ asset.sha256,+ "{} pins a digest the registry does not: the workflow will download \+ {} and refuse it. Copy both `memory_version` and `memory_sha256` \+ from the {HOST_KEY} row of registry.rs.",+ path.display(),+ asset.archive,+ );+ checked += 1;+ }+ }++ assert!(+ checked >= 4,+ "expected at least four workflow digest sites, found {checked} — either a \+ lane stopped installing the module, or the assignment was renamed and this \+ guard silently stopped checking anything"+ );+}