RPF-WP-0015-T03: E2 proves a fresh write (accepted then duplicate); honest retention note
Driver baseline reports ready for accepted or duplicate and its cleanup owns no server-side object (railiance-platform round-8 review). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 680842@bnt-lap001 Assistant-Session: 54eb9e8e-7d6b-4f0c-b7a6-a6db62075883
This commit is contained in:
parent
6fc2dae86a
commit
748fe6c7db
5 changed files with 47 additions and 33 deletions
|
|
@ -403,18 +403,20 @@ def synthetic_e2(args: argparse.Namespace) -> dict[str, Any]:
|
|||
before_pod = pod_state(remote)
|
||||
if PREFLIGHT.endpoint_status(remote, "/readyz") != 200:
|
||||
raise ProcedureError("audit-core is not ready for the synthetic E2")
|
||||
accepted = driver.run("baseline")
|
||||
if accepted.get("status") != "ready":
|
||||
raise ProcedureError("synthetic E2 event was not accepted")
|
||||
# The driver's baseline phase reports "ready" for accepted *or* duplicate, so it
|
||||
# cannot prove a write. Send twice: the first answer must be a fresh accept,
|
||||
# the second a duplicate of the same fixture (accepted exactly once).
|
||||
first = driver.run("expect-recovered")
|
||||
if first.get("status") != "accepted" or first.get("http_status") not in (200, 202):
|
||||
raise ProcedureError("synthetic E2 first send was not a fresh accept (fixture already present?)")
|
||||
replay = driver.run("expect-recovered")
|
||||
if replay.get("status") != "duplicate" or replay.get("fixture_id") != accepted.get("fixture_id"):
|
||||
if replay.get("status") != "duplicate" or replay.get("fixture_id") != first.get("fixture_id"):
|
||||
raise ProcedureError("synthetic E2 replay was not recognised as a duplicate")
|
||||
# The driver owns no server-side object; its cleanup only confirms local state.
|
||||
# The synthetic event stays in the append-only chain under the trial tenant.
|
||||
load_cleanup = driver.run("cleanup")
|
||||
if (
|
||||
load_cleanup.get("status") != "clean"
|
||||
or load_cleanup.get("fixture_id") != accepted.get("fixture_id")
|
||||
):
|
||||
raise ProcedureError("synthetic E2 cleanup did not confirm exact fixture removal")
|
||||
if load_cleanup.get("status") != "clean" or load_cleanup.get("fixture_id") != first.get("fixture_id"):
|
||||
raise ProcedureError("synthetic E2 driver cleanup did not report clean for this fixture")
|
||||
after_pod = pod_state(remote)
|
||||
if after_pod["uid"] != before_pod["uid"] or after_pod["restart_count"] != before_pod["restart_count"]:
|
||||
raise ProcedureError("audit-core pod identity or restart count changed during the synthetic E2")
|
||||
|
|
@ -425,11 +427,14 @@ def synthetic_e2(args: argparse.Namespace) -> dict[str, Any]:
|
|||
"approval_id": approval["approval_id"],
|
||||
"completed_at": datetime.now(UTC).replace(microsecond=0).isoformat().replace("+00:00", "Z"),
|
||||
"synthetic_event_accepted": True,
|
||||
"first_send_status": first["status"],
|
||||
"first_send_http_status": first["http_status"],
|
||||
"synthetic_event_retained": "append-only chain, trial tenant (driver owns no server-side object)",
|
||||
"replay_status": replay["status"],
|
||||
"accepted_exactly_once": True,
|
||||
"same_pod_uid": after_pod["uid"] == before_pod["uid"],
|
||||
"restart_count_unchanged": after_pod["restart_count"] == before_pod["restart_count"],
|
||||
"load_cleanup_status": load_cleanup.get("status"),
|
||||
"driver_cleanup_status": load_cleanup.get("status"),
|
||||
"synthetic_load_contract": approval["synthetic_load"]["contract_id"],
|
||||
"synthetic_load_driver_revision": approval["synthetic_load"]["driver_revision"],
|
||||
"secret_values_observed": False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue