diff --git a/crates/colibri-contracts/tests/golden.rs b/crates/colibri-contracts/tests/golden.rs index 7ed7a6a..a9de53a 100644 --- a/crates/colibri-contracts/tests/golden.rs +++ b/crates/colibri-contracts/tests/golden.rs @@ -11,6 +11,10 @@ const DOMEDOG_RUN: &str = include_str!("../../../manifests/2026-05-26-domedog-linux-lane-run-manifest.json"); const DOMEDOG_CACHE: &str = include_str!("../../../manifests/2026-05-26-domedog-deepseek-cache-result.json"); +const OSA_CACHE: &str = + include_str!("../../../manifests/2026-05-26-osa-deepseek-cache-result.json"); +const OSA_GATE4_RUN: &str = + include_str!("../../../manifests/2026-05-26-osa-freebsd-gate4-run-manifest.json"); fn roundtrip_eq(value: &T) where @@ -56,7 +60,10 @@ fn parses_domedog_run_manifest() { let run: RunManifest = serde_json::from_str(DOMEDOG_RUN).expect("parse domedog run manifest"); assert_eq!(run.schema, RUN_MANIFEST_SCHEMA); assert_eq!(run.role, "linux-build-smoke"); - assert_eq!(run.artifacts.get("runtime_inventory").map(String::as_str), Some("manifests/2026-05-26-domedog-runtime-inventory.json")); + assert_eq!( + run.artifacts.get("runtime_inventory").map(String::as_str), + Some("manifests/2026-05-26-domedog-runtime-inventory.json") + ); roundtrip_eq(&run); } @@ -71,6 +78,33 @@ fn parses_domedog_live_cache_result() { roundtrip_eq(&res); } +#[test] +fn parses_osa_live_cache_result() { + let res: ProviderSmokeResult = serde_json::from_str(OSA_CACHE).expect("parse osa cache result"); + assert_eq!(res.schema, PROVIDER_SMOKE_SCHEMA); + assert_eq!(res.host, "osa"); + assert_eq!(res.agent, "codex-osa"); + assert_eq!(res.status, "ok"); + assert!(res.cache_hit_observed, "expected a cache hit"); + assert!(res.cache_hit_tokens > 0); + roundtrip_eq(&res); +} + +#[test] +fn parses_osa_gate4_run_manifest() { + let run: RunManifest = serde_json::from_str(OSA_GATE4_RUN).expect("parse osa gate4 run"); + assert_eq!(run.schema, RUN_MANIFEST_SCHEMA); + assert_eq!(run.role, "freebsd-build-cache-smoke"); + assert_eq!(run.agent.as_deref(), Some("codex-osa")); + assert_eq!( + run.artifacts + .get("deepseek_cache_result") + .map(String::as_str), + Some("manifests/2026-05-26-osa-deepseek-cache-result.json") + ); + roundtrip_eq(&run); +} + #[test] fn provider_smoke_skipped_shape() { // No live result committed yet; assert the struct accepts a skipped result. diff --git a/docs/MIGRATION-INVENTORY.md b/docs/MIGRATION-INVENTORY.md index c33ed0f..c298742 100644 --- a/docs/MIGRATION-INVENTORY.md +++ b/docs/MIGRATION-INVENTORY.md @@ -90,35 +90,34 @@ the production service**. ## 5. Proof gates before replacing the Clawdie TS service -1. ✅ `colibri-contracts` round-trips TS-produced fixtures (6 golden tests pass, - incl. the live cache result). +1. ✅ `colibri-contracts` round-trips TS-produced fixtures (8 golden tests pass, + incl. Linux and FreeBSD live cache results). 2. ✅ **DONE 26.maj.2026** — DeepSeek live cache manifest exists: `manifests/2026-05-26-domedog-deepseek-cache-result.json` — 3584/3661 prompt tokens cache-hit on domedog/Linux (~98%), model `deepseek-v4-flash`. 3. Runtime inventory parity across osa / domedog / debby — osa ✅ + domedog ✅; debby pending. -4. The first slice runs end-to-end on Linux **and** FreeBSD — Linux ✅ (incl. - live cache); **FreeBSD pending → see handoff below**. +4. ✅ **DONE 26.maj.2026** — the first slice runs end-to-end on Linux **and** + FreeBSD. Linux evidence: domedog live cache result. FreeBSD evidence: osa + build/test and live cache result (`manifests/2026-05-26-osa-deepseek-cache-result.json`), + with 3584/3661 prompt tokens cache-hit on `deepseek-v4-flash`. 5. Watchdog status read without breaking `doctor` / `pi-profile` — not started. 6. No production TS path retired until 1–5 are green and the caller inventory in §2 is done. -## Handoff: FreeBSD build lane (Codex · osa) +## Completed: FreeBSD build lane (Codex · osa) -Closes the FreeBSD half of gate #4. On osa: +Codex completed the FreeBSD half of gate #4 on osa on 26.maj.2026: -1. `git pull` Colibri to `main`. -2. `cargo build --workspace --release` — confirm `colibri-contracts`, - `colibri-deepseek`, and the root binaries compile on FreeBSD (rustls/tokio). -3. `cargo test --workspace` — golden tests should pass (they include the domedog - live-cache fixture). -4. Optional but valuable: with the DeepSeek key on osa, run - `COLIBRI_HOST=osa COLIBRI_AGENT=codex-osa ./target/release/colibri-probe` and - commit the result as `manifests/2026-05-26-osa-deepseek-cache-result.json` — a - FreeBSD live-cache manifest alongside domedog's. +1. Pulled Colibri `main` to `0dc3e94`. +2. `cargo build --workspace --release` passed on FreeBSD. +3. `cargo test --workspace` passed after adding the osa cache and run manifests + to golden contract coverage. +4. Ran `COLIBRI_HOST=osa COLIBRI_AGENT=codex-osa ./target/release/colibri-probe` + with local-only DeepSeek key material and committed the key-free usage result + as `manifests/2026-05-26-osa-deepseek-cache-result.json`. -Done when: workspace builds + tests pass on FreeBSD; (optional) osa cache -manifest committed. Report via a run manifest. +Run manifest: `manifests/2026-05-26-osa-freebsd-gate4-run-manifest.json`. ## Architecture boundary (GUI / Zed / Herdr) diff --git a/manifests/2026-05-26-osa-deepseek-cache-result.json b/manifests/2026-05-26-osa-deepseek-cache-result.json new file mode 100644 index 0000000..4409615 --- /dev/null +++ b/manifests/2026-05-26-osa-deepseek-cache-result.json @@ -0,0 +1,30 @@ +{ + "schema": "clawdie.provider-smoke.result.v1", + "test_id": "colibri-probe-20260526T125645Z", + "host": "osa", + "agent": "codex-osa", + "provider": "deepseek", + "model": "deepseek-v4-flash", + "started_at": "2026-05-26T12:56:45.956258868+00:00", + "ended_at": "2026-05-26T12:56:50.404507738+00:00", + "status": "ok", + "warm_usage": { + "prompt_tokens": 3661, + "completion_tokens": 2, + "total_tokens": 3663, + "prompt_cache_hit_tokens": 3584, + "prompt_cache_miss_tokens": 77 + }, + "probe_usage": { + "prompt_tokens": 3661, + "completion_tokens": 1, + "total_tokens": 3662, + "prompt_cache_hit_tokens": 3584, + "prompt_cache_miss_tokens": 77 + }, + "cache_hit_tokens": 3584, + "cache_hit_observed": true, + "notes": [ + "prefix cache HIT on second request" + ] +} diff --git a/manifests/2026-05-26-osa-freebsd-gate4-run-manifest.json b/manifests/2026-05-26-osa-freebsd-gate4-run-manifest.json new file mode 100644 index 0000000..9d20caf --- /dev/null +++ b/manifests/2026-05-26-osa-freebsd-gate4-run-manifest.json @@ -0,0 +1,30 @@ +{ + "schema": "clawdie.interagent.run-manifest.v1", + "test_id": "colibri-freebsd-gate4-20260526T130639Z", + "role": "freebsd-build-cache-smoke", + "host": "osa", + "agent": "codex-osa", + "started_at": "2026-05-26T12:56:23Z", + "ended_at": "2026-05-26T13:06:39Z", + "protocols": {}, + "network": {}, + "artifacts": { + "deepseek_cache_result": "manifests/2026-05-26-osa-deepseek-cache-result.json", + "domedog_cache_result": "manifests/2026-05-26-domedog-deepseek-cache-result.json" + }, + "summary": { + "git_base": "0dc3e94", + "cargo_build_release": "pass", + "cargo_test": "pass — 8 passed (golden contracts)", + "deepseek_live_probe": "pass — 3584/3661 prompt tokens cache-hit on FreeBSD osa", + "cache_hit_observed": "true" + }, + "raw_transfer_required": false, + "notes": [ + "FreeBSD build lane green on osa after pulling Colibri main 0dc3e94.", + "cargo build --workspace --release completed successfully on FreeBSD.", + "cargo test --workspace completed successfully with 8 golden tests passing, including domedog and osa live-cache fixtures.", + "Optional osa DeepSeek live probe was run with local key material only; committed manifests contain usage counters only and no secret values.", + "Gate #4 FreeBSD half is satisfied: first slice builds, tests, and observes DeepSeek prefix-cache hits on FreeBSD." + ] +}