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
3 changes: 2 additions & 1 deletion ARCHITECTURE_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)_ <!-- ISSUE:USE-P1-1 -->
- [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)_ <!-- ISSUE:USE-P1-2 -->
- [ ] **[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) <!-- ISSUE:USE-P1-3 -->
- [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)_ <!-- ISSUE:USE-P1-3 -->
- [ ] **[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)_ <!-- ISSUE:USE-P2-1 -->
- [ ] **[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) <!-- ISSUE:USE-P2-2 -->
- [ ] **[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) <!-- ISSUE:USE-P2-3 -->
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
32 changes: 16 additions & 16 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cryptojones@owasp.org>"]
14 changes: 11 additions & 3 deletions crates/scylla-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,14 @@ fn load_session(path: &str) -> Result<Session, ExitCode> {
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] <artifact>` — the artifact's name, language, and function count (offline).
Expand Down Expand Up @@ -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<Session, String> {
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),
Expand Down
3 changes: 3 additions & 0 deletions crates/scylla-graphql/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
3 changes: 3 additions & 0 deletions crates/scylla-http/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <token>`. Unset = OPEN (anyone can query) — fine for a loopback dev
Expand Down
3 changes: 3 additions & 0 deletions crates/scylla-lsp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions crates/scylla-mcp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(|| {
Expand Down
3 changes: 3 additions & 0 deletions crates/scylla-rpc/src/bin/scylla-rpc-serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
35 changes: 35 additions & 0 deletions crates/scylla-schema/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
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<String> = 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).
Expand Down Expand Up @@ -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());
}

Expand All @@ -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
}
Expand Down
6 changes: 5 additions & 1 deletion crates/scylla-tui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Session, String> {
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
Expand Down
5 changes: 3 additions & 2 deletions crates/scylla-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
}

Expand Down
Loading