Tighten Section 0 projection wait proof
This commit is contained in:
12
README.md
12
README.md
@@ -20,6 +20,7 @@ Edit Markdown files in this Git repo.
|
|||||||
Current docs:
|
Current docs:
|
||||||
|
|
||||||
- `README.md`
|
- `README.md`
|
||||||
|
- `docs/source-models.md`
|
||||||
- `rta/concept.md`
|
- `rta/concept.md`
|
||||||
- `rta/reports/current-status.md`
|
- `rta/reports/current-status.md`
|
||||||
|
|
||||||
@@ -62,11 +63,12 @@ section0-docs pull
|
|||||||
section0-docs status
|
section0-docs status
|
||||||
MESSAGE="Describe the doc change" section0-docs commit
|
MESSAGE="Describe the doc change" section0-docs commit
|
||||||
section0-docs push
|
section0-docs push
|
||||||
git rev-parse --short HEAD
|
|
||||||
```
|
```
|
||||||
|
|
||||||
After a push, send Virgil the short commit hash. AFFiNE refresh is handled by
|
By default, `section0-docs push` waits for the projected commit to pass backend
|
||||||
the lab operator side; collaborators do not need the home-lab repo.
|
verification and AFFiNE native read verification. If an already-open AFFiNE tab
|
||||||
|
still shows old content, reload the tab or open the printed doc URL in a fresh
|
||||||
|
tab.
|
||||||
|
|
||||||
## Contributor Setup
|
## Contributor Setup
|
||||||
|
|
||||||
@@ -108,11 +110,9 @@ printf '\nMBP sync smoke test: %s\n' "$(date -Is)" >> rta/reports/current-status
|
|||||||
section0-docs status
|
section0-docs status
|
||||||
MESSAGE="MBP sync smoke test" section0-docs commit
|
MESSAGE="MBP sync smoke test" section0-docs commit
|
||||||
section0-docs push
|
section0-docs push
|
||||||
git rev-parse --short HEAD
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Send the printed commit hash to Virgil. After the AFFiNE copies are refreshed,
|
After the AFFiNE copies are refreshed, the smoke line should appear in:
|
||||||
the smoke line should appear in:
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Agent Workspace / Section 0 / Git Projections / RTA Handbook / RTA Status
|
Agent Workspace / Section 0 / Git Projections / RTA Handbook / RTA Status
|
||||||
|
|||||||
@@ -170,6 +170,9 @@ wait_for_projection() {
|
|||||||
origin_commit="\$(printf "%s" "\$status_json" | json_get source.originCommit 2>/dev/null || true)"
|
origin_commit="\$(printf "%s" "\$status_json" | json_get source.originCommit 2>/dev/null || true)"
|
||||||
projected_commit="\$(printf "%s" "\$status_json" | json_get projected.commit 2>/dev/null || true)"
|
projected_commit="\$(printf "%s" "\$status_json" | json_get projected.commit 2>/dev/null || true)"
|
||||||
completed_at="\$(printf "%s" "\$status_json" | json_get projected.completedAt 2>/dev/null || true)"
|
completed_at="\$(printf "%s" "\$status_json" | json_get projected.completedAt 2>/dev/null || true)"
|
||||||
|
backend_ok="\$(printf "%s" "\$status_json" | json_get verification.backend.ok 2>/dev/null || true)"
|
||||||
|
native_ok="\$(printf "%s" "\$status_json" | json_get verification.nativeRead.ok 2>/dev/null || true)"
|
||||||
|
browser_status="\$(printf "%s" "\$status_json" | json_get verification.browserFreshness.status 2>/dev/null || true)"
|
||||||
readme_url="\$(printf "%s" "\$status_json" | python3 -c 'import json,sys
|
readme_url="\$(printf "%s" "\$status_json" | python3 -c 'import json,sys
|
||||||
data=json.load(sys.stdin)
|
data=json.load(sys.stdin)
|
||||||
for doc in (data.get("projected") or {}).get("docs") or []:
|
for doc in (data.get("projected") or {}).get("docs") or []:
|
||||||
@@ -177,12 +180,15 @@ for doc in (data.get("projected") or {}).get("docs") or []:
|
|||||||
print(doc.get("url",""))
|
print(doc.get("url",""))
|
||||||
break' 2>/dev/null || true)"
|
break' 2>/dev/null || true)"
|
||||||
printf " origin=%s projected=%s state=%s%s\n" "\${origin_commit:-unknown}" "\${projected_commit:-none}" "\${state:-unknown}" "\${completed_at:+ completed=\$completed_at}"
|
printf " origin=%s projected=%s state=%s%s\n" "\${origin_commit:-unknown}" "\${projected_commit:-none}" "\${state:-unknown}" "\${completed_at:+ completed=\$completed_at}"
|
||||||
if [ "\$projected_commit" = "\$expected" ]; then
|
printf " verification: backend=%s native-read=%s browser=%s\n" "\${backend_ok:-unknown}" "\${native_ok:-unknown}" "\${browser_status:-not_verified}"
|
||||||
echo "Projected and verified in AFFiNE."
|
if [ "\$projected_commit" = "\$expected" ] && { [ "\$backend_ok" = "True" ] || [ "\$backend_ok" = "true" ]; } && { [ "\$native_ok" = "True" ] || [ "\$native_ok" = "true" ]; }; then
|
||||||
|
echo "Projected and verified through AFFiNE backend and native read."
|
||||||
[ -z "\$readme_url" ] || echo "Doc: \$readme_url"
|
[ -z "\$readme_url" ] || echo "Doc: \$readme_url"
|
||||||
echo "If a browser tab still shows old content, reload the AFFiNE tab or open the doc URL in a fresh tab."
|
echo "If a browser tab still shows old content, reload the AFFiNE tab or open the doc URL in a fresh tab."
|
||||||
json_log "wait.complete" "\$expected"
|
json_log "wait.complete" "\$expected"
|
||||||
return 0
|
return 0
|
||||||
|
elif [ "\$projected_commit" = "\$expected" ]; then
|
||||||
|
echo " commit is projected, but verification is not complete yet"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo " projection status not reachable yet"
|
echo " projection status not reachable yet"
|
||||||
|
|||||||
Reference in New Issue
Block a user