diff --git a/ARCHITECTURE_REVIEW.md b/ARCHITECTURE_REVIEW.md index b0dbc7c..3c36b71 100644 --- a/ARCHITECTURE_REVIEW.md +++ b/ARCHITECTURE_REVIEW.md @@ -83,7 +83,7 @@ in the trackers until the branch is merged. | SEC-P3-5 | **PARTIAL ON BRANCH** — threat model corrected; fail-open network defaults remain open | [Codeberg #139](https://codeberg.org/CryptoJones/Scylla/issues/139) · [GitHub #6](https://github.com/CryptoJones/Scylla/issues/6) | | USE-P1-1 | **RESOLVED ON BRANCH** — documented native prerequisites in README/CONTRIBUTING and added actionable panic messages to build.rs | [Codeberg #140](https://codeberg.org/CryptoJones/Scylla/issues/140) · [GitHub #29](https://github.com/CryptoJones/Scylla/issues/29) | | USE-P1-2 | **RESOLVED ON BRANCH** — setup guide added and personal path removed | [Codeberg #141](https://codeberg.org/CryptoJones/Scylla/issues/141) · [GitHub #9](https://github.com/CryptoJones/Scylla/issues/9) | -| USE-P1-3 | **OPEN** | [Codeberg #142](https://codeberg.org/CryptoJones/Scylla/issues/142) · [GitHub #30](https://github.com/CryptoJones/Scylla/issues/30) | +| USE-P1-3 | **RESOLVED ON BRANCH** — every head surfaces a dirty LoadReport (stderr warning; `load_warning` in wasm info) | [Codeberg #142](https://codeberg.org/CryptoJones/Scylla/issues/142) · [GitHub #30](https://github.com/CryptoJones/Scylla/issues/30) | | USE-P2-1 | **PARTIAL ON BRANCH** — parity overclaim removed; CLI mutation verbs remain absent | [Codeberg #143](https://codeberg.org/CryptoJones/Scylla/issues/143) · [GitHub #7](https://github.com/CryptoJones/Scylla/issues/7) | | USE-P2-2 | **OPEN** — docs no longer claim parity, but `merge` remains absent from seven heads | [Codeberg #144](https://codeberg.org/CryptoJones/Scylla/issues/144) · [GitHub #7](https://github.com/CryptoJones/Scylla/issues/7) | | USE-P2-3 | **OPEN** | [Codeberg #145](https://codeberg.org/CryptoJones/Scylla/issues/145) · [GitHub #31](https://github.com/CryptoJones/Scylla/issues/31) | @@ -399,6 +399,7 @@ artifact, gets a silently reduced model, and receives **zero** warning — a dir platform's own ethos. **Advised:** after `Session::from_artifact`, if `!load_report().clean()`, emit a stderr warning (CLI/servers) / MCP notice / TUI status line with the counts; add a `--strict` that exits non-zero on a dirty load. +**Remediated:** added `LoadReport::warning()`; cli, tui, lsp, mcp, http, graphql, and rpc-serve print it to stderr after load, and the wasm `scylla_info` JSON carries `load_warning`. `--strict` is not yet implemented. ### USE-P2-1 · The CLI cannot annotate at all, despite the "same verbs" claim `crates/scylla-cli/src/main.rs:29-42` dispatches only materialize/diff/info/functions/search/view/callers/ diff --git a/BACKLOG.md b/BACKLOG.md index d99c9ec..1a7c0d1 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -444,7 +444,7 @@ _Status: 46/46 filed on Codeberg (#119–#164) and represented on GitHub (#4, #6 - [x] **[USE-P1-1]** A fresh clone fails to build on undocumented native prerequisites — [Codeberg #140](https://codeberg.org/CryptoJones/Scylla/issues/140) · [GitHub #29](https://github.com/CryptoJones/Scylla/issues/29) _(resolved: document native prerequisites in README/CONTRIBUTING and add actionable panic messages to build.rs)_ - [x] **[USE-P1-2]** engine-service (primary materialize path) has no setup docs and ships a hardcoded personal path — [Codeberg #141](https://codeberg.org/CryptoJones/Scylla/issues/141) · [GitHub #9](https://github.com/CryptoJones/Scylla/issues/9) _(resolved on `1012dcd`; pending merge)_ -- [ ] **[USE-P1-3]** LoadReport quarantine warnings are silently dropped on every head — [Codeberg #142](https://codeberg.org/CryptoJones/Scylla/issues/142) · [GitHub #30](https://github.com/CryptoJones/Scylla/issues/30) +- [x] **[USE-P1-3]** LoadReport quarantine warnings are silently dropped on every head — [Codeberg #142](https://codeberg.org/CryptoJones/Scylla/issues/142) · [GitHub #30](https://github.com/CryptoJones/Scylla/issues/30) _(resolved: every head surfaces a dirty LoadReport — stderr warning on cli/tui/lsp/mcp/http/graphql/rpc, `load_warning` in the wasm info)_ - [ ] **[USE-P2-1]** The CLI cannot annotate at all, despite the "same verbs" claim — [Codeberg #143](https://codeberg.org/CryptoJones/Scylla/issues/143) · [GitHub #7](https://github.com/CryptoJones/Scylla/issues/7) _(partial on `1012dcd`: overclaim removed; CLI mutation verbs remain absent)_ - [ ] **[USE-P2-2]** merge is missing from 7 of 9 heads — [Codeberg #144](https://codeberg.org/CryptoJones/Scylla/issues/144) · [GitHub #7](https://github.com/CryptoJones/Scylla/issues/7) - [ ] **[USE-P2-3]** The advertised collaborate (git-for-RE) verb is reachable from no head — [Codeberg #145](https://codeberg.org/CryptoJones/Scylla/issues/145) · [GitHub #31](https://github.com/CryptoJones/Scylla/issues/31) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21a728f..ef93969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ The *why* behind every decision lives in [DesignDecisions.md](DesignDecisions.md ## [Unreleased] +## [0.7.12] — 2026-09-15 + +### Usability + +- **Surface LoadReport quarantine on every head (USE-P1-3 / GH-30).** + New `LoadReport::warning()` summarizes what the loader dropped or truncated. cli, tui, lsp, mcp, http, graphql, and rpc-serve print it to stderr after loading a partially-quarantined artifact; the wasm `scylla_info` JSON now carries `load_warning`. + ## [0.7.11] — 2026-09-15 ### Usability @@ -403,7 +410,8 @@ The **durable core spine** — design-locked and prototype-de-risked, *not a pro zero silent mis-attachment, made a code invariant (`WRONG = 0`). - 33 design decisions locked with rationale; 20 tests, CI, CONTRIBUTING, SECURITY. -[Unreleased]: https://codeberg.org/CryptoJones/Scylla/compare/v0.7.11...HEAD +[Unreleased]: https://codeberg.org/CryptoJones/Scylla/compare/v0.7.12...HEAD +[0.7.12]: https://codeberg.org/CryptoJones/Scylla/compare/v0.7.11...v0.7.12 [0.7.11]: https://codeberg.org/CryptoJones/Scylla/compare/v0.7.10...v0.7.11 [0.7.10]: https://codeberg.org/CryptoJones/Scylla/compare/v0.7.9...v0.7.10 [0.7.9]: https://codeberg.org/CryptoJones/Scylla/compare/v0.7.8...v0.7.9 diff --git a/Cargo.lock b/Cargo.lock index da5f160..b3566f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1446,7 +1446,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scylla-abtest" -version = "0.7.11" +version = "0.7.12" dependencies = [ "flate2", "scylla-ingest", @@ -1458,7 +1458,7 @@ dependencies = [ [[package]] name = "scylla-cli" -version = "0.7.11" +version = "0.7.12" dependencies = [ "scylla-engine", "scylla-model", @@ -1470,7 +1470,7 @@ dependencies = [ [[package]] name = "scylla-engine" -version = "0.7.11" +version = "0.7.12" dependencies = [ "hyper-util", "prost", @@ -1484,7 +1484,7 @@ dependencies = [ [[package]] name = "scylla-graphql" -version = "0.7.11" +version = "0.7.12" dependencies = [ "base64", "juniper", @@ -1498,7 +1498,7 @@ dependencies = [ [[package]] name = "scylla-http" -version = "0.7.11" +version = "0.7.12" dependencies = [ "rcgen", "scylla-model", @@ -1510,7 +1510,7 @@ dependencies = [ [[package]] name = "scylla-ingest" -version = "0.7.11" +version = "0.7.12" dependencies = [ "scylla-model", "scylla-schema", @@ -1520,7 +1520,7 @@ dependencies = [ [[package]] name = "scylla-lsp" -version = "0.7.11" +version = "0.7.12" dependencies = [ "scylla-model", "scylla-port", @@ -1529,7 +1529,7 @@ dependencies = [ [[package]] name = "scylla-mcp" -version = "0.7.11" +version = "0.7.12" dependencies = [ "scylla-ingest", "scylla-model", @@ -1539,7 +1539,7 @@ dependencies = [ [[package]] name = "scylla-merge" -version = "0.7.11" +version = "0.7.12" dependencies = [ "scylla-ingest", "scylla-model", @@ -1547,11 +1547,11 @@ dependencies = [ [[package]] name = "scylla-model" -version = "0.7.11" +version = "0.7.12" [[package]] name = "scylla-port" -version = "0.7.11" +version = "0.7.12" dependencies = [ "scylla-ingest", "scylla-merge", @@ -1561,7 +1561,7 @@ dependencies = [ [[package]] name = "scylla-rpc" -version = "0.7.11" +version = "0.7.12" dependencies = [ "capnp", "capnp-rpc", @@ -1580,7 +1580,7 @@ dependencies = [ [[package]] name = "scylla-schema" -version = "0.7.11" +version = "0.7.12" dependencies = [ "capnp", "capnpc", @@ -1589,11 +1589,11 @@ dependencies = [ [[package]] name = "scylla-serve" -version = "0.7.11" +version = "0.7.12" [[package]] name = "scylla-tui" -version = "0.7.11" +version = "0.7.12" dependencies = [ "ratatui", "scylla-model", @@ -1602,7 +1602,7 @@ dependencies = [ [[package]] name = "scylla-wasm" -version = "0.7.11" +version = "0.7.12" dependencies = [ "scylla-ingest", "scylla-model", diff --git a/Cargo.toml b/Cargo.toml index cb6ddbd..2b30d89 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ members = [ ] [workspace.package] -version = "0.7.11" +version = "0.7.12" edition = "2021" license = "Apache-2.0" authors = ["Aaron K. Clark "] diff --git a/crates/scylla-cli/src/main.rs b/crates/scylla-cli/src/main.rs index d5844f6..6ddfc6b 100644 --- a/crates/scylla-cli/src/main.rs +++ b/crates/scylla-cli/src/main.rs @@ -108,10 +108,14 @@ fn load_session(path: &str) -> Result { eprintln!("error: reading {path}: {e}"); ExitCode::from(2) })?; - Session::from_artifact(&bytes).map_err(|e| { + let session = Session::from_artifact(&bytes).map_err(|e| { eprintln!("error: loading {path}: {e}"); ExitCode::from(2) - }) + })?; + if let Some(w) = session.load_report().warning(path) { + eprintln!("{w}"); + } + Ok(session) } /// `scylla info [--json] ` — the artifact's name, language, and function count (offline). @@ -355,7 +359,11 @@ fn merge(base_path: &str, reanalysis_path: &str, out_path: &str) -> ExitCode { fn diff(a_path: &str, b_path: &str, json: bool) -> ExitCode { let load = |p: &str| -> Result { let bytes = std::fs::read(p).map_err(|e| format!("reading {p}: {e}"))?; - Session::from_artifact(&bytes).map_err(|e| format!("loading {p}: {e}")) + let s = Session::from_artifact(&bytes).map_err(|e| format!("loading {p}: {e}"))?; + if let Some(w) = s.load_report().warning(p) { + eprintln!("{w}"); + } + Ok(s) }; let (a, b) = match (load(a_path), load(b_path)) { (Ok(a), Ok(b)) => (a, b), diff --git a/crates/scylla-graphql/src/main.rs b/crates/scylla-graphql/src/main.rs index 2f6add1..19e03d3 100644 --- a/crates/scylla-graphql/src/main.rs +++ b/crates/scylla-graphql/src/main.rs @@ -68,6 +68,9 @@ fn main() -> ExitCode { return ExitCode::FAILURE; } }; + if let Some(w) = session.load_report().warning(&artifact) { + eprintln!("scylla-graphql: {w}"); + } // SCYLLA_GRAPHQL_TOKEN gates every request (DD-035); unset = OPEN (fine for a loopback dev // console, announced loudly otherwise). diff --git a/crates/scylla-http/src/main.rs b/crates/scylla-http/src/main.rs index 9dc66e3..dc897a3 100644 --- a/crates/scylla-http/src/main.rs +++ b/crates/scylla-http/src/main.rs @@ -137,6 +137,9 @@ fn main() -> ExitCode { return ExitCode::FAILURE; } }; + if let Some(w) = session.load_report().warning(&artifact) { + eprintln!("scylla-http: {w}"); + } // Access is gated by SCYLLA_HTTP_TOKEN (DD-035): every request must carry // `Authorization: Bearer `. Unset = OPEN (anyone can query) — fine for a loopback dev diff --git a/crates/scylla-lsp/src/main.rs b/crates/scylla-lsp/src/main.rs index 893995c..ec308e9 100644 --- a/crates/scylla-lsp/src/main.rs +++ b/crates/scylla-lsp/src/main.rs @@ -38,6 +38,9 @@ fn main() -> ExitCode { return ExitCode::FAILURE; } }; + if let Some(w) = session.load_report().warning(&path) { + eprintln!("scylla-lsp: {w}"); + } let stdin = io::stdin(); let mut reader = stdin.lock(); diff --git a/crates/scylla-mcp/src/main.rs b/crates/scylla-mcp/src/main.rs index fd3f32c..c119daa 100644 --- a/crates/scylla-mcp/src/main.rs +++ b/crates/scylla-mcp/src/main.rs @@ -20,6 +20,9 @@ fn main() { eprintln!("error: decoding artifact: {e}"); std::process::exit(1); }); + if let Some(w) = session.load_report().warning(&path) { + eprintln!("scylla-mcp: {w}"); + } let root = std::env::var_os("SCYLLA_MCP_ROOT") .map(PathBuf::from) .unwrap_or_else(|| { diff --git a/crates/scylla-rpc/src/bin/scylla-rpc-serve.rs b/crates/scylla-rpc/src/bin/scylla-rpc-serve.rs index 9e9119b..a51e1fd 100644 --- a/crates/scylla-rpc/src/bin/scylla-rpc-serve.rs +++ b/crates/scylla-rpc/src/bin/scylla-rpc-serve.rs @@ -50,6 +50,9 @@ fn main() -> ExitCode { return ExitCode::FAILURE; } }; + if let Some(w) = session.load_report().warning(&artifact) { + eprintln!("scylla-rpc-serve: {w}"); + } // Access is gated by SCYLLA_RPC_TOKEN (DD-035): a client must present it to log in. Unset = OPEN // (anyone who connects gets full access) — fine for a loopback dev server, loud otherwise. diff --git a/crates/scylla-schema/src/lib.rs b/crates/scylla-schema/src/lib.rs index 734f266..b797127 100644 --- a/crates/scylla-schema/src/lib.rs +++ b/crates/scylla-schema/src/lib.rs @@ -182,6 +182,36 @@ impl LoadReport { && self.dropped_duplicate_functions == 0 && self.truncated_strings == 0 } + + /// A one-line human warning for a head to surface when the load was dirty, or `None` when + /// clean. Heads must not drop quarantine silently ("never silently wrong", USE-P1-3). + pub fn warning(&self, source: &str) -> Option { + if self.clean() { + return None; + } + let counts = [ + (self.dropped_dangling_callees, "dangling callee(s) dropped"), + (self.dropped_dangling_facts, "dangling fact(s) dropped"), + ( + self.dropped_dangling_edge_provenance, + "dangling edge provenance dropped", + ), + ( + self.dropped_duplicate_functions, + "duplicate function(s) dropped", + ), + (self.truncated_strings, "over-long string(s) truncated"), + ]; + let detail: Vec = counts + .iter() + .filter(|(n, _)| *n > 0) + .map(|(n, what)| format!("{n} {what}")) + .collect(); + Some(format!( + "warning: {source} loaded partially — the model is reduced: {}", + detail.join(", ") + )) + } } /// Hard load failure — the artifact is structurally unusable (DD-036 hard-reject). @@ -586,6 +616,7 @@ mod tests { let bytes = to_bytes(&sample()); let (prog, report) = load(&bytes).expect("load"); assert!(report.clean(), "a well-formed artifact needs no quarantine"); + assert_eq!(report.warning("a.scylla"), None); assert_eq!(prog, sample()); } @@ -596,6 +627,10 @@ mod tests { let bytes = to_bytes(&p); let (prog, report) = load(&bytes).expect("load"); assert_eq!(report.dropped_dangling_callees, 1); + assert_eq!( + report.warning("a.scylla").as_deref(), + Some("warning: a.scylla loaded partially — the model is reduced: 1 dangling callee(s) dropped") + ); assert!(!prog.functions[1].callees.contains(&StableId(99999))); assert!(prog.functions[1].callees.contains(&prog.functions[0].id)); // real edge survives } diff --git a/crates/scylla-tui/src/main.rs b/crates/scylla-tui/src/main.rs index ab9a967..a61f061 100644 --- a/crates/scylla-tui/src/main.rs +++ b/crates/scylla-tui/src/main.rs @@ -66,7 +66,11 @@ fn main() -> ExitCode { /// Load a `.scylla` artifact into a session, mapping IO/decode failures to a printable message. fn load(path: &str) -> Result { let bytes = std::fs::read(path).map_err(|e| format!("cannot read {path}: {e}"))?; - Session::from_artifact(&bytes).map_err(|e| format!("cannot load {path}: {e}")) + let session = Session::from_artifact(&bytes).map_err(|e| format!("cannot load {path}: {e}"))?; + if let Some(w) = session.load_report().warning(path) { + eprintln!("scylla-tui: {w}"); + } + Ok(session) } /// Set up the alternate-screen raw-mode terminal, run the event loop, and ALWAYS restore the diff --git a/crates/scylla-wasm/src/lib.rs b/crates/scylla-wasm/src/lib.rs index 4d8dfec..1ac5fd4 100644 --- a/crates/scylla-wasm/src/lib.rs +++ b/crates/scylla-wasm/src/lib.rs @@ -116,8 +116,9 @@ pub unsafe extern "C" fn scylla_load(ptr: *const u8, len: usize) -> i32 { pub extern "C" fn scylla_info() -> u64 { with_session("null", |s| { let p = s.program(); - json!({ "name": p.name, "language": p.language, "functions": p.functions.len() }) - .to_string() + json!({ "name": p.name, "language": p.language, "functions": p.functions.len(), + "load_warning": s.load_report().warning("artifact") }) + .to_string() }) }