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

+19 -8
View File
@@ -1,13 +1,16 @@
#!/usr/bin/env bash
# Build and assemble the Tool Protocol v1 release bundle.
# Build and assemble the CLI Tool revision 1 release bundle for marqdo-view 0.3.0.
#
# Produces:
# dist/marqdo-view/ stable bundle path (RFC §18)
# dist/marqdo-view/ stable bundle path
# dist/marqdo-view-<version>-<target>.tar.gz (+ .sha256)
#
# The bundle contains only the runtime binary, the manifest and the legal /
# compatibility files. CSS/JS/images are compiled into the binary (ADR-0002),
# release-note files. CSS/JS/images are compiled into the binary (ADR-0002),
# so there is exactly one asset source for Live and Export.
#
# The current public contracts are exact: api_revision 1, Analysis 3 and
# Observation 1. There is no version negotiation and no `compatibility` field.
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -67,6 +70,11 @@ import sys
bundle = pathlib.Path(sys.argv[1])
version, target, source_sha = sys.argv[2], sys.argv[3], sys.argv[4]
tool = json.loads((bundle / 'tool.json').read_text())
requires = tool.get('requires') or {}
if 'compatibility' in tool:
raise SystemExit('tool.json must not contain a compatibility field')
if requires != {'api_revision': 1, 'analysis': 3, 'observation': 1}:
raise SystemExit('tool.json requires must be exactly api_revision 1 / analysis 3 / observation 1')
files = []
for path in sorted(bundle.rglob('*')):
if not path.is_file():
@@ -88,12 +96,15 @@ info = {
'command': 'view',
'target': target,
'source_sha': source_sha,
'compatibility': {
'marqdo': '>=3.0.0-beta.1,<4.0.0',
'analysis': tool['compatibility']['analysis'],
'trace': [2],
'tool_protocol': 1,
'requires': {
'api_revision': 1,
'analysis': 3,
'observation': 1,
},
'release': {
'product_range': '>=3.0.0-rc.3,<4.0.0',
'markdown_profile': 'marqdo.md.v1',
'platform': 'linux-x86_64-glibc2.39',
},
'files': files,
}