feat: migrate View 0.3.0 to marqdo 3.0.0-rc.4 contracts
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:
Marqdo View committed 2026-11-25 22:12:51 +08:00
1 parent 7b34199c96
commit 340ecb035f
108 files changed
+13928 -6461

No files matched your search

+12 -4
View File
@@ -25,7 +25,7 @@ fn exported_dir(name: &str) -> PathBuf {
fn fake_core_for_welcome(name: &str) -> FakeCore {
let core = FakeCore::new(name);
let golden = std::fs::read(repo_root().join("tests/golden/analysis-v2/welcome.json")).unwrap();
let golden = std::fs::read(repo_root().join("tests/golden/analysis-v3/welcome.json")).unwrap();
core.set_analysis(std::str::from_utf8(&golden).unwrap());
core
}
@@ -104,6 +104,14 @@ fn exports_offline_site_with_shared_renderer_and_relative_links() {
assert_eq!(manifest["schema_version"], 1);
assert_eq!(manifest["executed"], false);
assert_eq!(manifest["view"]["name"], "marqdo-view");
assert_eq!(manifest["requires"]["api_revision"], 1);
assert_eq!(manifest["requires"]["analysis"], 3);
assert_eq!(manifest["requires"]["observation"], 1);
assert_eq!(manifest["producers"]["view"]["name"], "marqdo-view");
let view_sha = manifest["producers"]["view"]["binary_sha256"]
.as_str()
.expect("view binary sha");
assert!(view_sha.len() == 64 || view_sha == "unavailable");
assert!(manifest["pages"].as_array().unwrap().len() >= 2);
assert!(manifest["assets"].as_array().unwrap().len() >= 5);
let manifest_text = serde_json::to_string(&manifest).unwrap();
@@ -141,7 +149,7 @@ fn export_never_executes_side_effects() {
let out = exported_dir("export-no-exec");
let core = FakeCore::new("export-core-noexec");
let golden =
std::fs::read(repo_root().join("tests/golden/analysis-v2/control-flow.json")).unwrap();
std::fs::read(repo_root().join("tests/golden/analysis-v3/control-flow.json")).unwrap();
core.set_analysis(std::str::from_utf8(&golden).unwrap());
let output = export(&project, &out, &[], Some(&core));
assert_eq!(
@@ -168,7 +176,7 @@ fn no_annotations_keeps_prose_but_removes_anchors() {
let out = exported_dir("export-no-annotations");
let core = FakeCore::new("export-core-noannot");
let golden =
std::fs::read(repo_root().join("tests/golden/analysis-v2/mixed-modes.json")).unwrap();
std::fs::read(repo_root().join("tests/golden/analysis-v3/mixed-modes.json")).unwrap();
core.set_analysis(std::str::from_utf8(&golden).unwrap());
let output = export(&project, &out, &["--no-annotations"], Some(&core));
assert_eq!(
@@ -291,7 +299,7 @@ fn exported_html_has_no_remote_subresources() {
let out = exported_dir("export-offline");
let core = FakeCore::new("export-core-offline");
let golden =
std::fs::read(repo_root().join("tests/golden/analysis-v2/tables-math.json")).unwrap();
std::fs::read(repo_root().join("tests/golden/analysis-v3/tables-math.json")).unwrap();
core.set_analysis(std::str::from_utf8(&golden).unwrap());
let output = export(&project, &out, &[], Some(&core));
assert_eq!(output.status.code(), Some(0));