222 Commits
Author SHA1 Message Date
ClaudeandClaude Opus 5.5 90fcbe99b6 feat(admin): BUG-2436 「内测群文案」 card in the release-notes editor
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
Same fields as the in-app pop-up, fixed template (no model): opening line,
title, items numbered 1..n in 新功能 → 改进 → 修复 order, closing line, blank
lines between, markdown stripped for WeChat. 复制 via navigator.clipboard,
selects the text on failure, results by toast. Opening/closing lines are
editable and kept server-side in a single-row admin setting
(20261127010000_release_note_group_text.sql: admin_runtime select policy +
grant, audited write function under content.release_notes.write).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp3RzgZVEpT1PXxkwHj
2026-11-27 14:21:24 +08:00
ClaudeandClaude Opus 5.5 7cc4acbf54 fix(reports): a second report waits in line instead of being refused; one running report per person (BUG-2418)
Independent Staging Quality Gate / validate-frontend (push) Failing after 5m0s
Independent Staging Quality Gate / validate-python (push) Failing after 8m13s
Independent Staging Quality Gate / publish (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 15:18:31 +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 57960b081f feat(export): exported reports carry an invisible export code; admin 导出溯源 traces it to the account (BUG-2359)
Owner 2026-11-26: a re-posted export should be traceable to the account that
exported it, invisibly. Before writing the .md file, the export sheet asks
POST /api/report-exports for a random 96-bit code; the server stores (code,
account, report, kind, format, edition, scope) in a new additive table
report_exports through a security-definer function (own reports only, 500 a
day). The code is written twice, independently: zero-width marks after the
heading markers of the title and up to three section headings (never in a
number, date, table, fence or the reading-basis part), and a whitespace-only
blank line after the title. The rendered page and visible text are unchanged.
The admin page 导出溯源 reads codes from pasted text or a chosen file in the
browser and looks them up (admin.customers.read; admin_runtime policy).
Privacy policy gains one line next to the BUG-2402 one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-26 13:03:09 +08:00
ClaudeandClaude Opus 5.5 b67def1a8f feat(admin): 数据统计 page with first-party visit stats, sign-up attribution and campaign links (BUG-2408)
Independent Staging Quality Gate / validate-frontend (push) Failing after 4m46s
Independent Staging Quality Gate / validate-python (push) Failing after 7m59s
Independent Staging Quality Gate / publish (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-26 06:59:48 +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 a7b6645314 feat(admin): add credits to one user from the customer list, audited and idempotent (BUG-2396)
Independent Staging Quality Gate / validate-python (push) Successful in 9m19s
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m22s
Independent Staging Quality Gate / publish (push) Successful in 4m3s
Owner 2026-11-25: beta testers who report bugs get credits. A new additive
migration allows the ledger type admin_grant and adds admin_grant_credits
(billing.adjustments.write, verified actor, 1-10000 credits, reason required,
one ledger row + one audit row, idempotent by request id). The customer list
gets a 加积分 action showing the new balance; the user's ledger reads 赠送点数.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp3RzgZVEpT1PXxkwHj
2026-11-25 22:34:04 +08:00
ClaudeandClaude Opus 5.5 ac720314f0 fix(admin): granting an admin role also sets the identity admin role (BUG-2360)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m4s
Independent Staging Quality Gate / validate-python (push) Successful in 7m35s
Independent Staging Quality Gate / publish (push) Successful in 5m14s
Admin mutations check identity.users.role through
admin_verified_actor_email, but the console only wrote the RBAC tables,
so a new Owner could read every admin page and got 403 on creating codes.
A trigger now keeps identity.users.role in step with admin_users /
admin_user_roles in the same transaction (grant on role insert; remove
only when the admin user is revoked or deleted, so owner recovery still
finds identity admins), plus a one-time backfill that logs a count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-25 12:25:32 +08:00
ClaudeandClaude Opus 5.5 df16a108db fix(reports): a busy compute service no longer spends report attempts (BUG-2351, #346)
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 39e0ef8af2 feat(rectification): 生时纠正 marked 「随缘版」, every step recorded (adopted or not) in chart_choice_steps for later checking, the stale 「开头会说明是你选的」 line removed, privacy policy says so (BUG-2256)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
2026-11-23 15:36:44 +08:00
ClaudeandClaude Opus 5.5 ebe22533c8 fix(codes): a single code reused by its own redeemer still counts as a failed attempt; the legacy-code test asserts the balance after redemption
Gate 8375: database-redeem-security expected the old attempt count, and
database-redeem-code-kinds-330 assumed a zero starting balance. The migration
has not run anywhere yet, so it is edited in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-22 18:04:31 +08:00
ClaudeandClaude Opus 5.5 f343a4ea1c fix(codes): the old redeem_code entry point keeps already_redeemed for a reused single code (#330)
Independent Staging Quality Gate / validate-python (push) Failing after 9m10s
Independent Staging Quality Gate / validate-frontend (push) Failing after 11m54s
Independent Staging Quality Gate / publish (push) Skipped
redeem_code_v2 reports a reused single code by the same user as
already_redeemed_by_you; the legacy wrapper maps it back so the existing
redeem-security contract (and its CI database test) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-22 17:13:20 +08:00
ClaudeandClaude Opus 5.5 c095407fae feat(codes): redeem codes come in three kinds, carry their own success celebration, and lose the fixed prefix (#330)
Owner 2026-11-22. 活动码 (campaign): one code, many users, each once, optional
start time, end time and total cap, custom text or random. 个人码: one random
code, one redemption. 批量码: N single codes sharing a batch name, CSV right
after generation. Every code may set a success title, message and one of four
drawn celebrations (default / stars / moon / gift) shown in the approved
success dialog; failures stay toasts.

Random codes drop the JYOTISH- prefix: XXXX-XXXX from an alphabet without
0 O 1 I L, crypto randomness, hashed after normalisation (upper case, no
spaces or dashes). Old JYOTISH codes keep their exact-text hash and still
redeem: redeem_code_v2 tries the exact hash, then the normalised one.

Migration 20261122140000 is additive: kind / batch / campaign / window / cap /
count / success columns, redemption_code_uses(code_id, user_id unique) as the
once-per-user record (kept on account deletion), the ledger's per-code unique
moved to that table, the code-row lock serialising a capped campaign.
redeem_code(text) keeps its signature and result and wraps v2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-22 17:12:54 +08:00
ClaudeandClaude Opus 5.5 7ffd9fd8c6 feat(release-notes): admin writes 「更新说明」; each published version shows once per user; settings lists them (#331)
- Migration 20261122130000_release_notes.sql: release_notes (version, title,
  grouped items, draft/published/withdrawn) and release_note_reads; RLS on,
  no table privilege for app/service roles; users go through service-role
  functions list_release_notes_for_user / mark_release_note_read (a version
  published before the account existed counts as seen); the admin writes
  through audited admin_save_release_note / admin_set_release_note_status
  gated by the new content.release_notes.write (owner, operations,
  content_editor) and reads via an admin_runtime select policy.
- APIs: GET/POST /api/release-notes (signed-in user only) and GET/POST
  /api/admin/release-notes.
- Admin page 更新说明: table + editor drawer with 新功能/修复/改进 lists and a
  live preview; 保存草稿 / 发布 / 撤回.
- User side: 「本次更新」 dialog once per version (知道了 records the read);
  settings gets an 更新说明 pane (phone segmented nav becomes four).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-22 17:12:54 +08:00
ClaudeandClaude Opus 5.5 d461c59618 fix(birth): overseas birth places save everywhere; the chart panel refreshes after onboarding saves; place labels never show the stored dots (BUG-2167)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-22 14:32:09 +08:00
ClaudeandClaude Opus 5.5 161e03ad97 feat(birth): optional precise latitude/longitude under the birth place, with its source shown on the chart page and in the report (BUG-2125)
Independent Staging Quality Gate / validate-python (push) Successful in 10m11s
Independent Staging Quality Gate / validate-frontend (push) Failing after 11m32s
Independent Staging Quality Gate / publish (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-21 23:03:14 +08:00
ClaudeandClaude Opus 5.5 fd995f4f63 feat(admin): each personal report's reading repair record is readable in the admin backend (BUG-2120)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m22s
Independent Staging Quality Gate / validate-python (push) Failing after 7m34s
Independent Staging Quality Gate / publish (push) Skipped
A security-definer function, gated by support.quality.read and granted to
admin_runtime only, returns per report the reading's section statuses and
the transform log without any reading text; the admin page 报告写作记录
lists sections, reasons, repair, salvage and fallback per report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-21 13:02:32 +08:00
ClaudeandClaude Fable 5.2 933ab1d96e feat(annual): questions are asked beside the annual report, about a section or a selected passage (BUG-2085)
Independent Staging Quality Gate / publish (push) Canceled after 0s
Independent Staging Quality Gate / validate-frontend (push) Canceled after 21s
Independent Staging Quality Gate / validate-python (push) Canceled after 26s
An annual report's questions live in a consultation conversation bound to
the report by chat_sessions.report_id (one per report, guarded by a
trigger); no settlement function is redefined. The consult route hands
every turn of such a conversation to the annual handler, which reads only
the saved report, checks dates and placements against what it read, and
settles the fixed sentence and feedback-only turns free. The page has an
entry per written section, a page-level entry in the title bar, passage
selection and the shared panel or bottom sheet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-20 16:53:17 +08:00
ClaudeandClaude Opus 5.5 1a98e29e61 fix(rectification): saving the stated minute keeps its seconds; a seconds-only edit keeps someone else's adopted time (BUG-2074)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m12s
Independent Staging Quality Gate / validate-python (push) Successful in 7m30s
Independent Staging Quality Gate / publish (push) Canceled after 23s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
2026-11-20 13:33:29 +08:00
ClaudeandClaude Fable 5.2 14d5c34b6d feat(birth): the stated birth time takes optional seconds; saving keeps them; someone else's chart may change seconds within its minute (BUG-2067 step 2)
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m45s
Independent Staging Quality Gate / validate-python (push) Successful in 7m9s
Independent Staging Quality Gate / publish (push) Canceled after 2m32s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-20 13:10:23 +08:00
ClaudeandClaude Fable 5.2 21ff01b283 feat(account): top-up admin switch, faster 账户与点数, user credit ledger API, avatar upload server side (BUG-2057)
- 「充值」 is an admin switch (billing.purchase on the 功能开关 page, off until
  turned on, existing permission and audit). Open = switch on and gateway
  usable; the answer rides on the account payload as paymentOpen. Closed: no
  packages request, no purchase tabs, empty product list, orders refused.
- The billing panel chunk is prefetched while idle and when a settings
  section opens; the packages route reads its three inputs in one round; a
  same-height line holds the place while the list is unknown.
- GET /api/account/credit-ledger: the caller's own rows (read as the user,
  filtered by the session id), 20 per page with a cursor, all/in/out/redeem,
  reader names only, free turns hidden, links only to owned reports/sessions.
- Avatar upload server side: PUT/GET/DELETE /api/account/avatar/image, JPEG
  or WebP, square up to 256, 200 KB, type and size read from the bytes,
  rate-limited; stored in profile_avatar_images (owner-only RLS, migration
  20261120100000); account payload carries only avatarImage.version.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-20 10:48:03 +08:00
ClaudeandClaude Opus 5.5 533cc5b0e5 fix: a free smalltalk reply may carry the birth input revision, so it saves again (BUG-2040)
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m32s
Independent Staging Quality Gate / validate-python (push) Successful in 7m2s
Independent Staging Quality Gate / publish (push) Successful in 3m40s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
2026-11-19 20:42:49 +08:00
ClaudeandClaude Opus 5.5 66e4db331e fix: a feedback-only reply in the synastry report chat settles free too (BUG-1986 follow-up)
Independent Staging Quality Gate / validate-frontend (push) Failing after 3m55s
Independent Staging Quality Gate / validate-python (push) Successful in 7m36s
Independent Staging Quality Gate / publish (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
2026-11-18 18:37:22 +08:00
ClaudeandClaude Opus 5.5 a26f990557 feat: readings see only the split-out question and answers written from it; feedback-only turns restate the last reading (BUG-1980)
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m45s
Independent Staging Quality Gate / validate-python (push) Successful in 7m13s
Independent Staging Quality Gate / publish (push) Successful in 3m21s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
2026-11-18 15:10:43 +08:00
ClaudeandClaude Fable 5.2 9fb924931d merge: staging into self-selected scenario (BUG-1958)
Independent Staging Quality Gate / validate-python (pull_request) Successful in 8m11s
Independent Staging Quality Gate / validate-frontend (pull_request) Successful in 9m9s
Independent Staging Quality Gate / publish (pull_request) Skipped
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
2026-11-17 14:46:11 +08:00
ClaudeandClaude Fable 5.2 a7ab0102ae feat: 常用问题 is edited and published in the admin; content_editor role for the astrologer
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m23s
Independent Staging Quality Gate / validate-python (push) Successful in 9m20s
Independent Staging Quality Gate / publish (push) Successful in 4m1s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-17 14:33:43 +08:00
jesse-ux df52b7fe72 test: verify scenario saves and explain chart evidence 2026-11-17 14:08:02 +08:00
jesse-ux ebf6dd4ee0 fix: preserve chosen birth scenarios without confirming the time 2026-11-17 13:59:05 +08:00
ClaudeandClaude Fable 5.2 a814661ddb fix: admin role could not read usage tables behind row-level security (BUG-1935)
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m32s
Independent Staging Quality Gate / validate-python (push) Successful in 6m54s
Independent Staging Quality Gate / publish (push) Successful in 3m8s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-16 16:18:09 +08:00
ClaudeandClaude Fable 5.2 6a5475ad37 feat(db): a model provider can hold several API keys
New table public.model_provider_keys (label, encrypted key, enabled,
optional concurrency limit). The migration copies each provider's
existing key into one row labelled 默认 and keeps
model_providers.encrypted_api_key as a mirror of the first enabled key,
so an older web image, the publish and rollback checks and the
connection-test hash keep working. Writes go through security-definer
functions gated by models.write and audited without key material; the
last enabled key of an enabled provider cannot be disabled or deleted.
admin_runtime gets the SELECT grant together with its SELECT policy
(BUG-147).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
2026-11-16 10:19:03 +08:00
jesse-ux 490a0b61fd Use the ten-section synastry reader contract (#281)
Independent Staging Quality Gate / validate-python (pull_request) Successful in 9m52s
Independent Staging Quality Gate / validate-frontend (pull_request) Failing after 23m41s
Independent Staging Quality Gate / publish (pull_request) Skipped
2026-11-15 14:07:25 +08:00
jesse-ux 6ebf490b06 Allow adaptive adoption sources in the chart choice writer
Independent Staging Quality Gate / validate-python (pull_request) Successful in 6m39s
Independent Staging Quality Gate / validate-frontend (pull_request) Successful in 7m15s
Independent Staging Quality Gate / publish (pull_request) Skipped
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m13s
Independent Staging Quality Gate / validate-python (push) Successful in 6m37s
Independent Staging Quality Gate / publish (push) Successful in 2m43s
2026-11-14 07:12:30 +08:00
jesse-ux ace419b809 Implement multi-round chart choice and seconds adoption
Independent Staging Quality Gate / validate-python (pull_request) Successful in 8m14s
Independent Staging Quality Gate / validate-frontend (pull_request) Successful in 10m28s
Independent Staging Quality Gate / publish (pull_request) Skipped
Refs #238, BUG-1872
2026-11-13 13:00:55 +08:00
ClaudeandClaude Opus 5.5 228df0f7fb feat(ephemeris): personal month calendar on 星历 (BUG-1666, BUG-1667)
Independent Staging Quality Gate / validate-frontend (push) Successful in 5m12s
Independent Staging Quality Gate / validate-python (push) Successful in 5m48s
Independent Staging Quality Gate / publish (push) Successful in 3m27s
The 星历 page gets a month calendar for the chosen person: every day is
吉 / 平 / 凶 with two or three life themes from transits against their own
chart, the selected day opens to its themes and "为什么", and below it
「接下来要留心」, 「这几天」 and 「回看」 (owner, 2026-11-07: A's grid plus
C's lower half).

Engine: scripts/personal_calendar.py joins existing calculators on one
date axis (one call, <0.5 s for 45 days): Panchanga in the subject's own
ayanamsa, Tara / Chandra bala, Moon house from Lagna and Moon,
Ashtakavarga SAV + Moon BAV, transit conjunctions with natal points,
functional benefic / malefic, activity verdicts with native inputs,
ingress / station / combustion / eclipse / Vimshottari AD+PD boundaries,
and a month backdrop (Vimshottari MD/AD/PD, Narayana, Sade Sati / Kantaka,
slow-graha contacts, Jupiter+Saturn double transit). New endpoint
/api/personal_calendar.

BUG-1666: check_activity_muhurta ignored Vishti karana, Vyatipata /
Vaidhriti and an avoided Chandra bala, so a Vishti day could be 大吉.
BUG-1667 (closes BUG-703 / BUG-707): /api/panchanga_range now honours the
requested ayanamsa; the day view asks for the subject's own and drops the
Lahiri note.

Frontend: /api/ephemeris/month (own rate-limit bucket, cached),
/api/ephemeris/checks + migration 20261107010000_ephemeris_day_checks
(answers kept with the birth declaration they were made under). Copy is
life-first with the sky events folded under 为什么; draft wording pending
the astrologer. TASK-ephemeris-page decisions 4/6 and hard lines 3/7/9
superseded per the owner; DESIGN.md §16 updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXozbkyFNqbu8pVEtZ7W
2026-11-07 00:44:37 +08:00
ClaudeandClaude Opus 5.5 3a6f09815d feat(rectification): history, current result first, mini charts, all cards open (BUG-1654)
Every save keeps a record (chart_choice_records via chart_choice_adopt_v3);
the page opens on the current result with its time scale and the history
list, a past record can be adopted again while the birth declaration is
unchanged. Comparison cards are all open with a 60px mini chart per side
following the north/south board setting. Saving shows one toast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXozbkyFNqbu8pVEtZ7W
2026-11-06 15:58:19 +08:00
ClaudeandClaude Opus 5.5 ba6aa2413b fix(rectification): ask for a range only when the profile has none, and save it back (BUG-1649)
Old 0/0 profiles show no range in the form instead of 最早 = 最晚. The page's
range question uses an even 2x2 grid with parallel labels; saving writes the
picked range to the declaration and adopts the minute in one transaction
(chart_choice_adopt_v2). A ±60 min range is compared without narrowing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXozbkyFNqbu8pVEtZ7W
2026-11-06 13:36:32 +08:00
ClaudeandClaude Opus 5.5 97afd1716a feat: chart choice replaces event-scored rectification page
Event scoring was measured at chance level on the 77 Rodden-AA holdout
cases (BUG-1091). The new flow finds the dividing line nearest the reported
time, describes how the flipped divisional charts read on either side, asks
up to five self-assessment questions, and saves the user's own choice
(provenance user_choice) with the domains to read in both versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXozbkyFNqbu8pVEtZ7W
2026-11-06 02:06:17 +08:00
ClaudeandClaude Opus 5.5 3d7efeafc1 fix(reports): typed lane claim is its own function, so the original claim is never overloaded
Independent Staging Quality Gate / validate-python (push) Successful in 6m38s
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m44s
Independent Staging Quality Gate / publish (push) Successful in 3m7s
The staging DB gate replays 20260814040000 on top of the new migration;
with claim_personal_report_job overloaded by a defaulted fourth argument,
a three-argument call became ambiguous. The lane now calls
claim_personal_report_job_for_types and the original stays untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXozbkyFNqbu8pVEtZ7W
2026-11-06 00:09:51 +08:00
ClaudeandClaude Opus 5.5 efceab8a2a feat(reports): report queue lanes — two at once with a short-report lane, waiting screens show the expected wait
Independent Staging Quality Gate / validate-frontend (push) Failing after 4m38s
Independent Staging Quality Gate / validate-python (push) Successful in 6m35s
Independent Staging Quality Gate / publish (push) Skipped
Every report type already queued in personal_report_jobs, one at a time per
server. The worker now runs PERSONAL_REPORT_WORKER_CONCURRENCY lanes (default
2); the second takes only annual and synastry reports so they never wait
behind long personal reports. claim_personal_report_job gains an optional
report-type filter; personal_report_queue_view (owner-only, security definer)
gives the wait, shown as a single line on the annual, personal and synastry
waiting screens. Also keeps the privacy whitelist line numbers in
personal-report-api.test.ts unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXozbkyFNqbu8pVEtZ7W
2026-11-05 23:41:31 +08:00
ClaudeandClaude Opus 5.5 f00ddf2c4e feat(intake): six birth-time sources with a user-given range (issue #144 part 1)
- Intake: six verbatim options (出生证明 / 户口本 / 家人记得 / 只记得时辰 /
  只知道时段 / 完全不知道). Clock-time sources take an earliest / latest or
  「不清楚误差」; no source maps to a fixed error any more. Twelve 时辰
  picker (子时 23:00–00:59 from the filled date); the position answer is a
  clue and never narrows the window.
- Validation: drop the hospital 2/2 and family 15/30/60/120 rules; a time
  needs a containing range (minutes derived, may be uneven) or
  uncertainty_known=false. Older 2/2 and 15–120 profiles still resave as is.
- Lagna precheck: uses the given range; without one it scans only the
  stated minute and says the verbatim T4 line; ranges read as clocks.
- Migration 20261102020000 (additive): birth_time_source accepts
  id_document; profiles and chart_profiles gain birth_time_record_kind,
  birth_time_uncertainty_known, birth_time_shichen; chart_profiles gains
  birth_time_clue; sync trigger and backfill carry them.
- BUG-1513: readProfile now reads the camelCase library record of other
  people (source, stated time, window, status).
- BUG-1514: chart_profiles sync trigger is security definer, so a person
  without a clock time can be saved by the people route.
- id_document reaches the frozen engine contract as approximate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-02 23:39:15 +08:00
ClaudeandClaude Opus 5.5 6721d320d8 fix(reports): release credits when lease recovery fails a report (BUG-1505)
recover_expired_personal_report_jobs now releases the reservation (by the
report's request_id, idempotent with the worker and the delete trigger)
before it fails a job; a release that raises or errors leaves that row
running for the next sweep and logs errorCode=report_refund_failed.
Migration 20261102010000_report_lease_expiry_release.sql replaces only the
function (invoker, empty search_path, service_role only).

The report worker no longer closes a failed job when its refund fails: it
logs report_refund_failed and leaves the lease to the recovery sweep.
Rectification retries a failed release once with the same case request id
and logs rectification_refund_failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-02 01:06:19 +08:00
ClaudeandClaude Opus 5.5 9b1127c23c fix(rectification): v3 keeps no table access; a definer helper binds the case (BUG-1502)
Independent Staging Quality Gate / validate (push) Successful in 17m14s
Independent Staging Quality Gate / publish (push) Failing after 11m33s
Gate run 6343 refused the invoker v3 on agentic_rectification_cases: since
20260814010000 service_role has no direct rights on cases, every case write
goes through owner-held security-definer RPCs. v3 now only checks the person,
calls v2 and hands the case to agentic_rectification_bind_case_subject_v1,
a service_role-only security-definer function that locks the case, binds a new
case and its conversation to the person, and checks the person matches.
Migration parsed with pglast (58 statements, 17 PL/pgSQL bodies).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-01 21:56:59 +08:00
ClaudeandClaude Opus 5.5 ac83eb0df0 fix(rectification): v3 opens cases as the invoker so it can call v2 (BUG-1502)
Independent Staging Quality Gate / validate (push) Failing after 16m45s
Independent Staging Quality Gate / publish (push) Skipped
The staging gate's real-database tests refused open_agentic_rectification_case_v3:
it was security definer, and 20260814010000 revokes EXECUTE on the 11-argument
v2 even from its owner, leaving service_role alone. v3 is now security invoker,
like the 12-argument v2; reading the person and labelling the chat session move
into two service_role-only security-definer helpers, because service_role has
no rights on chart_profiles or chat_sessions. The migration has never run, so it
is corrected in place.

Also adds the annual.full price rows to the whole-table pricing assertion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-01 21:37:48 +08:00
Claude 5b566af981 Merge annual report generation and entry overlay (#153, #154)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y

# Conflicts:
#	CHANGELOG.md
2026-11-01 20:20:47 +08:00
ClaudeandClaude Opus 5.5 4972fa40a6 feat(annual): annual report generation and annual.full billing (#153)
New report type annual_full on the personal report queue, like
synastry_full. POST /api/reports {reportType: annual_full} reserves
annual.full (20 credits by default, admin-editable), stores the range
and the optional situation, and queues the job; a year already written
for the same subject opens directly without a second charge. The worker
asks /api/annual/report_facts for the server cards, writes the sections
one at a time (person, overview, domains, windows, remaining, close)
with a program gate and one rewrite, saves the snapshot after every
section, then settles; a failure releases the reservation.
GET /api/annual/overview serves the overlay from the slim package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-01 20:15:45 +08:00
ClaudeandClaude Opus 5.5 ee08562471 feat(rectification): rectify other people in the profile list (issue #160)
Product 2026-11-01: 1A 2A.
- Cases record whose chart (chart_profile_id, null = owner); add-only
  migration 20261101010000_rectification_chart_subject.sql, old cases stay
  the owner's.
- Adoption / confirmation / segment adoption / VedAstro refresh read and
  write that person's row through two helpers; the owner's profile and
  cases are untouched. Owner edits rebaseline only owner cases, person
  edits only that person's; a new declaration drops the adopted minute.
- Open cases are counted per person (entry summary v2, in-chat offer,
  resume lookup); open_agentic_rectification_case_v3 binds a new case and
  its conversation to the person.
- delete_chart_subject deletes the person's cases and their
  conversations first (no refund).
- /rectification follows the current person (switcher beside the title),
  shows name and relation; self-only limits removed (hook, chat offer,
  chart ascendant link, starter hint).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyeZrYn6ryNcSe5Y2Y
2026-11-01 17:26:04 +08:00
jesseandClaude Opus 5.5 dfd3208979 feat: standalone rectification entry at /rectification (issue #145)
Independent Staging Quality Gate / validate (push) Failing after 13m25s
Independent Staging Quality Gate / publish (push) Skipped
- Sidebar 「生时校正」 under 星盘, behind a new account `rectification` flag.
- /rectification page: status card from entry-summary (not started / in
  progress with window and confirmed event count / adopted time), a short
  data check, then the home rectification surface (?rectify=1, or
  ?rectify=new to start over; ?c=<id> to continue or view). No price on
  the page.
- entry-summary gains session id, candidate range, confirmed evidence count
  and adopted times (add-only migration 20261028170000).
- The offer card under a consultation answer becomes one line and a link
  to /rectification; an explicit request in chat also goes there. No case
  is opened from a conversation any more.
- Starter home shows a rectification prompt for self charts with an
  estimated time; onboarding checklist gains 做一次生时校正 for them.
- Chart-page link points to /rectification. Shell registers its router so
  home hooks can navigate client-side without useRouter in Home().
- Docs: VOICE, DESIGN, CHANGELOG, device checklist.

Self profile only; other people are issue #160.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:50:55 +08:00
jesse-uxandGrok (agent loop) c6c69aa04b 拖动排序一次写完,新对话仍排在最上面(BUG-1449)。
Co-Authored-By: Grok (agent loop)
2026-10-27 00:03:59 +08:00
jesse-uxandGrok (agent loop) eee8564b7f 星盘档案可以拖动排序,合盘开始前先确认扣点。
Independent Staging Quality Gate / validate (push) Failing after 9m16s
Independent Staging Quality Gate / publish (push) Skipped
人物卡、菜单、编辑和删除换成组件库。chart_profiles 增加可空的 archive_order,本人始终排在第一。合盘选人页两个名字并排,开始按钮居中,点了先说出点数和余额。

自测:tsc 0;lint 0 error(122 警告,与上一张相同);定向测试通过;next build 后 / 仍是 Static;首页 JS gzip-9 639609,相对 640131 少 0.08%。test:db 79 通过、13 失败,失败名单与 windows-known-failures.txt 一致,排序列断言在通过的那一组。没有浏览器登录态。

Co-Authored-By: Grok (agent loop)
2026-10-25 05:05:00 +08:00
jesse-uxandGrok (agent loop) 352d45b2ef 外壳换成组件库:侧栏可拖宽,会话可排序(#105)。
Independent Staging Quality Gate / validate (push) Failing after 9m12s
Independent Staging Quality Gate / publish (push) Skipped
桌面侧栏可在 200 到 360 像素之间拖宽,拖到最左收起,宽度记在本机。手机从左边滑出。会话在同一组里拖动排序,顺序写入可空的 sidebar_order,收藏仍置顶。账户菜单、设置、反馈和退出确认改用组件库。顶栏点数只显示图标和数字。启程清单还在。菜单、拖宽、拖动排序和翻页在首屏之后再载入。

自测:tsc 退出码 0;npm run lint 0 error、121 warning;改到的前端测试 205 项全过;npm run build 后首页仍是 static;首屏 gzip 630350,相对 8f7c0f7d 的 621226 为 +1.47%。test:db 92 项里 79 过、13 败,失败名与 Windows 已知清单一致,排序列在通过的 ok 37。没有跑全量 npm test,没有跑 Python 快速门。没有登录态,没有在浏览器里拖侧栏。

Co-Authored-By: Grok (agent loop)
2026-10-25 01:41:19 +08:00