feat: migrate View 0.3.0 to marqdo 3.0.0-rc.4 contracts
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Replace the retired rc.2 Analysis v2/Trace v2/Execution Events v1 stack with the
single current contract family:
- Analysis v3 (ADR-0069 public boundary): one check --emit artifact carries the
exact source, Markdown AST, heading scopes (heading_span + complete span),
anchors, state-bearing references, calls, resources and diagnostics; the old
revision-3 shape is rejected with a rebuild hint.
- Observation v1: one run/call --output jsonl stream (+ atomic
--observation-file snapshot) decoded by one decoder and projected into the
reader/SSE/export layers; stale/malformed/truncated/incomplete never render
as success.
- CLI Tool revision 1: requires {api_revision:1, analysis:3, observation:1},
product range >=3.0.0-rc.3,<4.0.0, only MARQDO_BIN and
MARQDO_API_REVISION are consumed.
- Remove compatibility branches, retired flags/env vars and duplicate decoders;
re-record Analysis v3 and Observation v1 fixtures; rewrite contract,
integration and security tests (173 passing locally).
- Add check-no-legacy/check-docs/check-observation gates, rc.4 pins in the
CI pipelines, 0.3.0 Tool bundle and evidence manifest support.
See issues #4, #5 and #6; acceptance baseline is CLI source
452e9a32bd9e40dba427d4180691c58bab74449e, archive
9c3f166b5e5b8840d39d10019074e4e1c42432fc23e26c69670e64fdcf4e15d8.
This commit is contained in:
1 parent
7b34199c96
commit
a802f96b6e
109 files changed
+14000
-6461
No files matched your search
@@ -10,24 +10,22 @@ use crate::common::http::{
|
||||
};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
const RUN_GOLDEN: &str = "tests/golden/trace-v2/control-flow.run.json";
|
||||
const TRACE_GOLDEN: &str = "tests/golden/trace-v2/control-flow.trace.json";
|
||||
const ANALYSIS_GOLDEN: &str = "tests/golden/analysis-v2/control-flow.json";
|
||||
const OBS_JSONL: &str = "tests/golden/observation-v1/control-flow.jsonl";
|
||||
const OBS_SNAPSHOT: &str = "tests/golden/observation-v1/control-flow.snapshot.json";
|
||||
const ANALYSIS_GOLDEN: &str = "tests/golden/analysis-v3/control-flow.json";
|
||||
|
||||
fn control_flow() -> TestServer {
|
||||
http::start(
|
||||
"examples/control-flow",
|
||||
ANALYSIS_GOLDEN,
|
||||
Some(RUN_GOLDEN),
|
||||
Some(TRACE_GOLDEN),
|
||||
Some((OBS_JSONL, OBS_SNAPSHOT)),
|
||||
)
|
||||
}
|
||||
|
||||
fn welcome() -> TestServer {
|
||||
http::start(
|
||||
"examples/welcome",
|
||||
"tests/golden/analysis-v2/welcome.json",
|
||||
None,
|
||||
"tests/golden/analysis-v3/welcome.json",
|
||||
None,
|
||||
)
|
||||
}
|
||||
@@ -160,8 +158,11 @@ fn explicit_run_streams_sse_accepted_running_and_terminal_with_verified_trace()
|
||||
assert_eq!(data["run_id"], run_id.as_str());
|
||||
assert_eq!(data["state"], "succeeded");
|
||||
assert_eq!(data["result"]["success"], true);
|
||||
assert_eq!(data["trace"]["status"], "verified");
|
||||
assert!(!data["trace"]["events"].as_array().unwrap().is_empty());
|
||||
assert_eq!(data["observation_summary"]["status"], "verified");
|
||||
assert!(!data["observation_summary"]["events"]
|
||||
.as_array()
|
||||
.unwrap()
|
||||
.is_empty());
|
||||
let states: Vec<_> = frames
|
||||
.iter()
|
||||
.filter_map(|frame| frame.data.as_ref().and_then(|data| data["state"].as_str()))
|
||||
@@ -277,8 +278,7 @@ fn cancel_is_idempotent_and_yields_one_terminal_state() {
|
||||
let server = http::start_with_env(
|
||||
"examples/control-flow",
|
||||
ANALYSIS_GOLDEN,
|
||||
Some(RUN_GOLDEN),
|
||||
Some(TRACE_GOLDEN),
|
||||
Some((OBS_JSONL, OBS_SNAPSHOT)),
|
||||
&[("MARQDO_VIEW_SSE_HEARTBEAT_SECS", "1")],
|
||||
);
|
||||
server.core.set_sleep_seconds(10);
|
||||
@@ -333,7 +333,12 @@ fn cancel_is_idempotent_and_yields_one_terminal_state() {
|
||||
.map(|state| {
|
||||
matches!(
|
||||
state,
|
||||
"succeeded" | "failed" | "cancelled" | "timed_out" | "unavailable"
|
||||
"succeeded"
|
||||
| "failed"
|
||||
| "cancelled"
|
||||
| "timed_out"
|
||||
| "unavailable"
|
||||
| "incomplete"
|
||||
)
|
||||
})
|
||||
.unwrap_or(false)
|
||||
@@ -352,8 +357,7 @@ fn sse_heartbeats_keep_a_slow_job_connected() {
|
||||
let server = http::start_with_env(
|
||||
"examples/control-flow",
|
||||
ANALYSIS_GOLDEN,
|
||||
Some(RUN_GOLDEN),
|
||||
Some(TRACE_GOLDEN),
|
||||
Some((OBS_JSONL, OBS_SNAPSHOT)),
|
||||
&[("MARQDO_VIEW_SSE_HEARTBEAT_SECS", "1")],
|
||||
);
|
||||
server.core.set_sleep_seconds(3);
|
||||
@@ -386,8 +390,7 @@ fn sse_heartbeats_keep_a_slow_job_connected() {
|
||||
fn document_without_main_is_rejected_without_running_another_function() {
|
||||
let server = http::start(
|
||||
"examples/tables-math",
|
||||
"tests/golden/analysis-v2/tables-math.json",
|
||||
None,
|
||||
"tests/golden/analysis-v3/tables-math.json",
|
||||
None,
|
||||
);
|
||||
let (session, _) = open_session(&server, "/");
|
||||
@@ -408,8 +411,7 @@ fn at_most_two_sse_observers_per_run() {
|
||||
let server = http::start_with_env(
|
||||
"examples/control-flow",
|
||||
ANALYSIS_GOLDEN,
|
||||
Some(RUN_GOLDEN),
|
||||
Some(TRACE_GOLDEN),
|
||||
Some((OBS_JSONL, OBS_SNAPSHOT)),
|
||||
&[("MARQDO_VIEW_SSE_HEARTBEAT_SECS", "1")],
|
||||
);
|
||||
server.core.set_sleep_seconds(5);
|
||||
|
||||
Reference in new issue
Block a user