release: bump version to 0.71.1
Some checks failed
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
release / images (push) Has been cancelled
ci / delivery (push) Has been cancelled

This commit is contained in:
linkong
2026-06-26 17:34:19 +08:00
parent 899e3bce43
commit 3265d22af5
26 changed files with 1052 additions and 71 deletions

104
scripts/harness/doctor.sh Executable file
View File

@@ -0,0 +1,104 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
failures=0
warnings=0
ok() {
printf "ok: %s\n" "$1"
}
warn() {
warnings=$((warnings + 1))
printf "warn: %s\n" "$1"
}
fail() {
failures=$((failures + 1))
printf "fail: %s\n" "$1"
}
check_cmd() {
local cmd="$1"
if command -v "$cmd" >/dev/null 2>&1; then
ok "found command: $cmd"
else
fail "missing required command: $cmd"
fi
}
check_optional_cmd() {
local cmd="$1"
local reason="$2"
if command -v "$cmd" >/dev/null 2>&1; then
ok "found optional command: $cmd"
else
warn "missing optional command: $cmd ($reason)"
fi
}
check_file() {
local path="$1"
if [ -e "$ROOT_DIR/$path" ]; then
ok "found file: $path"
else
fail "missing required file: $path"
fi
}
check_absent() {
local path="$1"
local reason="$2"
if [ -e "$ROOT_DIR/$path" ]; then
fail "unexpected file: $path ($reason)"
else
ok "absent as expected: $path"
fi
}
main() {
cd "$ROOT_DIR"
check_file README.md
check_file rules.md
check_file project_context.md
check_file agents.md
check_file AGENTS.md
check_file CODEMAP.md
check_file docs/HARNESS.md
check_file docs/harness-audit.md
check_file docs/documentation-coverage-rules.md
check_file planet.sh
check_file pyproject.toml
check_file frontend/package.json
check_file .gitea/workflows/ci.yaml
check_cmd git
check_cmd zsh
check_cmd uv
check_cmd bun
check_optional_cmd docker "needed for local stack and optional image smoke builds"
check_optional_cmd helm "needed for optional Helm delivery smoke checks"
check_absent frontend/package-lock.json "frontend package management is Bun-only"
check_absent frontend/pnpm-lock.yaml "frontend package management is Bun-only"
check_absent frontend/yarn.lock "frontend package management is Bun-only"
if [ ! -x "$ROOT_DIR/planet.sh" ]; then
warn "planet.sh is not executable; run it with zsh or restore executable bit"
else
ok "planet.sh is executable"
fi
if [ "$failures" -gt 0 ]; then
printf "harness doctor failed: %d failure(s), %d warning(s)\n" "$failures" "$warnings"
exit 1
fi
printf "harness doctor passed: %d warning(s)\n" "$warnings"
}
main "$@"

34
scripts/harness/quick-check.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
run() {
printf "+ %s\n" "$*" >&2
"$@"
}
main() {
cd "$ROOT_DIR"
run scripts/harness/doctor.sh
run git diff --check
run zsh -n planet.sh
run bash -n scripts/bootstrap-dev.sh
run bash -n scripts/harness/doctor.sh
run bash -n scripts/harness/quick-check.sh
run bash -n scripts/harness/validate.sh
(
cd "$ROOT_DIR/backend"
run uv run --frozen --group dev --project "$ROOT_DIR" python -m pytest -s \
tests/test_api.py \
tests/test_realtime_sources.py \
-q
)
printf "harness quick check passed\n"
}
main "$@"

63
scripts/harness/validate.sh Executable file
View File

@@ -0,0 +1,63 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
DOCKER_SMOKE="${PLANET_HARNESS_DOCKER_SMOKE:-0}"
run() {
printf "+ %s\n" "$*" >&2
"$@"
}
run_helm_smoke_if_available() {
if ! command -v helm >/dev/null 2>&1; then
printf "warn: helm not found; skipping Helm lint/template smoke\n"
return 0
fi
run helm lint deploy/helm/planet
run helm template planet-staging deploy/helm/planet \
--namespace planet-staging \
-f deploy/helm/planet/values.single-node.yaml \
--set image.tag=harness-smoke >/tmp/planet-harness-rendered.yaml
}
run_docker_smoke_if_requested() {
case "$DOCKER_SMOKE" in
1|true|yes|on)
;;
*)
printf "info: Docker image smoke skipped; set PLANET_HARNESS_DOCKER_SMOKE=1 to enable\n"
return 0
;;
esac
if ! command -v docker >/dev/null 2>&1; then
printf "fail: docker not found; cannot run requested image smoke builds\n"
return 1
fi
run docker build -t planet-harness/frontend:smoke ./frontend
run docker build -t planet-harness/backend:smoke -f backend/Dockerfile .
run docker build -t planet-harness/aiprovider:smoke -f aiprovider/Dockerfile .
}
main() {
cd "$ROOT_DIR"
run scripts/harness/quick-check.sh
(
cd "$ROOT_DIR/frontend"
run bun install --frozen-lockfile
run bun run build
)
run_helm_smoke_if_available
run_docker_smoke_if_requested
printf "harness validation passed\n"
}
main "$@"