feat: consume the WEB-03 handoff with output-relative source links

Bump the fixed Design revision to the handoff/graph/slice/drift candidate and
make web handoff use handoff_relative_to with the output directory, so source
links stay relative when the delivery file is written elsewhere. CI asserts the
links are relative (no absolute/file targets) and that sources are present.

Refs cflmy/marqdo-web-preview#1, cflmy/marqdo-web-design#2, cflmy/marqdo#6
This commit was merged in pull request #3.
This commit is contained in:
cflmy committed 2026-11-27 08:57:22 +08:00
1 parent e739f4504a
commit eff273f7f2
5 files changed
+24 -7

No files matched your search

+10
View File
@@ -27,6 +27,16 @@ handoff="$work/handoff.md"
"$MARQDO_BIN" web handoff tests/fixture/index.mq.md --unit 工作台 --out "$handoff"
test -s "$handoff"
grep -q "Design handoff" "$handoff"
grep -q "components/nav.mq.md#导航" "$handoff"
python3 - "$handoff" <<'PY'
import pathlib, sys, re
text = pathlib.Path(sys.argv[1]).read_text()
assert "](" in text
for target in re.findall(r"\]\(([^)]+)\)", text):
assert not target.startswith("/"), target
assert not target.startswith("file:"), target
print("handoff links are relative")
PY
if "$MARQDO_BIN" web preview tests/fixture/index.mq.md --unit 工作台 --out "$preview" 2>/dev/null; then
echo "preview overwrote an existing directory" >&2
exit 1