Skip to content

impl(011): increment 5, the synthetic support-routing heads and the evidence, replay, swap and plan-golden tests - #469

Merged
bartekus merged 1 commit into
mainfrom
impl/011-inc5
Nov 3, 2026
Merged

bartekus merged 1 commit into
mainfrom
impl/011-inc5

Conversation

@bartekus

@bartekus bartekus commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Spec 011 increment 5 (3.15, 3.19.2, 3.20.1): the committed synthetic support-routing heads, plus the evidence, replay, swap and plan-golden tests. Everything is synthetic and offline; this is mechanics evidence only.

What lands

  • Fixture bundle: backends/rustev-backend-embed-linear/tests/fixtures/support-routing/, one synthetic bundle (hidden size 8, about 6 KB).
    • Heads for support.topic (classify), support.frustration (rubric) and support.deadline (proposition), generated by synthetic::head_weights with seeds 11, 12 and 13.
    • SYNTHETIC interpretations, with the formula documented in the README.
    • A test regenerates and compares every fixture byte and the file list. Re-blessing is an ignored test, run by hand.
  • Evidence (3.15.1): the answered steps are model-derived, bound to the bundle's ArtifactId, with ticket.message as the only projected input.
  • Replay (3.15.2): each capture reproduces offline after the bundle directory is deleted.
  • Swap (3.15.4): the package's synthetic cases run through the rules backend and through this one. Both are evaluated under the same dataset, split and evaluator configuration, and the two plans' policy sections and output declarations are identical.
    • The gate verdict is recorded as mechanics. Separately captured runs are baseline-role reports, so it is unknown, the same as in spec 007's Jev swap.
  • Calibration: the topic step uses the package's SYNTHETIC temperature calibration, rebound to this bundle's artifact. That is the same helper the package's own tests use to rebind it to the rules backend.
  • Goldens (3.20.1): the bundle's descriptor id and the compiled plan's PlanId. The rules plan's PlanId is unchanged.

Dependencies

Dev-dependencies only: rustev-runtime, rustev-eval, rustev-backend-rules and rustev-pkg-support-routing. The crate's normal graph is unchanged, and make boundaries passes.

Checks run locally

  • Crate tests, with and without features: 44 pass, 1 ignored (the bless test).
  • Clippy -D warnings, the boundary tool and fmt.
  • make gate and the authored-content check.

The record paragraph is in this PR. Increment 6 (the Node binding's local-embed) is M5's, and lands after this because both add an 011 record paragraph.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the PR, which adds spec 011 increment 5: a synthetic support-routing bundle, fixture generation/reproduction tests, evidence/replay/swap/plan-golden tests, and the corresponding spec prose.

Spec change (specs/011-semantic-backend/spec.md)

The added increment 5 paragraph is consistent with the implementation: dev-deps are dev-only (boundary check unaffected), the three synthetic heads match seeds 11/12/13 in fixtures.rs, the fixture reproducibility test and bless workflow are described accurately, and the swap verdict is correctly characterized as recorded-only (not asserted).

Cargo / dep graph

All four new deps (rustev-runtime, rustev-eval, rustev-backend-rules, rustev-pkg-support-routing) land under [dev-dependencies] only, consistent with the spec's "normal graph is unchanged" claim.

fixtures.rs

The generated() function produces a BTreeMap (insertion-order irrelevant; sorted by key), and paths() returns a sorted list, so the byte-for-byte file-list comparison in committed_support_routing_fixtures_are_reproducible is deterministic. The head(...) call uses the hardcoded string "classify" but immediately overrides h["operation"] from the definition — the committed fixture bytes were produced by this exact code, so the reproducibility test locks them together self-consistently. serde_json::to_vec_pretty for identities.json produces alphabetically ordered keys (descriptor before plan), matching the committed file. No trailing newlines on JSON fixtures; serde_json doesn't add them, and the byte comparison will agree.

mod.rs

The hand-rolled block_on is correct: Rust's park/unpark token model means a wake that fires before park_timeout causes it to return immediately; no wakeup is lost. The 30-second checked_duration_since watchdog will panic cleanly if the synthetic runtime stalls.

run_cases drops rt (and therefore the backend Arc) before returning, which is required for the support_routing_evidence_and_offline_replay_without_bundle test to then delete the bundle directory and verify offline replay.

evaluation.rs

The Adapter::parse assertion rules.len() == 1 plus rules[0].select == "enum" is intentional scope-limiting for the package's actual adapter documents; the #[serde(deny_unknown_fields)] struct prevents silent acceptance of broader adapter shapes.

candidate: None for both baseline and candidate calls matches the spec's "separately captured runs are baseline-role reports" — the gate verdict is printed but not asserted, consistent with spec text.

identities.json format

The fixture is written by serde_json::to_vec_pretty and read back as a Value; the test accesses expected["plan"] and expected["descriptor"] by key, so field order in the JSON file is irrelevant to the assertion.

No bugs, security issues, or governance inconsistencies found.

{"head": "5dd96b983f8fb63fee3ce8dd472f97cfe8851293", "verdict": "no-findings", "findings": []}

Subject: e3515f5...5dd96b9, diff digest fd7e9761eb7b1fab94e56020434238af4f8e67158ec752f8fc52a65d3d62305a, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 5d99972 Nov 3, 2026
33 checks passed
@bartekus
bartekus deleted the impl/011-inc5 branch November 3, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant