- 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
- 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
Program-printed 「判断依据」 rows: detected yoga as 「有 X(条件)」, neecha-bhanga as
「落陷;有缓解」, Narayana without the start-year disagreement note, a row cited
twice restated by its first clause. Rewrite table no longer produces
还没核实 / 从哪年起算还有分歧. Backstage status fields unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
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
signInWithPassword set busy and returned on twoFactorRedirect without
resetting it, so the two-step step showed 「验证中」 and verifyTwoFactor
returned before sending the six digits. The admin login is password-only,
so every MFA-enrolled operator was stuck; reproduced in headless Chrome
on staging with a throwaway account.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
western_chart is now "only" | "both" (true = "only"), the writer's judgment.
"only": no day calendar, the time section and time label removed, Indian
paragraphs sent to the one repair call (dropped if they survive), the
evidence box is Western rows printed from western_natal (Indian keys and
items dropped and logged), no Indian method rows or chart-data table.
"both": the body sits under 印度盘怎么看 / 西洋盘怎么看 (missing headings are
regrouped by the same repair call, kept as written when the reply fails its
checks), the verdict names both sides, rewrites keep the side they name,
mixed basis items are split and the box shows 印度盘 / 西洋盘 groups. Ties in
the top element / modality are given to the writer and a single-winner
sentence or title goes to the repair. Backstage notes (几种方法一致 and
similar) are cleaned from every answer. Non-Western cards are byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
run-jyotish-consultation takes an optional western_chart flag (the writer's
judgment); when set, the result carries western_natal next to the card: the
Western tab's facts from /api/western (ten-planet element / modality /
hemisphere counts, dignities, angles, stelliums, patterns, every major
aspect). The western:natal lookup returns the same facts. Without the flag
the result and the card are byte-identical. The writing rule bases Western
claims only on these facts; the fact guard accepts Western positions the
writer read, and Western basis items borrow no Indian rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
- Verdict card is its sentence only when the day calendar is shown; writing
rule asks for one direct sentence, no label rows.
- verdict_meta check: a verdict opening that talks about the answer goes to
the existing rewrite; a rewrite still meta is refused. One-line verdicts
naming both sides are read clause by clause.
- Detail title is the date only.
- Detail box sized to this calendar's own longest panel (texts stacked
unseen in one grid cell); tool.completed carries the texts so the
skeleton reserves the same height.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
The strip grew 300 -> 317px at completion on desktop (a 54-character
sentence). Stretches longer than 36 / 24 / 24 characters now go to the
existing segment rewrite (rejected again if still long; program-written
strips refused); nothing is cut. The reserved height follows the slot's own
width (container query: 436 / 392 / 324 / 300px), each band at its measured
worst case, so skeleton, cross-fade and final heights are equal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
The answer slot shows a skeleton of what it will hold (strip, or the day
calendar for the writer's day_range) built from the real component's boxes,
with the chart pages' slow-pulse skeleton blocks; when the whole answer is
complete the component is drawn in the same grid cell and the two cross-fade
once (opacity, --motion-standard / --ease-standard; instant under reduced
motion). Dark 平 legend chip gets a tertiary-ink hairline ring.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
Switching to a chart type whose layer had not arrived swapped the board for the
waiting skeleton, so the layer landed on a freshly mounted drawing and the
planets popped in instead of moving between cells. The card now holds the board
just drawn (dimmed after a short wait, not clickable, aria-busy) and the same
nodes move when the layer lands. The skeleton stays for the first draw only;
a failed layer still shows its note and retry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
Planets glide between houses (one flat body layer in fixed planet order); the
inspector fades in place without remounting (focus kept); composer entrances
play on state changes only; tabs never transition `all` and the pill follows
resizes; no height/grid-rows animations left (timeline, chart-choice fold,
drawer); one popup start (scale .96), one scrim beat, full-edge sheets, quick
disclosures; no spring curve, raw CSS durations mapped to tokens; sidebar rows
fade only for new conversations; SplitBar label rides with the line.
Measured 1440x900, 400-section page, 8 toggles: layouts 124 -> 8,
layout time 29ms -> 3ms, no frame over 20ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
The sidereal mode is process-global and the API server is threaded; switching to
the KP ayanamsa without the shared lock let a concurrent request compute its
chart in the KP mode during the cold computation. The cache key now also covers
the sampling hour and the body set (astrologer handoff 2026-11-24, section 5E).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
Animating flex-basis/width (BUG-2331) re-laid-out and re-styled the whole page every
frame on long reports; the custom property on .shell-frame re-styled every element.
Measured 1440x900, 400-section page, 4 toggles: frames >20ms 5-12 -> 0, layout
0.42s -> 0.04s, style recalc 0.15s -> 0.01s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
- planets live in one layer keyed by planet and placed by transform, so a
chart-type or person switch moves each planet to its new cell (standard,
ease-out, interruptible); changed cell labels fade in quick
- north/south and skeleton -> board crossfade; caption parts crossfade
- opt-in sliding tab indicator (translate only) on the chart area's lists
- inspector body crossfades on a new selection; disclosures unfold from
their toggle; chevrons, cell fills, yoga cards, ephemeris day, birth-sky
control and the western redraw on tokens; reduced motion turns all off
- guard test motion-chart-2329; pinned body-position test updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
Sent question rises from the composer, phone composer controls settle in,
send/stop and copy/like icons pop in place, follow-ups stagger, jump-to-latest
and the chart panel enter from their edges; every chat timing retimed to the
motion tokens; opacity/transform only; reduced motion off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
- 生时纠正 self-choice split bar: block widths change at once; a full-width track carries the
accent fill (translate + scaleX), the line and the reported-time mark (translate). Was
flex-basis / left transitions, a layout every frame. Row clips horizontal overflow.
- Report and annual progress bars fill by scaleX (was a width transition).
- Report question panel slides in from its edge (emphasis, ease-sheet); width drag has no
transition. 生时纠正 phone sheet slides from the bottom edge.
- Report / annual / synastry / rectification disclosures: the opened body rises in (quick),
no height animation. 「提问 N」 count fades in on change. TOC selection: instant fill swap.
- Every area-C duration and curve now uses the BUG-2327 tokens; reduced motion = none.
- Frame timing (headless Chrome, 390 wide, ~400-section page): scroll, panel open and split
moves all 16.7 ms per frame, none over 20 ms, 3 layouts in the whole run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
Desktop sidebar collapse/expand glides the column one standard step (never while
the edge is dragged); session rows, menus, subject picker, account menu and
tooltips move on quick/instant with faster exits; login and onboarding steps
arrive 8px from the reading direction; points numbers tick from the side they
moved (CreditsValue); redeem success settles on emphasis + ease-out; antd
motion tokens follow lib/motion/tokens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
- CSS tokens --motion-instant/quick/standard/emphasis/stagger and
--ease-standard/exit/sheet (reusing --ease-out); reduced motion zeroes them
- lib/motion/tokens.ts mirrors the tokens; presets.ts derives from them
- dialog, alert-dialog, popover, dropdown-menu, tooltip, select: interruptible
starting/ending-style transitions from the trigger origin, faster exits
- sheet/drawer/button/tabs/toggle/input-otp/inputs/table/toasts on tokens
- guard test motion-language-2327; pinned tests updated with notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
BUG-2294 added English notes for the engine's audit rows; the Narayana/Patyayini/Tajika
row said "while external parity is open". acceptEnglishEdition runs ordinaryOutputLeaks
on the English markdown and `parity` is a backstage word there, so every personal report
since that change was stored with englishUnavailable=public_leak and export offered
Chinese only. The new test reads the English leak patterns from report-public-projection.ts
and checks every English audit note and a public chart's whole English edition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
- While the chat composer has focus on a phone and the visible part is shorter by a keyboard,
the shell takes exactly the visible part (data-chat-keyboard + --chat-kb-top/height from
visualViewport); no window scroll is touched, WeChat's full-height viewport is left alone.
- Phone empty home: composer at the bottom (no balance row), greeting centred above, starter
rows 44px on one line, 换一组 on the small row above them, header above the composer layer.
- Phone composer is one row while idle and empty (常用问题 icon, example, send) and the two-row
card once focused or holding text; focus moving to its own buttons keeps it open.
- The empty composer shows a rotating example question instead of 「想聊什么都可以」.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
Ports the astrologer's counterfactual relabel from upstream 58f37ee5b (draft
and authority). The annual named-yoga field read by the report tables, the
writer's facts, the annual service and the chat card moves those rows to
counterfactual_rows. The two public charts have none in 2016-2040, so their
reports are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
One daemon thread, bounded queue (drop oldest), coalesced per chart, pauses
whenever the heavy-compute gate or a consult warm is busy, and scans each year
in 15-day sub-ranges merged exactly into the whole-year result. Same cache keys
as the report (verified: a report after prewarm scans nothing).
JYOTISH_ANNUAL_MOTION_PREWARM=0 turns it off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
Ports the astrologer's transit_search.py verbatim (upstream 58f37ee5b), the
solar-return motion request and the annual condition status pack. The scan
runs only in the full-data report (report_render/annual_motion.py), never in
the chat annual card.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1