Repository navigation
refactor(067): eval live input resolution moves into rustev-surface behind Host (increment 2a) - #548
Conversation
AI review (findings)Reviewing the diff, I'll focus on the backend conflict detection change, which is the most structurally significant behavioral difference between the old and new code paths. Backend conflict detection regressedOriginal CLI logic (after the candidate loop, iterating the accumulated for backend in rules {
let id = backend.descriptor().backend_id.clone();
if backends.insert(id, backend.descriptor().clone())
.is_some_and(|old| old != *backend.descriptor())
{
return Err(invalid("live-config", "conflicting backend descriptors"));
}
rules_by_id.insert(backend.descriptor().backend_id.clone(), backend);
}All rule backends from all candidates were gathered in one pass, then cross-checked for identical IDs with differing descriptors. New surface logic (inside the per-candidate loop in for descriptor in deps.descriptors.into_iter().skip(c.descriptors.len()) {
…conflict check…
}
New CLI logic (no conflict check): for backend in rules {
rules_by_id.insert(backend.descriptor().backend_id.clone(), backend);
}The second candidate's rule backend silently overwrites the first if they share an Concrete defect: two candidates providing rule backends with the same ID but different descriptors now produce no error; the last writer wins. The The relevant location in the new file is the No other concrete defects found (SHA-256 digesting logic is correctly preserved; {"head": "c00c5f809d82b1cfa30ffc61d12c5d82eff3d16a", "verdict": "findings", "findings": [{"path": "crates/rustev-surface/src/live.rs", "line": 310, "severity": "medium", "category": "correctness", "summary": "The per-candidate backend conflict check iterates deps.descriptors.skip(c.descriptors.len()), which yields an empty iterator whenever the counts match (the common case) and never covers rule backends captured by rules_hook; two candidates with the same backend_id but different descriptors now silently overwrite each other in rules_by_id instead of producing the expected 'conflicting backend descriptors' error."}]}Subject: 78dfabd...c00c5f8, diff digest 859eb36ee0b6d9e816c8f9f7615dbf847305f7aad2eddaf1192bb6f8b840b709, 1 call(s). An AI comment is not an approval. |
|
Review note: the finding on
|
c00c5f8 to
f04ff66
Compare
AI review (findings)Reviewing the diff. The core change moves live input resolution from
|
|
Review note: on the repeated finding about the backend conflict check (live.rs ~290 at f04ff66): the pre-move CLI compared the descriptors of the |
AI review (no-findings)Reviewing the diff: a refactoring that extracts Logic equivalence checks
Digest-binding integrity The SHA-256 delegation
New dangling-symlink handling in The optional-directory path adds explicit Spec and archive policy Spec 067 is updated with an accurate implementation record matching the diff. Test The unit test correctly covers the admission-check path and verifies digest binding for all consumed inputs; No concrete defects found. {"head": "ee14a4ae7462a7e8a31ac4455deb3f32a39876a2", "verdict": "no-findings", "findings": []}Subject: b409354...ee14a4a, diff digest e0f2658d74aea70b104c36516fef5e638a5982b7b527232c3058776230367d7a, 1 call(s). An AI comment is not an approval. |
…ehind Host (increment 2a) The CLI's eval live input resolution (live configuration, dataset, admission, evaluator configuration, adapter, repeat configuration, candidates, captures, bundles or snapshots, case inputs and the probe snapshot) moves into rustev_surface::live, written against the surface Host, in two phases that keep the CLI's check order around its runtime and cost checks. The surface stays free of rustev-live, the runtime and any executor, with its dependencies unchanged: the caller supplies the SHA-256. CLI grammar, bytes, exit codes and goldens are unchanged.
ee14a4a to
0a5089b
Compare
AI review (no-findings)Reviewing the diff, which extracts live input resolution from Logic preservation check The original Backend conflict check Original code conflated descriptor comparison and backend-object deduplication in one loop. The refactored surface checks descriptors via the SHA-256 dependency isolation The
In the original CLI,
The test-only digest maps content to its length. In the test, the two inputs ( Spec and archive policy Increment 2a is correctly described in spec 067. The archive policy entry for No concrete defects found. {"head": "0a5089b995d0036b0280f04f9f38981c7413682b", "verdict": "no-findings", "findings": []}Subject: a52d38b...0a5089b, diff digest e1ac00e1aaec288b566e34f8ce170f8cbc40a80560cada548c1c30f042c0edd9, 1 call(s). An AI comment is not an approval. |
Spec 067 (approved), increment 2a of the plan: section 2 Territory and 3.2.3 ("the binding resolves the inputs with the function the CLI uses").
Summary
crates/rustev-surface/src/live.rs(rustev_surface::live): the input resolutionrustev eval livedid inline, written against&dyn Host, as 063 3.9.3 moved the repeat renderings.Inputs: the digest-binding read wrapper (SHA-256 of every consumed byte string, computed by a caller-supplied function; an input that changes while loading is refused), now host-generic.resolve_inputs: live configuration (parsed by a caller closure, so the surface never depends onrustev-live), dataset, admission, evaluator config, adapter and their consistency, case ids, repeat config, candidates (plans, dependencies, sources, compile, conflicting descriptors, file caps), captures.resolve_cases: bundles or snapshots, per-case inputs with theidentity-mismatchchecks (decision ids from a caller closure), probe snapshot bytes.documentsdirectory helper now lists throughHost::list/Host::entry_kindinstead ofstd::fs::read_dir(same rules: regular files only, sorted, count cap, a missing or dangling optionalsourcesdirectory is empty).rustev-surfacestays in the pure set with its dependencies unchanged (norustev-live,rustev-runtime, executor or hashing crate; the CLI passes its SHA-256 function). No manifest orCargo.lockchange.make boundariespasses.live.rscalls both phases and maps the surface's case types one to one ontorustev_live::run::{LiveCase, CaseInput, CaseOrigin}. Runtime, authorizer, journal, execution and outputs are unchanged.tools/rustev-release/archive-policy.jsonlists the new surface file (031 additive edge).Evidence
cargo test -p rustev-surface, fullcargo test -p rustev-cli(alleval livetests and goldens unchanged),cargo test -p rustev-live,cargo test -p rustev-conformance,cargo test -p rustev-release: pass.cargo run -p rustev-boundaries, workspace clippy-D warnings,cargo fmt --check,cargo build -p rustev-wasm --target wasm32-unknown-unknown: pass.PlanId, schema or conformance case changes.