Repository navigation
impl(042): increment 4 part 3, remote context sources in the service and context invalidations - #407
Conversation
AI review (no-findings)Reviewing the diff across all ten changed paths:
The One redundancy in
The
New fields
Extracting
Adding
The test exercises push invalidations comprehensively: baseline, replay-skip, gap detection, erasure-while-retained, poll-source refusal, unknown-source refusal, and malformed-document refusal. The
The increment notes are accurate and consistent with the implementation. The phrase "Engineering choices made by the implementing agent" is unusual but explicitly flags agent-level decisions for owner review. The ratification note at the bottom of the spec is unchanged.
The updated rows accurately reference the new tests. No security vulnerabilities (path traversal, credential leak, injection) beyond what existed before; {"head": "1443f1503ef670bf704814e4b51f2ac708942c2a", "verdict": "no-findings", "findings": []}Subject: 30f9934...1443f15, diff digest 001fa806f6425bfbcd01df6367d9b679624ebae37d33b3cd861332356ebb6d94, 1 call(s). An AI comment is not an approval. |
30f9934 to
34a34b0
Compare
…and context invalidations
1443f15 to
f94de00
Compare
AI review (findings)Reviewing the PR, which adds remote context source clients (
Inside Err(_) => {
let lag = last_ok.elapsed().as_millis() as u64;
service.invalidation_lost(&name, lag, sequence.is_some()); // ①
}
// ...
let lag = last_ok.elapsed().as_millis() as u64;
if lag > max_lag_ms && !lagging {
lagging = true;
service.invalidation_lost(&name, lag, false); // ②
}On the first tick where a poll error occurs and lag has crossed No other concrete defects were found. The lock ordering ( {"head": "f94de00a6d4ec23d96c974f990b4a7670c683c4b", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/src/contexts.rs", "line": 175, "summary": "On the first tick where a poll error coincides with lag exceeding max_lag_ms, invalidation_lost is called twice (once from the Err branch, once from the lag check), causing redundant double-invocation of runtime plan-invalidation for every registered plan on that tick."}]}Subject: a1e0fd3...f94de00, diff digest 8642104848a23ec33821e4c13cc6788622d63d3b138b97b0df859a6dde7dd3e9, 1 call(s). An AI comment is not an approval. |
Spec 042 3.10 and 3.12, part 3: remote context sources in the service, and context invalidations (3.10.6). Builds on part 2 (#405, merged).
rustev-serve/src/contexts.rs: the standalone binary builds oneRemoteContextClientpercontext_sourcesentry (the key is the source id). A source whose describe fails is installed as unavailable (fetches failcontext_unavailable) and is reported not described, so readiness reflects it. Queue depth, refusals and late discards go to the health table every second. Fixed values are recorded in the implementation record as engineering choices: transit margin 25 ms, principal mapping versionrustev-serve/principal-handle/1, scoperustev-serve, describe budget 10 s, describe once at startup.rustev-serve/src/invalidations.rs:POST /v1/context/invalidations(admin group) for sources whose describe declaredpush. Each item is applied before the ack (invalidate_scopefor a principal,invalidate_planforall_scopes, for every plan reading a named field). Replayed items are skipped. The first batch after startup and any non-contiguous batch first invalidate every plan reading the source. A gap is counted and marks the source degraded until the next contiguous batch. Erasures applied while a response for the scope is retained are counted.pollsources are polled atinterval_ms: degraded until the baseline poll succeeds; a failed poll or lag beyondmax_lag_msinvalidates everything from the source, degrades it and requires a new baseline.rustev.serve-service/1now lists the invalidations operation. The explain operation stays unavailable.callback_server.rs,context_client.rs,seam_queue.rsandtaxonomy.rsfromrustev-remote-httpby path, as it does the other shared sources.contexts::tests(describe and unavailable sources; the poll baseline, items and failure),pushed_invalidations_ack_in_order_and_report_gaps_and_erasuresintests/handlers.rs.tests/COVERAGE.mdand the README are updated.Local:
cargo clippy -p rustev-serve --all-targets -D warningsclean,cargo test -p rustev-serveall pass.Review note (f94de00):
contexts.rs175, a failed poll on the tick where lag first passesmax_lag_mscallsinvalidation_losttwice. A fix is ready (one call per tick plus a unit test) but can't be pushed while the pull request is in the merge queue.