2026-04-06 13:45:04 +08:00
|
|
|
|
#!/usr/bin/env bash
|
feat: OpenTelemetry LGTM observability, dev tooling, and memoir UX fixes (#31)
* add staging ios app build script
* feat(api): add OpenTelemetry LGTM stack for local observability
Wire OTel traces, metrics, and logs through a collector to Tempo,
Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay,
Grafana provisioning, env templates, and development.sh auto-start.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: expand observability, harden dev tooling, and fix expo staging UX
Add business and LLM Prometheus metrics with Grafana dashboards, alerting,
and a metrics verification script. Wire telemetry through adapters and core
LLM paths, and document the local LGTM workflow.
Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome,
and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge
internal-eval into the main dev script with improved compose handling.
Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs,
show memoir empty state instead of load errors when no chapters exist, and
add jest env setup plus chapter list response normalization.
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: enable Grafana Assistant Cursor plugin
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp
Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Kevin <kevin@brighteng.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 15:12:21 +08:00
|
|
|
|
# 已合并入 development.sh(默认启动评测台 + 自动打开 Grafana / 评测 UI)。
|
|
|
|
|
|
# 本脚本保留为兼容入口,行为与 ./development.sh 相同。
|
2026-04-06 13:45:04 +08:00
|
|
|
|
#
|
feat: OpenTelemetry LGTM observability, dev tooling, and memoir UX fixes (#31)
* add staging ios app build script
* feat(api): add OpenTelemetry LGTM stack for local observability
Wire OTel traces, metrics, and logs through a collector to Tempo,
Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay,
Grafana provisioning, env templates, and development.sh auto-start.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: expand observability, harden dev tooling, and fix expo staging UX
Add business and LLM Prometheus metrics with Grafana dashboards, alerting,
and a metrics verification script. Wire telemetry through adapters and core
LLM paths, and document the local LGTM workflow.
Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome,
and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge
internal-eval into the main dev script with improved compose handling.
Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs,
show memoir empty state instead of load errors when no chapters exist, and
add jest env setup plus chapter list response normalization.
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: enable Grafana Assistant Cursor plugin
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp
Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Kevin <kevin@brighteng.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 15:12:21 +08:00
|
|
|
|
# 若主站已在其他终端占用 :8000,仅附加评测 HTTP + 前端(不再起 Celery):
|
|
|
|
|
|
# SKIP_INFRA=1 SKIP_INSTALL=1 EVAL_ATTACH_ONLY=1 ./development.sh
|
2026-04-06 13:45:04 +08:00
|
|
|
|
#
|
feat: OpenTelemetry LGTM observability, dev tooling, and memoir UX fixes (#31)
* add staging ios app build script
* feat(api): add OpenTelemetry LGTM stack for local observability
Wire OTel traces, metrics, and logs through a collector to Tempo,
Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay,
Grafana provisioning, env templates, and development.sh auto-start.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: expand observability, harden dev tooling, and fix expo staging UX
Add business and LLM Prometheus metrics with Grafana dashboards, alerting,
and a metrics verification script. Wire telemetry through adapters and core
LLM paths, and document the local LGTM workflow.
Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome,
and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge
internal-eval into the main dev script with improved compose handling.
Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs,
show memoir empty state instead of load errors when no chapters exist, and
add jest env setup plus chapter list response normalization.
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: enable Grafana Assistant Cursor plugin
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp
Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Kevin <kevin@brighteng.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 15:12:21 +08:00
|
|
|
|
# 兼容旧变量:SKIP_CELERY=1 等价于 EVAL_ATTACH_ONLY=1
|
2026-04-06 13:45:04 +08:00
|
|
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
|
|
feat: OpenTelemetry LGTM observability, dev tooling, and memoir UX fixes (#31)
* add staging ios app build script
* feat(api): add OpenTelemetry LGTM stack for local observability
Wire OTel traces, metrics, and logs through a collector to Tempo,
Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay,
Grafana provisioning, env templates, and development.sh auto-start.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: expand observability, harden dev tooling, and fix expo staging UX
Add business and LLM Prometheus metrics with Grafana dashboards, alerting,
and a metrics verification script. Wire telemetry through adapters and core
LLM paths, and document the local LGTM workflow.
Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome,
and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge
internal-eval into the main dev script with improved compose handling.
Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs,
show memoir empty state instead of load errors when no chapters exist, and
add jest env setup plus chapter list response normalization.
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: enable Grafana Assistant Cursor plugin
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp
Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Kevin <kevin@brighteng.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 15:12:21 +08:00
|
|
|
|
echo -e "\033[1;33m⚠ internal-eval.sh 已并入 development.sh,正在转发…\033[0m" >&2
|
|
|
|
|
|
|
2026-04-07 17:15:01 +08:00
|
|
|
|
export LIFE_ECHO_WITH_INTERNAL_EVAL=1
|
2026-04-06 13:45:04 +08:00
|
|
|
|
|
2026-04-07 17:15:01 +08:00
|
|
|
|
if [[ "${SKIP_CELERY:-}" == "1" ]]; then
|
|
|
|
|
|
export EVAL_ATTACH_ONLY=1
|
|
|
|
|
|
echo -e "\033[1;33m⚠ SKIP_CELERY=1 已映射为 EVAL_ATTACH_ONLY=1;请确保 :8000 主站与 Celery 已由其他进程提供\033[0m" >&2
|
|
|
|
|
|
fi
|
2026-04-06 13:45:04 +08:00
|
|
|
|
|
2026-04-07 17:15:01 +08:00
|
|
|
|
exec "${ROOT_DIR}/development.sh" "$@"
|