Commit Graph
156 Commits
Author SHA1 Message Date
ClaudeandClaude 4b8a645357 fix(vedastro): one switch, off by default; an official chart replaces the local one only on a matching echo (BUG-2427, #327)
Independent Staging Quality Gate / validate-python (push) Successful in 5m2s
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m44s
Independent Staging Quality Gate / publish (push) Successful in 12m12s
Owner decision 2026-11-26: the product stops using VedAstro.
- scripts/vedastro_switch: VEDASTRO_ENABLED=1 turns it on; default off.
- Adapter, gateway, foreground session, consult gate, orchestrator,
  user entrypoint, REST/MCP/SDK bridges answer "disabled" at once:
  no network, no subprocess, no wait, no cache writes.
- vedastro_priority: a disabled snapshot leaves the local chart as is;
  an official chart replaces it only when every chart/house answer
  echoes the requested time, place and ayanamsa.
- Model input drops VedAstro audit rows, cross-check and must-use layer;
  privacy policy drops the VedAstro data line.
- VEDASTRO_API_KEY optional and unused; env examples, deploy/README,
  AGENTS.md updated. Frozen files untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 23:33:41 +08:00
ClaudeandClaude Opus 5.5 0054781bc5 ops: container memory limits, api init, 65% disk alert, release cleanup (BUG-2428)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m34s
Independent Staging Quality Gate / validate-python (push) Successful in 8m34s
Independent Staging Quality Gate / publish (push) Successful in 3m57s
- postgres 1g + oom_score_adj -500; api 1536m + init; web 768m; caddy 128m
  (BUG-2416 hardening kept; web keeps its own SIGTERM handling)
- disk alert 80% -> 65%, below the 70% backup stop line
- ops-check: container_memory_high at 85% of the container's own limit
- after a verified production deploy: keep newest 5 pre-release recovery
  points (+ baseline) and current/previous app images; dry-run supported

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 23:18:02 +08:00
ClaudeandClaude Opus 5.5 ba14cdf3b6 ops: production config/cert backup, restore drill and capacity note (BUG-2425, BUG-2426)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m28s
Independent Staging Quality Gate / validate-python (push) Successful in 8m41s
Independent Staging Quality Gate / publish (push) Canceled after 1m32s
- deploy/backup-production-config.sh: env files, .monitor.env, state records,
  compose/Caddyfile, Caddy data+config volumes and host units bundled, encrypted
  to the owner's OpenPGP public key only, kept locally (14) and uploaded to OSS
  production/config/ with the existing write-only key; --dry-run lists only.
- systemd unit + timer (05:05 Asia/Shanghai) and a root installer.
- sync-production-tree.sh no longer deletes /.monitor.env on every deploy.
- Restore drill on 83.229.126.99 (isolated temp Postgres, ~12 s, counts match),
  config restore doc, capacity note (#355).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 23:07:07 +08:00
ClaudeandClaude Opus 5.5 ce165ed00c fix(export): fetch the export code when the sheet opens; the click writes the file synchronously and never blocks on the code (BUG-2359)
Independent Staging Quality Gate / validate-python (push) Successful in 7m38s
Independent Staging Quality Gate / validate-frontend (push) Failing after 6m16s
Independent Staging Quality Gate / publish (push) Skipped
Mobile Safari and WeChat drop a download started after an await. The export
sheet now asks for its code on open; the click marks and downloads at once,
then confirms the code in the background (confirm_report_export: edition,
scope, exported_at). With no code at hand the file is exported unmarked, no
error toast, and the server logs one [ops-signal] export_unmarked line
(monitor threshold 3 per window, Feishu wording added).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-26 13:14:49 +08:00
ClaudeandClaude Opus 5.5 8c5107de10 feat(ops): alert on bulk-scraping behaviour — bulk exports, templated questions across profiles, bulk profile creation (BUG-2417)
Independent Staging Quality Gate / validate-frontend (push) Canceled after 0s
Independent Staging Quality Gate / publish (push) Canceled after 0s
Independent Staging Quality Gate / validate-python (push) Canceled after 2m27s
Alert only, never blocks or slows a user. Counts reuse BUG-2402's
request_rate_counters (digests only, no question text); one [ops-signal]
line per account and window with a UUID-shaped HMAC account reference that
the admin customers search resolves. Monitor maps the three codes
(threshold 1, Chinese labels). Defaults: exports >20/h or >60/day,
same question on >5 profiles/h, >10 new profiles/h; env-configurable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-26 12:57:49 +08:00
ClaudeandClaude Opus 5.5 61bb21c7f3 ops(security): CPU, miner and pool-connection alerts; api/web unprivileged read-only containers; caddy pinned; read-only host audit (BUG-2416, #360)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m34s
Independent Staging Quality Gate / validate-python (push) Successful in 8m14s
Independent Staging Quality Gate / publish (push) Successful in 3m31s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 12:39:53 +08:00
ClaudeandClaude Opus 5.5 dcec206060 ci(release): branch release flow — next, release/x.y, hotfix, main; 封板 and 发版 workflows (BUG-2415)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m34s
Independent Staging Quality Gate / validate-python (push) Successful in 8m3s
Independent Staging Quality Gate / publish (push) Successful in 3m17s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 11:53:14 +08:00
ClaudeandClaude Opus 5.5 7e1c392246 fix(signup): free first question screened per device, address and inbox; per-email code cap; risk-only Turnstile; chat counters in the database (BUG-2402, #353)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 00:42:20 +08:00
ClaudeandClaude Opus 5.5 f120a8173f ci: disk reclaim tolerates a concurrent job deleting a snapshot (BUG-2391 follow-up)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 00:42:20 +08:00
ClaudeandClaude Opus 5.5 80c2d36fd2 ci: run the full release checks once, automatically after each staging deploy (BUG-2390)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 20:29:05 +08:00
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