Repository navigation
impl(042): increment 5 part 2, serve surfaces and runtime cases through the service - #418
Conversation
AI review (findings)Reviewing the diff for bugs, security issues, and inconsistencies.
In let execution = match &json["execution"] {
Json::String(s) if s == "none" => json!("none"),
e => json!({ "some": e["declared"]["policy"] }),
};When The spec narrative says "the plan is registered with its declared execution policy and calibrations," so the intent is correct but the path is one level short. The correct extraction would navigate through the
let mut s = script.cloned().unwrap_or_else(|| rc.backends[0].clone());If a descriptor in No other concrete defects found in the remaining changes (the {"head": "268480ce8330c790f7252dd24df9a27933a18cf1", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/tests/conformance/runner.rs", "line": 491, "summary": "registration() extracts the execution policy one level too shallow: for a non-\"none\" plan, e[\"declared\"][\"policy\"] evaluates to null because e is the entire {\"some\": {\"declared\": ...}} object, producing a null policy in the registered bundle."}, {"path": "integrations/rustev-serve/tests/conformance/runner.rs", "line": 616, "summary": "drive() panics if rc.backends is empty and a descriptor has no matching backend script, because the inert-backend fallback unconditionally indexes rc.backends[0]."}]}Subject: 1d5fd7e...268480c, diff digest 84f258db70172ddc77e6f83493cfc8804cd97da11d56ab8a576d7dc7859fc9f6, 1 call(s). An AI comment is not an approval. |
268480c to
96d52ee
Compare
AI review (findings)Reviewing the six changed files. The PR extends the conformance runner to drive runtime cases through the decision service's HTTP/gRPC surfaces, refactors
The refactor is structurally sound.
Extracting
Surfaces added correctly; Concrete defect – spec text contradicts code
But the runner maps {"head": "96d52ee9cf497c14185657da9b3a371a3c31cea1", "verdict": "findings", "findings": [{"path": "specs/042-decision-service-and-remote-seams/spec.md", "line": 1308, "summary": "Spec text says the cancelled-before-admission refusal maps to the rejection kind string 'cancelled_before_admission', but the runner and golden files use 'cancelled', consistent with the non-service runtime runner."}]}Subject: 90dcc79...96d52ee, diff digest b9f7a4c06f9df947a33503d319ded53b3a533df0f7554d9b468cd267b68653c9, 1 call(s). An AI comment is not an approval. |
96d52ee to
d6f5965
Compare
AI review (findings)Review
|
d6f5965 to
5963c66
Compare
AI review (findings)ReviewOverviewThis PR adds two capabilities to the conformance runner: (1) marking every Findings
The helper introduced to derive a context-source ID from a snapshot filename is not injective: fn source_id(snapshot: &str) -> String {
snapshot.trim_end_matches(".json").replace('.', "-")
}
let n = match sources.iter().position(|(id, _)| *id == source_id(&r.snapshot)) {
Some(n) => n, // reuses the slot for the first snapshot
None => { ... } // only reached on a genuinely new id
};
source_of.push(sources[n].0.clone());If two requests in a runtime case reference different snapshot files whose A safe fix is to use the raw snapshot filename (after stripping All other changes — the refactored {"head": "5963c66842e4b2119fd86b3c7e61295ad56dad4e", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/tests/conformance/runner.rs", "line": null, "summary": "source_id strips .json then replaces '.' with '-', making distinct filenames like a.b.json and a-b.json indistinguishable; the deduplication silently reuses the first snapshot for any later request whose snapshot name maps to the same id, causing the service to be fed wrong evidence without any error."}]}Subject: 90dcc79...5963c66, diff digest 5ec82d91b0e75419dc00a1fcdb15b452a84479dd7474856e2216f5491ad7b631, 1 call(s). An AI comment is not an approval. |
5963c66 to
1dbcd32
Compare
AI review (findings)Reviewing the PR for concrete defects in the changed files.
In the block that processes each completed task, } else {
let decision = ServeDecision::parse(&answer)…;
…
let status = serde_json::to_value(decision.status).unwrap();
(result_line(id, status.as_str().unwrap(), None), true) // ← always true
};
…
if has_record {
let kept = r.sink.0.lock().unwrap();
let mut record = kept
.iter()
.find(|rec| rec.decision_id == *id)
.unwrap_or_else(|| panic!("{}: {id}: no delivered record", case.id))
No other concrete defects found. The {"head": "1dbcd329bccc8e1a3462d69c21c1465ae60197ce", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/tests/conformance/runner.rs", "line": null, "summary": "In `drive`, `has_record` is always `true` for any `ServeDecision` response, including `EvidenceNotDelivered`; the code then searches `r.sink` for the record, but `EvidenceNotDelivered` means delivery failed so the record is absent, causing an unconditional panic instead of a verifiable test assertion."}]}Subject: 90dcc79...1dbcd32, diff digest ab3d4471e3f9b92513132f6bbb0a3ef9b14ff43349d5fc00b627aac25a2944a6, 1 call(s). An AI comment is not an approval. |
1dbcd32 to
17680bd
Compare
AI review (no-findings)Reviewing the diff across the five changed files.
No concrete defects found. {"head": "17680bd714c3a49eec81cf0fcf79580b4e2f11cf", "verdict": "no-findings", "findings": []}Subject: 90dcc79...17680bd, diff digest 0a98628bbcd5b6262ac2ea925c2beceb54a7dbc4805aa8e9ed693b031b14123d, 1 call(s). An AI comment is not an approval. |
Summary
Spec 042, increment 5 part 2 (3.17.1, 3.17.2): the decision service joins the shared conformance suite as the surfaces
serve-httpandserve-grpc, and runs the runtime cases through the service.runcase (CLI harvest) and every runtime case namesserve-grpcandserve-http; case files andcases/manifest.jsonrebuilt.rustev_conformance::runtime::Scriptedis public (constructor,backend,gated,release_all) withresult_line, so the service's runner binds the same scripted backends as the Rust runner. The Rust runner's outputs are unchanged.integrations/rustev-serve/tests/conformance/runner.rsselects cases by surface. A runtime case runs with its runtime bounds (max_in_flight,max_queued,max_parallel_requests, per-backend concurrency,fail_decisiontimeout) on the manual clock; the driver's steps go through the service (decide requests, the cancel operation), and each decision's result and delivered record must equal the case's bytes. HTTP and gRPC answers are compared byte for byte per listener.extendsedge oncrates/rustev-cli/tests/common/(spec 006) for the harvest change.Checks
cargo test -p rustev-serve --lib conformance::cargo test -p rustev-conformancemake gate,scripts/check-authored-content.sh,spec-spine couple