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
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions-rust-lang/setup-rust-toolchain@a188e68d0fd2bd36ad51dccb2b07ba6e75105f30 # v2.0.1
with:
toolchain: stable
components: rustfmt, clippy
# No `toolchain:` input: setup-rust-toolchain reads rust-toolchain.toml,
# so CI and local builds use the same pinned compiler. A floating
# `stable` turned main red when 1.100 added manifest lints under
# CARGO_BUILD_WARNINGS=deny (2026-11-13).


- name: format
Expand Down Expand Up @@ -64,7 +65,9 @@ jobs:
grep -oP '\d+(?= passed)' | \
python3 -c "import sys; print(sum(int(l) for l in sys.stdin if l.strip()))")
echo "test count: $count"
FLOOR=470
# Raised 470 -> 900 on 2026-11-13 after a full green run measured 907
# under the pinned toolchain. The ratchet only moves up.
FLOOR=900
if [ "$count" -lt "$FLOOR" ]; then
echo "FAIL: test count $count below floor $FLOOR — tests removed or skipping"; exit 1
fi
Expand Down
37 changes: 0 additions & 37 deletions Cargo.lock

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

6 changes: 0 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ edition = "2024"
license = "MIT"
rust-version = "1.98"
repository = "https://github.com/Reliary/ocserve"
homepage = "https://github.com/Reliary/ocserve"
keywords = ["opencode", "server", "sqlite", "sse", "api"]
categories = ["web-programming::http-server", "database-implementations", "development-tools"]

Expand All @@ -56,7 +55,6 @@ ocserve-ui-v2-d = { path = "crates/ocserve-ui-v2-d", version = "0.7.2" }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal", "sync", "time", "fs", "io-util", "net"] }
axum = { version = "0.8", features = ["json", "ws"] }
tower = "0.5"
hyper = "1"
bytes = "1"

# storage
Expand All @@ -74,7 +72,6 @@ libc = "0.2"
# Already in the tree transitively; this makes the direct use explicit.
rustix = { version = "1", features = ["fs", "process"] }
anyhow = "1"
thiserror = "2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
clap = { version = "4", features = ["derive"] }
Expand All @@ -85,11 +82,8 @@ base64 = "0.23"
hex = "0.4"
futures-util = "0.3"
parking_lot = "0.13"
rustc-hash = "2"

# metrics
metrics = "0.24"
metrics-exporter-prometheus = "0.16"

[profile.release]
opt-level = 3
Expand Down
1 change: 1 addition & 0 deletions TRACEABILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ no-inflation correct), PASS cost (−58.9% weighted) + score (median 1.0 both)
| K-FREEZE-1195 | the v1 freeze must be adopted through the pipeline, not by hand, and every artifact that embeds the tag must move with it | Moved 1.18.31 -> 1.19.5 with `bump.sh v1`. Contract: 188 operations over the same 162 paths (byte-diff: 2 schema descriptions, 1 additive `reasoning_options` property, `x-codeSamples` added to every operation). Prompt/tool text for everything the server sends is byte-identical (`tool/shell/shell.txt` unchanged, `bashCommandSection` unchanged); `plan-enter.txt` was DELETED upstream and is removed here. ARITY rules identical. Two live capture timings were also fixed: `acquire-freeze` printed success while `cp` failed on the root-owned vendored path (step 2 then booted the OLD binary), and `extract-prompts` had no remote fallback. | `capdiff` GREEN with the provider-header oracle enabled: it found the two real deltas (composite UA runtime segment `bun/1.3.14 -> 1.4.4`; `x-opencode-session-id` now sent to EVERY provider, not just `opencode*`), both fixed; replay 26/0; pair 18 compared / 0 divergent, 52 schema checks / 0 violations; `render_check` (prompt parity) green; `global_health` golden now `1.19.5`; test `composite_ua_matches_the_captured_artifact` pins the UA to a captured file, so a hand-written literal cannot drift again | green |
| K-MUTANTS | mutation baseline + gate (Phase 2) | `snapshot::tests::non_git_directory_is_inactive` made hermetic (fixture plants a bogus `.git` boundary — the test falsely passed only when TMPDIR sat outside any repo; the mutants harness sets TMPDIR inside the repo, aborting the baseline). **Full-scope baseline (i9, 2330 mutants, 34 min): 939 caught / 1221 missed / 24 timeout / 146 unviable = 43.5 % score** — `bench/mutants/BASELINE.md` + `baseline-outcomes.json`; zero env-gated skips verified (1 intentional ignore). `scripts/check-mutants.py` gates missed count against ceiling 1221 (ratchet-down-only; selftest red/green proven); `scripts/merge-mutants.py` combines `--shard` files with a duplicate guard (selftest red/green proven). Method corrected on evidence: `additional_cargo_test_args=["--lib"]` removed (drops store integration binaries → 933 false survivors, and lands `--lib` on the test binary). Acceleration: `.cargo/mutants.toml` profile=mutants/debug=none + 45s timeout floor; runs on the i9 (`-j8`, mold, sccache, tmpfs) | green |

