Repository navigation
impl(063): increment 1, capture on decide in the Node binding - #508
Conversation
AI review (findings)ReviewMain defect:
|
cb4abf3 to
b25cc0e
Compare
AI review (findings)ReviewFinding 1 —
|
|
Review note on the recurring AI finding at Not a defect. On the captured sink-failure path the native result carries The second finding (the spec 001 record named only |
AI review (findings)Reviewing the PR for spec 063 increment 1 (capture on The main areas I examined: Finding: compile error in The running.push(tokio::spawn(
async move { rt.decide(&plan, req, &cancel).await },
));After the PR, every task returns The result-processing code — shown as unchanged context in the diff — is: let r = running
.remove(0)
.await
.map_err(|_| format!("{id} never finished"))? // unwraps JoinError → tuple
.map_err(|e| format!("{id}: {e}"))?; // ERROR: called on a tuple
let (r, captured) = r;After the first The fix is either to remove the second {"head": "6a1204637213dd60ae503e29c525bcd26b72e1b6", "verdict": "findings", "findings": [{"path": "tools/rustev-conformance/src/runtime.rs", "line": null, "summary": "Task return type changed from Result<Decided, DecideError> to (Result<Decided, DecideError>, Option<CaptureOutcome>) but the unchanged processing chain calls .map_err(|e| …)? on the tuple produced after the first map_err/?, which is a compile-time type error because tuples do not implement the Result traits."}]}Subject: a3c1eab...6a12046, diff digest 1d8547886e50e79b18c0735a2f3b91418d81d87985f1cbba0a073f37501e582a, 1 call(s). An AI comment is not an approval. |
|
Review note on the AI finding at 6a12046 ( Not a defect. |
decide takes capture options (scope, maxBytes, createdAtMs, retention, lifetime, host cap), checked before admission, and returns the replay bundle and external items assembled from the plan handle's retained dependencies. Nothing captured reaches the sink, telemetry, gauges or an error message. Two conformance cases, runtime.capture-replay and runtime.capture-generation, run on rust-api and native with identical bytes. Acquisition pages join with increment 3.
…rds the lock change rustev-contract's ranking_wire test counts fixtures/runtime's descriptors, so the capture-generation fixtures move to fixtures/capture. Spec 001 records Cargo.lock's new rustev-conformance path dependency on rustev-eval as build only.
6a12046 to
3e1ce8c
Compare
AI review (findings)ReviewThe PR implements spec 063 increment 1: caller-side capture on Finding: Run record bytes discarded in capture +
|
|
Review note on the SinkFailure finding (integrations/rustev-node/src/lib.rs): not a defect. |
Spec 063 increment 1 (3.8): opt-in capture on
decidein the Node binding, the only capture path for a host's shadow-then-switch on plan 3 decisions.decide(request, { capture })takesscope,maxBytes,createdAtMs,retain(digest_onlydefault,embedded,external),lifetimeMsandhostCapMs. Invalid options throwCaptureConfigRefused(zero_limit,limit_too_large,invalid_scope,out_of_range) before the context fetch and admission.Runtime::decide_with_capture; the bundle is assembled withassemble_with_sourcesfrom the plan handle's retained plan, descriptors and calibrations (src/capture.rs). The result gainscapture: { status, bundle?, items?, error? };externalreturns each item under its tagged digest.limit_exceededdrops the payload and leaves the decision, record and delivery unchanged; an assembly refusal setserror.SinkFailurecarriescapturebesiderecord.index.d.ts(3.11); no generated declaration changes. The WebAssembly package is untouched (R-1); the CLI is unchanged (3.8.6).integrations/rustev-node/test/capture.test.mjscovers the capture rows of section 5 (no capture, the refusals,limit_exceeded, digest-only replay, a withheld external item, the redaction canary, snapshot versus principal canary) plus embedded and externalreproducedwith zero backend calls andSinkFailure. Conformance casesruntime.capture-replay(embedded and external, semantic steps) andruntime.capture-generationonrust-apiandnative, with identical bytes.missingfor an item, which replay has always reported, and spec 036'scontent-not-retainedonly for an acquisition page; no behavior changes. Acquisition pages join with increment 3.Checks run locally:
make gate;cargo fmt --all --check;cargo test -p rustev-nodeand-p rustev-conformance; clippy on both with-D warnings; the release addon;tsc --strictonindex.d.ts;node --test integrations/rustev-node/test/*.test.mjs(62 passed, 0 failed, 4 skipped as before);run.mjs native.