146 Commits
Author SHA1 Message Date
ClaudeandClaude Opus 5.5 5dfa71bc9a fix(reports): deploys hand running report jobs back and retries resume finished sections (BUG-2352, #347)
Independent Staging Quality Gate / validate-python (push) Canceled after 0s
Independent Staging Quality Gate / validate-frontend (push) Canceled after 0s
Independent Staging Quality Gate / publish (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 11:22:14 +08:00
ClaudeandClaude Opus 5.5 d4b61ff998 fix(web): pages left in front learn about a new deploy on focus and chat send (BUG-2350, #359)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 11:22:14 +08:00
ClaudeandClaude Opus 5.5 caf3af6b7e fix(monitor): alerts by Feishu and email, host checks, OTP retry, off-host probe (BUG-2348)
- notify-feishu.sh: add a Resend email channel (key read from .env.production
  via a header file, never argv/stdout); both channels when configured, one
  acceptance counts; fixed Chinese labels on every alert line.
- classify_error_log.py: per-code thresholds for low-volume signals, the
  [ops-signal] marker, api access-log 429/5xx counted without query strings.
- ops-check.sh: container restarts/OOM, host memory, report queue wait, new
  feedback count (no content).
- OTP sender: retry network/429/5xx once with the same idempotency key; final
  failure logs otp_send_failed (no address).
- install-production-monitor.sh: idempotent cron install + --test-alert.
- monitor-public-health.yml: off-host probe every 5 minutes on the runner.
- Tests: tests/test_monitor_alerts_2348.py (on the quick list), OTP sender and
  ops-signal tests. Issues #350, #354.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 11:03:45 +08:00
ClaudeandClaude Opus 5.5 049614ffa0 fix(model): the admin's fallback model answers when the default provider fails (BUG-2347, #352)
Independent Staging Quality Gate / validate-python (push) Successful in 6m38s
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m48s
Independent Staging Quality Gate / publish (push) Successful in 7m54s
- A provider-side failure (401/403/408/409/429/5xx, timeout, network) before any
  answer content reached the user moves the call once to the published fallback
  model; a stream is never switched after content has streamed.
- Settlement prices the tokens with the model that answered (per-request /
  per-job scope); credits charged are unchanged.
- 功能开关「暂停聊天」 (ops.chat_paused): an emergency stop, answered before any
  credit is reserved; a failed read keeps chat open.
- Daily model spend alert from usage_ledger (MODEL_DAILY_SPEND_ALERT_USD, default
  $30), throttled, forwarded by the monitor on first occurrence; per-user spend
  view on /admin/usage.

Checks: tsc clean; eslint 0 errors; new tests model-fallback-2347 (11) and
model-spend-alert-2347 (5) pass; digest Python tests pass; Python quick gate
passed; full frontend suite 5334 tests, 28 failures, all the known
environment set (PostgreSQL, compose, YAML, staging sync, swisseph).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 10:58:47 +08:00
ClaudeandClaude Opus 5.5 63c28d0f13 fix(db): one connection budget for every web pool; max_connections 60 (BUG-2345, #349)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m10s
Independent Staging Quality Gate / validate-python (push) Successful in 7m44s
Independent Staging Quality Gate / publish (push) Successful in 3m32s
Four pools at max 10 each (40) ran against max_connections=30. Pool maxima now
come from lib/db/pool-limits.ts (identity 6, app 12, service 8, admin 3,
health 1 = 30, env-tunable 1-20) with a reserve of 10 for backup, migration,
psql and the second web container during a deploy. Idle connections close
after 10 s. Postgres max_connections 30 -> 60. A test pins the budget against
the compose file and forbids hard-coded pool maxima.

Production picks this up on the next deploy: run-production-deploy.sh runs
`compose up -d --wait postgres`, which recreates the Postgres container once
(a few seconds; data stays on the volume).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 10:25:23 +08:00
ClaudeandClaude Opus 5.5 cbbf62217c ops(production): the production host is the Hong Kong VPS 83.229.126.99
Independent Staging Quality Gate / validate-python (push) Successful in 9m56s
Independent Staging Quality Gate / validate-frontend (push) Successful in 13m45s
Independent Staging Quality Gate / publish (push) Successful in 3m12s
Owner bought and approved the new host on 2026-11-22 (mainland latency ~44 ms
vs ~300 ms on 118.194.235.34). The four production workflows pin the host, so
the release SHA must carry the new value. The runbook records the fresh-start
sequence (no Supabase import).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-22 14:19:17 +08:00
ClaudeandClaude Opus 5.5 c02b1fc46b fix(build): next build never reuses Turbopack's persistent cache, which served the previous globals.css (BUG-2136)
Next 16.3.1 turns on turbopackFileSystemCacheForBuild by default and keeps it in
.next/cache/turbopack, inside the image build's BuildKit cache mount. Reproduced
locally: a cold build at e8e358213, then a build at 0bf3210c8 reusing only
.next/cache, lost the four .birth-place-coordinate* classes exactly as CI did.
With the cache off the same rebuild carries every class; Turbopack compile time
is 21.0 s either way. Recurrence of BUG-2069, whose cache-id rename only reset
the cache once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-21 23:59:55 +08:00
ClaudeandClaude Opus 5.5 10639255c1 ops: daily off-site copy of the production database to Alibaba Cloud OSS (BUG-2131)
Independent Staging Quality Gate / validate-python (push) Successful in 10m46s
Independent Staging Quality Gate / validate-frontend (push) Successful in 14m44s
Independent Staging Quality Gate / publish (push) Successful in 3m55s
A host-side systemd timer (04:45 Asia/Shanghai) makes sure a restore-verified
daily backup exists (running the existing recovery script in daily mode when the
Gitea workflow did not), then uploads it with an OSS V1 signature computed in
the script, Content-MD5 and an ETag check. Secrets never reach argv or output.
Failures write a marker and alert through the existing Feishu monitor.
Not installed on the production host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-21 19:20:27 +08:00
ClaudeandClaude Fable 5.2 2fa61ecd40 fix(deploy): the web image fails to build when it carries an older globals.css; fresh Next build cache (BUG-2069)
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m34s
Independent Staging Quality Gate / validate-python (push) Successful in 7m12s
Independent Staging Quality Gate / publish (push) Canceled after 0s
The e4b25c26 staging image shipped new settings markup with the previous
build's global style sheet. The image build now uses a new cache id and
checks, after next build, that every class opening a rule in globals.css
is present in the built style sheets.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-20 12:00:13 +08:00
ClaudeandClaude Fable 5.2 588be98cba ci: the release gate no longer requires operator details and reviewed legal text for the invite-only beta (BUG-1991)
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m49s
Independent Staging Quality Gate / validate-python (push) Successful in 7m19s
Independent Staging Quality Gate / publish (push) Successful in 3m23s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-18 21:33:05 +08:00
ClaudeandClaude Fable 5.2 85e762eec2 feat: commit the Raman house-text data file so it ships with the API image (BUG-1926)
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m30s
Independent Staging Quality Gate / validate-python (push) Successful in 6m45s
Independent Staging Quality Gate / publish (push) Successful in 3m33s
Owner decision 2026-11-16: the extracted passages live in
references/book_corpus/texts/ instead of a host-provisioned file. The
loader and extractor default to that path; the full transcriptions stay
local-only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-16 11:56:55 +08:00
ClaudeandClaude Fable 5.2 2263c70328 feat: evidence card carries Raman house-lord and occupant passages (BUG-1926)
Owner decision 2026-11-16: deliver B. V. Raman's "How to Judge a Horoscope"
passages. Whether the verbatim text may live in git is not decided, so the text
stays in a local data file and its location is a deployment choice.

- scripts/research/extract_raman_htjh_house_texts.py reads the two book
  transcriptions from a given directory and writes one data file (default
  references/book_corpus/local/, gitignored): per house, the passage for its
  lord in each of the twelve houses and for each of the nine planets occupying
  it, with volume, heading, page, source line range and the text as transcribed.
  What cannot be located is left out and listed in the coverage table.
- scripts/book_citations/raman_house_texts.py loads that file from
  JYOTISH_RAMAN_HOUSE_TEXTS_PATH (same default) and builds the native layer
  `classical_texts`: rows only for this chart's own placements, each capped at
  600 characters at a sentence end. Without the file the layer reports
  not_available_yet with the reason and nothing else changes.
- The card lists, per domain section, the rows of that domain's houses whose
  placement equals what the card already shows; a passage shared by two domains
  is written once. Each row carries its source and a fixed reference-only status.
- P-10 gains one sentence on how to use the passages; the facts catalog lists
  them with the book catalog as source; product_runtime_contract.md section R
  records the decision and the manual provisioning step (also deploy/README.md).

No book text is committed; tests use invented passages.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-16 11:43:02 +08:00
ClaudeandClaude Opus 5.5 a84ebff6e4 ci: run the Python and frontend gates in parallel and keep install caches on the runner
Independent Staging Quality Gate / validate-python (push) Successful in 17m4s
Independent Staging Quality Gate / validate-frontend (push) Successful in 23m50s
Independent Staging Quality Gate / publish (push) Successful in 5m38s
- Split `validate` into `validate-python` and `validate-frontend`; publish
  needs both. Runner capacity is >= 2 (publish and migrate already overlap).
- deploy/ci-python-venv.sh: venv kept under /root/.cache keyed by Python
  version, ISO week, pins and requirements; persistent pip cache. A fresh
  venv per run spent ~3 min re-downloading the same wheels.
- npm ci gets a persistent download cache and --prefer-offline (every one
  of 1,010 packages was a cache miss).
- publish builds and pushes the API and web images concurrently; the web
  Dockerfile mounts BuildKit caches for npm and .next/cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-03 16:59:57 +08:00
ClaudeandClaude Opus 5.5 2f6d47c74e feat(release): the release gate refuses placeholder legal details (#119 item 9)
The manual release quality gate now runs the legal-consent test with
JYOTISHA_REQUIRE_LEGAL_ENTITY=1 right after its frontend install, so a
production release fails while legal-entity.ts holds 「待填写」 placeholders
or the terms / privacy text is still marked draft. It was a manual step in
deploy/README.md until now. Approved by the product owner 2026-11-01.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-01 23:24:40 +08:00
ClaudeandClaude Opus 5.5 618d074c94 feat(deploy): security response headers on every Caddy site (#119 item 33)
A shared (security_headers) snippet, imported first in every site block of the
public, staging and production Caddyfiles: HSTS (one year, no
includeSubDomains), nosniff, strict-origin-when-cross-origin, framing refused
(X-Frame-Options DENY + frame-ancestors 'none'), camera/microphone/
geolocation/payment off, and the Server / X-Powered-By headers dropped.
Approved by the product owner 2026-11-01.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-01 23:23:58 +08:00
ClaudeandClaude Opus 5.5 0f1c179eb6 fix(deploy): web image installs packages from npmmirror like the gate (BUG-1503)
Independent Staging Quality Gate / validate (push) Successful in 16m19s
Independent Staging Quality Gate / publish (push) Successful in 6m6s
Publish job 11273 and its rerun 11284 timed out fetching from
registry.npmjs.org (zwitch, then zustand) while every validate check passed.
The gate's own install already uses registry.npmmirror.com; the image's npm ci
now does too. The lock file pins versions and integrity hashes, so the
installed packages are unchanged. Approved by the product owner 2026-11-01.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-01 22:39:53 +08:00
ClaudeandClaude Opus 5.5 72854ba9f3 feat(learn): 印度占星知识 /learn with Markdown articles (issue #157)
Public, statically generated knowledge pages from the approved prototype:
/learn lists 全部 plus seven columns with question titles and one-line
summaries (a sideways row on phones); /learn/<column>/<slug> renders the
question, the one-line answer, reviewer and date (or 「初稿 · 待占星师审校」),
the Markdown body, 「我们采用的口径」, 「在 Jyotisha 里看」, 「接着读」 and
参考出处.

Articles are frontend/content/learn/*.md with the frontmatter template from
the issue, read by a small parser and validated with zod; a bad file fails
the tests and next build with the file name and a reason. Drafts are
readable but noindex and stay out of sitemap.xml. robots.txt opens only
production. The web image copies frontend/content before the build.

Ships the one example article 「生时校正能做到多准?」 as an unsigned draft.
The chart page's ascendant line links it while the ascendant can still
change, through a 盘面要素 → 文章 table that only links existing articles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-01 14:28:44 +08:00
jesse-uxandGrok (agent loop) c899e36509 把独立年度方法参考算进结果指纹,标准版不再白算这一章。
跑了修复单点名的测试、两次真算 PyJHora,以及 200 张英文扫描。

Co-Authored-By: Grok (agent loop)
2026-10-23 23:55:06 +08:00
jesse-uxandGrok (agent loop) c644881a30 feat(report): 完整数据版末尾增加独立年度方法参考
PyJHora 只在子进程里计算请求年及后两年。对话、校正和其余章节保持不导入时的结果。结果指纹不算这一章。

Windows 自测:隐私标记、导入扫描、结果指纹和 S7 退出码 0。阅读页、英文和年运章在此之前已通过。虚构盘 0 中英一起最高 59 秒。

Co-Authored-By: Grok (agent loop)
2026-10-23 20:13:28 +08:00
jesse-uxandGrok (agent loop) 9455fbfc4f fix(release): keep daily backups from stalling when the disk fills
Expired daily files are pruned before a new backup, a verify older than 36 hours raises an alert, and the host monitors call sudo with the production env file. The Linux 0600 check is on the staging quick list.

Co-Authored-By: Grok (agent loop)
2026-10-15 17:24:26 +08:00
jesse-uxandGrok (agent loop) 14897f0bf3 merge origin/staging into the beta safety net branch
Safety-net records move to BUG-1358 through BUG-1361 because staging already uses BUG-1355 through BUG-1357 for capacity.

Co-Authored-By: Grok (agent loop)
2026-10-15 17:13:57 +08:00
jesse-uxandGrok (agent loop) 5c0d895391 fix(release): daily backups no longer replace the recovery point
Product chose to keep the scheduled backup, but the current recovery point must stay the one created by hand. Daily runs still encrypt and restore-verify, then record a separate latest-backup note.

Co-Authored-By: Grok (agent loop)
2026-10-15 16:16:48 +08:00
jesse-uxandGrok (agent loop) a54f75e5e3 fix(capacity): limit each user and queue heavy compute briefly.
Consult, rectification turns, and report generation stop before a credit reservation when the product caps are hit. A full heavy-compute gate waits up to 8 seconds, and one consultation retries that 429 inside the same request.

Co-Authored-By: Grok (agent loop)
2026-10-15 13:33:06 +08:00
jesse-uxandGrok (agent loop) 53d8df257d 给内测补上每日加密备份、宕机告警和日志上限。
主机安装和一次恢复演练留给产品。页面没有变化。

Co-Authored-By: Grok (agent loop)
2026-10-15 12:58:34 +08:00
jesse-uxandGrok (agent loop) 09906cdccc fix(release): keep owners and grants in production recovery points
Co-Authored-By: Grok (agent loop)
2026-10-14 21:01:52 +08:00
jesse-uxandGrok (agent loop) 32aa46b573 fix(release): close the first review of the production release path
Host rehearsal no longer needs Node on the production machine, and a failed cleanup now stops with the rehearsal database name. Docs-only staging heads no longer block rollback. Tests no longer hardcode Windows paths, and a trailing slash on the production site still refuses the test code.

pytest 12 passed; tsc exit 0; lint 0 errors; identity tests 9 passed, 0 cancelled. test:db was not run.

Co-Authored-By: Grok (agent loop)
2026-10-14 16:37:58 +08:00
jesse-uxandGrok (agent loop) 00e6efdbfa 发布可以跟上只多了文档的测试环境头
四个生产工作流改用同一条发布修订:最近一次代码门禁成功的提交可以发布,后面只多文档不再挡住。生产环境拒绝测试验证码。63 个还没上生产的迁移写了分级、演练脚本和首发步骤。没有点任何生产按钮。

自测:发布修订 7 通过,演练安全 3 通过,tsc 0 错,lint 0 error。本机空库演练在服务角色读人物表处按设计停止(退出码 4,其他人物已确认行数为 0)。

Co-Authored-By: Grok (agent loop)
2026-10-14 10:24:40 +08:00
jesse-uxandGrok (agent loop) 4c3485bc23 服务器长跑不再堆积取消监听,数据库少走几趟。
报告工人的等待到点就摘掉取消监听。本地数据库缓存表结构,并把设置身份合成一条语句,对照通过后默认打开,写成 off 仍走原来的语句。交付、重算和限流的内存表会过期。登录读缓存默认关闭,要开再设 IDENTITY_SESSION_COOKIE_CACHE=on。

自测:tsc 通过,lint 0 error,点名测试 134 通过,test:db 开关关和开都只有已知的 13 条失败,往返 49 降到 32。

Co-Authored-By: Grok (agent loop)
2026-10-14 03:32:39 +08:00
Jesse_ChenandClaude Opus 5.5 8f58eccecf feat(legal): terms and privacy pages, login consent recorded per version, re-consent gate (draft text, placeholders)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
2026-09-30 09:42:11 +08:00
jesse-ux a06829b33e fix(deploy): prune unused staging images before digest pull
Independent Staging Quality Gate / validate (push) Successful in 16m51s
Independent Staging Quality Gate / publish (push) Successful in 6m45s
BUG-994: migrate run 2841 failed writing containerd ingest because the staging host had no space left after accumulated exact-SHA images.
2026-09-21 22:59:07 +08:00
jesse-ux 0c3c9d6b42 fix(deploy): keep BuildKit cache and use Huawei mirrors for API images
Independent Staging Quality Gate / validate (push) Successful in 10m36s
Independent Staging Quality Gate / publish (push) Successful in 7m7s
Gitea run 2828 validated, then publish hit the 60-minute deadline while
Aliyun apt/pip crawled at about 22 kB/s after a 72h cache prune on a
runner with 677 GiB free. Skip BuildKit prune when disk is above the
minimum, split API apt/pip layers, and point apt/pypi at Huawei Cloud.
2026-09-21 10:56:38 +08:00
jesse-ux 9ccb65b71f fix(web): 次级页稳定外壳与缓存预取,跨部署导航自愈(BUG-966/967) 2026-09-18 18:45:48 +08:00
Jesse_ChenandClaude Opus 5 10afdcddeb docs(tasks): 校正标题修补迁移的进度记录与 Bug 历史回填
Independent Staging Quality Gate / validate (push) Canceled after 38s
Independent Staging Quality Gate / publish (push) Canceled after 0s
- PROGRESS-rectification-title-repair-migration-20260916.md:前提复核、
  逐字一致的复核命令、幂等两层的说明、基线比对与环境缺口。
- BUG_HISTORY:BUG-699 / BUG-704 的「修复」补记改由迁移承担,「验证」
  的欠账改成待产品在 staging 应用后从 NOTICE 回填。不新增编号。
- BLOCKED.md:BLK-002 无 Docker / 无本地 PostgreSQL,test:db 未跑、
  db:migrate:check 缺 SCHEMA_DATABASE_URL,附已实跑的替代证据。
- deploy/README.md:一次性数据修补走同一个 Migrate Staging Database
  按钮,行数看日志里的 notice 行。
- docs/tasks/README.md:该单改记待验收。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-16 01:39:03 +00:00
jesse-ux 6b3248bf53 fix(vedastro): pin SDK at install and cap free-tier wait
Independent Staging Quality Gate / validate (push) Successful in 9m36s
Independent Staging Quality Gate / publish (push) Successful in 18m18s
Image build patches vedastro.check_for_update to a no-op after pip install so import cannot hit pypi or upgrade the pin. Free-tier queue waits are capped to VEDASTRO_TIMEOUT_SECONDS and fail fast as free_tier_rate_limited. Gateway status exposes runtime mode as booleans without secrets. BUG-719 resolved; BUG-720 stays investigating until production env is filled in.
2026-09-16 00:25:15 +08:00
jesse-ux 69ede4367f fix(ci): migrate staging automatically before deploy
Independent Staging Quality Gate / validate (push) Successful in 10m6s
Independent Staging Quality Gate / publish (push) Successful in 4m18s
Quality gate now dispatches Migrate Staging Database, waits for success, then dispatches Deploy staging. Automatic migrate attests the in-progress gate run so the two jobs cannot deadlock. Manual migrate is unchanged. Staging schema changes must stay backward-compatible with the currently deployed app.
2026-09-15 23:36:09 +08:00
jesse-ux 1a73f64ecd fix(ci): let staging migration resolve the latest gated SHA
Independent Staging Quality Gate / validate (push) Successful in 9m38s
Independent Staging Quality Gate / publish (push) Successful in 2m7s
Leave Migrate Staging Database deploy_sha empty (or type latest) to use the newest successful backend-quality-gate push. Filled 40-hex still takes the original path. Production workflows stay required.
2026-09-15 23:19:44 +08:00
jesse-ux 25851dd338 feat(qizheng): vendor stem-branch and expose three read-only chart APIs
Add Apache-2.0 @4n6h4x0r/stem-branch 0.8.0, a seven-governors adapter,
and POST /api/qizheng, /api/western, /api/ephemeris_events.

BUG-700 remains blocked (do not call --pillars). BUG-701 and BUG-702 are
resolved. BUG-703 is investigating (panchanga Lahiri). Skill is not bumped.
2026-09-15 16:10:21 +08:00
Jesse_ChenandCursor e87c58d6e4 fix(report): persist longform appendix on self-hosted upsert (BUG-576)
Engine calls already returned markdown; the worker failed because local postgres upsert required onConflict and the appendix write omitted it.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 14:19:21 +08:00
Jesse_ChenandCursor b466a6fc8c fix(report): stop listing reports via PostgREST JSON paths (BUG-574)
Staging PostgREST rejects the executiveSummary JSON-path alias, so GET /api/reports 500s. Persist a plain card_summary column from the Markdown excerpt instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 11:08:00 +08:00
Jesse_ChenandCursor 13bde020fb fix(staging): let migrate accept docs-only-ahead like deploy
Independent Staging Quality Gate / validate (push) Successful in 8m57s
Independent Staging Quality Gate / publish (push) Successful in 1m49s
Docs-only staging HEAD blocked Migrate Staging Database even when an ancestor already had a successful exact-SHA gate, so pending SQL could not be applied.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 10:29:19 +08:00
Jesse_ChenandClaude Fable 5.1 f7428909d2 ci(gate): drop the removed GitHub workflow directory from the gated path list
Independent Staging Quality Gate / validate (push) Successful in 21m36s
Independent Staging Quality Gate / publish (push) Successful in 1m56s
The mirror workflows were deleted in the same release, so the gated
path list, both trigger filters and the contract test no longer name
.github/workflows/**.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VawU7Xfd5jS9wUEXz1XYmS
2026-09-02 04:02:04 +00:00
Jesse_ChenandClaude Fable 5.1 534f5e617c ci(gate): skip the staging gate for docs-only pushes without releasing stale code
Twenty-four of the last sixty staging pushes were pure documentation, yet each
one ran (and cancelled) the full gate and image publish. Introduce
deploy/gated-paths.txt as the single source of truth for what must rerun the
gate: every Dockerfile COPY source, the Python package inputs, the workflow and
build-context files, and the repository files frontend/tests read at gate time.
Both triggers of backend-quality-gate.yml now carry that exact list; pushes
that touch none of it neither run the gate nor cancel a running code gate.

Because staging head may then legitimately sit ahead of the last tested SHA,
add deploy/is-docs-only-range.sh: it proves <base> is an ancestor of <head>
and that no changed path matches a gated glob, from local history when it is
available and otherwise from the Gitea compare API (per-commit `files`, parent
walk for ancestry, total_commits cross-checked). The publish dispatch and the
deploy-staging head checks accept an advanced head only when that script
succeeds; diverged, older, or code-bearing heads are still refused. In
deploy-staging the check runs after the gate-attested controller bundle is
extracted so only the tested checker and path list are ever executed; the
manual rollback branch is unchanged.

AGENTS.md §6.3/§6.4 describe the new contract: `.deployment.gitCommit` must
equal the latest staging commit that touched a gated path, not staging head.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VawU7Xfd5jS9wUEXz1XYmS
2026-09-02 04:02:04 +00:00
Jesse_ChenandClaude Fable 5.1 75e288b0c6 ci(gate): keep BuildKit cache unless the runner is actually short on disk
deploy/reclaim-runner-disk.sh ran `docker builder prune --force --all` at the
start of every gate job, so each publish rebuilt the Dockerfile `npm ci` layer
from scratch behind the registry mirror (7-minute image builds became 47).
Reclaim build cache in tiers instead: prune entries unused for 72h, re-measure
free space, and escalate to `--all` only while still below MINIMUM_FREE_GIB.
The final threshold check and the "only unheld resources" rules are unchanged.

Contract test asserts the aged prune runs first and that `--all` is only
reachable inside the re-measured conditional.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VawU7Xfd5jS9wUEXz1XYmS
2026-09-02 04:02:04 +00:00
Jesse_ChenandClaude Fable 5.1 fb69e43c90 ci: remove GitHub mirror workflows and dead Gitea manual workflows
Gitea (git.copse.top) is the only CI/CD control plane; GitHub is a
read-only mirror whose Actions are being disabled in repository settings.

- Delete all 11 `.github/workflows/*.yml` (stale copies of the old design).
- Delete unused Gitea manual workflows `ci.yml`, `test.yml`,
  `publish-pypi.yml`, `apply-supabase-profile-migrations.yml`
  (0-1 historical runs, no remaining target).
- Fold the full `python -m pytest` tree and `tests/run_all.py` into
  `release-quality-gate.yml`, which previously only ran the curated
  release profile; update the `run_quality_gate.py` comment accordingly.
- Port `reset-staging-account.yml` to Gitea: `runs-on: xiaoxin`, bounded
  exact-SHA checkout, `refs/heads/staging` only, `staging-mutation`
  concurrency, same email/confirmation/host/port/user/path assertions.
- Repoint frontend workflow tests at `.gitea/workflows/`, drop the
  GitHub-only assertions, add coverage for the new reset workflow, and
  remove `tests/test_supabase_profile_migration_workflow.py`.
- Update AGENTS.md §6.8, README.md, and deploy/README.md to the current
  production/mirror facts and document the staging account reset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VawU7Xfd5jS9wUEXz1XYmS
2026-09-02 04:02:04 +00:00
Jesse_ChenandCursor 124d3990b2 fix(api): persist scratch/local and bound heavy compute concurrency
Independent Staging Quality Gate / validate (push) Failing after 12m34s
Independent Staging Quality Gate / publish (push) Has been skipped
Keep async job and chart-cache files across API recreates, freeze jyotish_api_server.py growth, and fail fast with 429 when rectification or high-rigor compute is saturated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 06:12:23 +08:00
Jesse_ChenandCursor 50e1a4aca5 fix(web): reload stale clients instead of spinning after a release
Homepage bootstrap never escaped the loading shell when a new web image changed chunk hashes. Stamp deploymentId, stop caching chat HTML, and hard-reload failed chunk loads once.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 10:29:43 +08:00
Jesse_ChenandCursor 9c4b64c952 fix(ci): pull API base image from Huawei SWR instead of DaoCloud
Staging publish failed resolving python:3.12-slim through m.daocloud.io; the web image already uses the reachable SWR docker.io/library path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 22:44:20 +08:00
Jesse_ChenandCursor d35828e76d fix(consult): read the live skill tree instead of a hash-pinned snapshot
Independent Staging Quality Gate / validate (push) Successful in 9m18s
Independent Staging Quality Gate / publish (push) Has been cancelled
Manual SKILL.md updates were blocked by registry sha256 and a byte-equal versions/ gate. Consult now loads the operator-maintained tree; rectification and personal-report stay hashed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 10:25:55 +08:00
Jesse_ChenandCursor 37e62094d7 fix(ci): cap postgres fixtures and reclaim leftover compose networks
Independent Staging Quality Gate / validate (push) Successful in 10m28s
Independent Staging Quality Gate / publish (push) Successful in 9m59s
xiaoxin's 20-core npm test opened one Docker network per database file and exhausted default address pools. Limit concurrent fixtures and remove unused jyotisha-postgres networks before the gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 19:30:13 +08:00
Jesse_ChenandCursor 5687182980 ci(runner): move every Gitea job to xiaoxin and let the gate reclaim its own disk
Independent Staging Quality Gate / validate (push) Successful in 9m24s
Independent Staging Quality Gate / publish (push) Successful in 7m24s
质量门跑在以 :host 模式注册的跳板机上,与无关生产服务共用文件系统,累积的按
SHA 打标镜像把根分区占满,PostgreSQL fixture 起不来,staging 连续 5 个提交发不
出去。把 12 个 job 统一迁到 xiaoxin,并在开跑前回收磁盘、余量不足时直接报磁盘
原因而不是让 23 个数据库测试代为失败。

当年据以搬迁的「xiaoxin 缺少 Docker Compose v2」是误诊:真实原因是用户级插件
目录里一个零字节 docker-compose 遮蔽了系统插件。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 10:12:55 +08:00