| K-CI-PIN | CI must fail for repository changes, not for a Rust release rolling onto the stable channel | On 2026-11-13 every workflow on `main` and on all fork PRs failed within two minutes with zero tests run. rustc 1.100.0 had landed on the runner and introduced cargo manifest lints (`unused_dependencies`, `unused_workspace_dependencies`, `redundant_homepage`); `CARGO_BUILD_WARNINGS=deny` turned them fatal. Reproduced locally under 1.100.0 with the same env (exit 101) and green under 1.99.0, proving the trigger was the compiler, not the code. Fixed by pinning `rust-toolchain.toml` to 1.100.0 (a floating channel makes `main` hostage to a release) and removing the declarations the lint proved unused (workspace `hyper`, `metrics`, `metrics-exporter-prometheus`, `thiserror`; per-crate `thiserror`, `rustc-hash`, `metrics`) plus the duplicated `homepage`. Also replaced the `current_exe()` binary walk in three process tests with `CARGO_BIN_EXE_ocserve`, which is what CI and remote builds actually need; the walk only worked when the test exe sat beside the bin. | `rust-toolchain.toml` pin; `cargo +1.100.0 clippy --workspace --all-targets -- -D warnings` under `CARGO_BUILD_WARNINGS=deny` clean; 907 tests pass on the build box; guards 110/110, matrix, docs green | green |
## Test design techniques coverage (TESTING §4)

| Technique | Applied | Where |
Expand Down
3 changes: 0 additions & 3 deletions crates/ocserve-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
Expand All @@ -20,7 +19,6 @@ path = "src/main.rs"
libc.workspace = true
axum.workspace = true
anyhow.workspace = true
thiserror.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
serde.workspace = true
Expand All @@ -37,7 +35,6 @@ ocserve-metrics.workspace = true
ocserve-importer.workspace = true
rusqlite.workspace = true
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "blocking"] }
metrics.workspace = true

sha1 = "0.11"

Expand Down
13 changes: 7 additions & 6 deletions crates/ocserve-cli/tests/drain_budget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ fn hold_sse(port: u16) -> (std::sync::mpsc::Receiver<()>, std::thread::JoinHandl
}

fn bin() -> std::path::PathBuf {
let mut p = std::env::current_exe().expect("test exe");
p.pop();
if p.ends_with("deps") {
p.pop();
}
p.join("ocserve")
// CARGO_BIN_EXE_<name> is set by cargo for integration tests of the same
// package and points at the real binary whatever the profile/target dir
// is. The previous `current_exe()` walk assumed the test executable sat in
// the same directory as the binary, which is false under a custom
// CARGO_TARGET_DIR + separate build of the bin target (and under the CI
// `cargo test --workspace` ordering that builds tests first).
std::path::PathBuf::from(env!("CARGO_BIN_EXE_ocserve"))
}

#[test]
Expand Down
10 changes: 3 additions & 7 deletions crates/ocserve-cli/tests/shutdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ use std::process::{Command, Stdio};
use std::time::{Duration, Instant};

fn bin() -> std::path::PathBuf {
// The integration test binary lives in target/<profile>/deps/…
let mut p = std::env::current_exe().expect("test exe");
p.pop();
if p.ends_with("deps") {
p.pop();
}
p.join("ocserve")
// Cargo-provided path to the same-package binary: independent of profile,
// target dir, and which targets built first. See drain_budget.rs.
std::path::PathBuf::from(env!("CARGO_BIN_EXE_ocserve"))
}

#[test]
Expand Down
9 changes: 3 additions & 6 deletions crates/ocserve-cli/tests/shutdown_race.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ use std::process::{Command, Stdio};
use std::time::{Duration, Instant};

fn bin() -> std::path::PathBuf {
let mut p = std::env::current_exe().expect("test exe");
p.pop();
if p.ends_with("deps") {
p.pop();
}
p.join("ocserve")
// Cargo-provided path to the same-package binary: independent of profile,
// target dir, and which targets built first. See drain_budget.rs.
std::path::PathBuf::from(env!("CARGO_BIN_EXE_ocserve"))
}

#[test]
Expand Down
2 changes: 0 additions & 2 deletions crates/ocserve-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
description = "Session domain: inbox admission, agent loop, event bus, permissions"

[dependencies]
anyhow.workspace = true
thiserror.workspace = true
tracing.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
3 changes: 0 additions & 3 deletions crates/ocserve-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
Expand All @@ -16,7 +15,6 @@ regex = "1"
ocserve-pty = { workspace = true }
rusqlite = { workspace = true }
anyhow.workspace = true
thiserror.workspace = true
tracing.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand All @@ -40,7 +38,6 @@ ocserve-ui-v2-d.workspace = true
ocserve-metrics.workspace = true
ocserve-plugin.workspace = true
futures-util.workspace = true
metrics.workspace = true
parking_lot.workspace = true
sha2.workspace = true
base64.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions crates/ocserve-importer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
description = "Streaming read-only session importer (opencode.db to ocserve)"

[dependencies]
anyhow.workspace = true
thiserror.workspace = true
tracing.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions crates/ocserve-llm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
Expand All @@ -27,7 +26,6 @@ http-body-util = "0.1"
hyper-boring = "5.4"
boring = "5.4"
ocserve-metrics.workspace = true
thiserror.workspace = true
tracing.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions crates/ocserve-mcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
Expand All @@ -14,7 +13,6 @@ description = "MCP client: stdio + StreamableHTTP + legacy SSE; OAuth token stor
[dependencies]
ocserve-store = { workspace = true }
anyhow.workspace = true
thiserror.workspace = true
tracing.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/ocserve-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
Expand Down
2 changes: 0 additions & 2 deletions crates/ocserve-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
description = "opencode plugin host: hook dispatcher with full upstream name table"

[dependencies]
anyhow.workspace = true
thiserror.workspace = true
hex.workspace = true
tracing.workspace = true
serde.workspace = true
Expand Down
Loading
Loading