575 Commits

Author SHA1 Message Date
Jesse_Chen 013c15a9e9 ci(staging): decouple deployment from main
Staging Backend Quality Gate / validate (push) Successful in 14m50s
Staging Backend Quality Gate / publish (push) Failing after 7m58s
2026-08-13 11:57:24 +08:00
Jesse_Chen cf7598b337 refactor(frontend): remove generic AI-slop styling 2026-08-13 11:05:00 +08:00
Jesse_Chen 4deb5c2378 fix(rectification): start new case from homepage
Staging Backend Quality Gate / validate (pull_request) Successful in 24m42s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 21:21:26 +08:00
Jesse_Chen 746fdc184b fix(rectification): preserve assistant turns in dossier
Staging Backend Quality Gate / validate (pull_request) Successful in 17m28s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 15:33:04 +08:00
Jesse_Chen 7c03c1a4b5 fix(rectification): confirm clear events in same turn
Staging Backend Quality Gate / validate (pull_request) Successful in 17m59s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 14:18:48 +08:00
Jesse_Chen c7dfe1c166 fix(rectification): bind evidence to current server turn
Staging Backend Quality Gate / validate (pull_request) Successful in 16m51s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 12:12:10 +08:00
Jesse_Chen 220828d6f0 fix(rectification): hydrate persisted case turns
Staging Backend Quality Gate / validate (pull_request) Successful in 15m6s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 10:45:49 +08:00
Jesse_Chen 15a9e3f248 test(rectification): include birth context in entry fixture
Staging Backend Quality Gate / validate (pull_request) Successful in 14m59s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 09:46:54 +08:00
Jesse_Chen 397b6ef7c2 fix(rectification): surface real activity context
Staging Backend Quality Gate / validate (pull_request) Failing after 12m4s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 09:28:47 +08:00
Jesse_Chen da384357d0 fix(rectification): skip settlement for free turns
Staging Backend Quality Gate / validate (pull_request) Successful in 15m26s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 02:58:35 +08:00
Jesse_Chen 32b65cfaf3 fix(rectification): pass server case id to agent
Staging Backend Quality Gate / validate (pull_request) Successful in 16m22s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 02:00:08 +08:00
Jesse_Chen b276bc8a8f fix(rectification): bind default session model
Staging Backend Quality Gate / validate (pull_request) Successful in 15m48s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-12 01:05:36 +08:00
Jesse_Chen d19d398221 fix(rectification): allow runtime flag reads
Staging Backend Quality Gate / validate (pull_request) Successful in 17m5s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
2026-08-11 23:49:44 +08:00
Jesse_Chen 139baeb94c fix(admin): remove email reauth from account reset
Staging Backend Quality Gate / validate (push) Successful in 13m47s
Staging Backend Quality Gate / publish (push) Successful in 8m20s
2026-08-11 21:09:30 +08:00
Jesse_Chen 1e8fc6c208 fix(test): finish v9 postgres gate coverage
Staging Backend Quality Gate / validate (push) Successful in 12m9s
Staging Backend Quality Gate / publish (push) Successful in 8m42s
2026-08-11 19:57:28 +08:00
Jesse bc64ac743d fix(test): close v9 db fixture pools per URL and seed via admin role 2026-08-11 19:46:11 +08:00
Jesse 5dd0ab66a9 fix(rectification): isolate receipt activity after staging sync
Staging Backend Quality Gate / validate (push) Failing after 11m36s
Staging Backend Quality Gate / publish (push) Has been skipped
2026-08-11 18:22:30 +08:00
Jesse b04dd1a9e0 merge: sync latest staging into rectification v9
# Conflicts:
#	docs/BUG_HISTORY.md
2026-08-11 18:08:42 +08:00
Jesse eddd52d1f3 fix(rectification): harden v9 runtime after adversarial review 2026-08-11 17:57:47 +08:00
Jesse_Chen c0e9a1c9f1 feat(admin): add safe account reset
Staging Backend Quality Gate / validate (push) Successful in 12m13s
Staging Backend Quality Gate / publish (push) Successful in 7m50s
2026-08-11 17:57:40 +08:00
Jesse 724fb64c1a test(rectification): cover v9 migration rollout and regressions
- New suites: entry routing (13), evidence (11), skill/agent (13), stream (9),
  status/security (11) plus shared fake-accounting support.
- Migration static contract tests extended for the v9 agent api migration
  (run_phases, dossier/finalize/persist/accept/confirm RPCs, consent gate,
  needs_rebaseline guard, runtime flag, identity-foundation boundary).
- database-local-business.test.ts ledger + exact public table set updated
  (agentic_rectification_run_phases; BUG-127/BUG-144 boundary).
- rectification-v9-database.test.ts adds the agent-api migration test
  (flag seed, turn finalize, run phase receipt, consent rejection).
- rectification-agentic-entry.test.ts rewritten: the old tests locked in the
  hasRectificationSession + sessions.find guessing, textStream consumption and
  client-side session creation; they now assert the server-owned Case open
  flow, fullStream NDJSON, durable turns and exact-session routing.
- consultation-entrypoint / application-billing-contract rectification sections
  updated to the caseId-bound billing and open API contracts.
- docs/BUG_HISTORY.md: BUG-162 follow-up with regression record explaining why
  the old tests missed the broken entry guessing.
2026-08-11 17:18:08 +08:00
Jesse ca7484666f feat(rectification): stream agent execution and redesign entry routing
Replace the Direct Agentic textStream relay with a durable V9 agent runtime:

- agentic-rectification.ts: short boundary-only system prompt (no gate->scan
  ->score->diagnostics copy); pins skills/jyotish-birth-time-rectification;
  per-action bounded maxSteps (opening/read-only 6, evidence 8, rescore 12,
  accept/confirm 6) with a hard ceiling and repeated-tool-call detection.
- rectification-v9-tools.ts: ten Case-ref tools (read-case, propose/confirm/
  revise-evidence, compare-candidates, read-diagnostics, offer-candidates,
  accept-candidate, confirm-birth-time, close-case). Inputs are minimal refs
  only; RPC-backed evidence ledger, fingerprint cache reuse, receipts, and
  accepted!=confirmed semantics; confirm requires gate + grounded consent.
- /api/rectification/agent: caseId/sessionId/requestId/action/message; exact
  Case<->Session binding verified server-side; client history never overrides
  the durable dossier; pending turn -> completed/failed/retryable; consumes
  result.fullStream and emits allowlisted NDJSON only (reasoning/raw/provider
  metadata/tool payloads/birth data/scores never forwarded); first-turn real
  skill.started/skill.loaded gate with one controlled retry; billing bound to
  rectification:case:{caseId}.
- New forward migration 20260813010000_agentic_rectification_v9_agent_api.sql:
  case dossier/compute, turn finalize, fingerprint-cached candidate persist,
  case-scoped accept, consent-gated confirm, guarded transitions,
  needs_rebaseline profile guard, run_phases receipt table, and the
  rectification_runtime_version feature flag (v9 default, legacy read-only).
- Frontend: homepage/sidebar entry routing now uses the server Case open API
  (openRectificationFromHomepage/openRectificationSession/startNewRectification)
  with exact sessionId/caseId and server-owned shouldStartOpening; CTA driven
  by entry-summary; chat restores from persisted turns, candidate cards from
  the Candidate Snapshot API, activity from real NDJSON + persisted receipts;
  direct durable candidate-accept endpoint for the UI cards.
2026-08-11 17:17:56 +08:00
Jesse_Chen 46cdc3bbf4 feat(consultation): let the jyotish agent drive skills and tools 2026-08-11 16:22:02 +08:00
Jesse d394dd0585 feat(rectification): add durable case and evidence runtime 2026-08-11 16:18:53 +08:00
Jesse 60e2ce4fa4 feat(rectification): add v9 skill and domain contracts 2026-08-11 16:18:49 +08:00
Jesse_Chen 6d7a9a97be merge: consultation fixes into staging
Staging Backend Quality Gate / validate (push) Successful in 12m19s
Staging Backend Quality Gate / publish (push) Successful in 8m44s
# Conflicts:
#	docs/BUG_HISTORY.md
2026-08-11 12:00:25 +08:00
Jesse_Chen 620131d6a8 fix: keep foreground consultations responsive 2026-08-11 11:59:14 +08:00
Jesse_Chen ce46aae5c8 fix: polish storefront account and membership state 2026-08-11 11:59:03 +08:00
Jesse_Chen 8eed0603f9 fix(admin): allow administrator list reads
Staging Backend Quality Gate / validate (push) Successful in 12m30s
Staging Backend Quality Gate / publish (push) Successful in 7m37s
2026-08-11 00:10:24 +08:00
Jesse 2697d16ef1 feat(identity): test-only fixed OTP channel and rectification candidate cards
Staging Backend Quality Gate / validate (push) Has been cancelled
Staging Backend Quality Gate / publish (push) Has been cancelled
- IDENTITY_TEST_OTP env: when set to a 6-digit code, no real email is
  delivered; login page surfaces the fixed code so testers can register
  and sign in without a mailbox. Opt-in, never set in production.
- email-otp-login: test-channel notice with the pinned code.
- Rectification candidate list restyled with the project design system
  (warm canvas, action color, display serif, soft shadow, hover lift).
- Regression tests for config parsing, pinned OTP generation, login UI
  notice, and candidate card styles.
2026-08-10 19:38:27 +08:00
Jesse_Chen 22bbf8abf2 fix: restore report creation and sidebar alignment
Staging Backend Quality Gate / validate (push) Successful in 10m2s
Staging Backend Quality Gate / publish (push) Successful in 8m11s
2026-08-10 17:33:18 +08:00
Jesse_Chen 07ea504e91 fix: align report technique audit evidence
Staging Backend Quality Gate / validate (push) Successful in 10m37s
Staging Backend Quality Gate / publish (push) Has been cancelled
2026-08-10 17:18:52 +08:00
Jesse_Chen 455917a870 ops: keep production SSH sessions alive
Staging Backend Quality Gate / validate (push) Successful in 10m16s
Staging Backend Quality Gate / publish (push) Successful in 2m8s
2026-08-10 16:17:41 +08:00
Jesse_Chen a0f8118e32 ops: read production migration revision from container
Staging Backend Quality Gate / validate (push) Successful in 11m33s
Staging Backend Quality Gate / publish (push) Successful in 2m4s
2026-08-10 15:31:35 +08:00
Jesse_Chen 64382c879d fix: allow admin OTP password status
Staging Backend Quality Gate / validate (push) Successful in 12m11s
Staging Backend Quality Gate / publish (push) Successful in 12m43s
2026-08-10 11:52:14 +08:00
Codex 65bcef3001 feat: add global asynchronous report center
Staging Backend Quality Gate / validate (push) Has been cancelled
Staging Backend Quality Gate / publish (push) Has been cancelled
2026-08-09 20:24:09 -07:00
Jesse_Chen a17ff258d8 fix: correct membership back flow and add onboarding paywall
Staging Backend Quality Gate / validate (push) Has been cancelled
Staging Backend Quality Gate / publish (push) Has been cancelled
2026-08-10 11:14:31 +08:00
Jesse_Chen 8696eca022 fix: keep one active email OTP per account
Staging Backend Quality Gate / validate (push) Successful in 12m39s
Staging Backend Quality Gate / publish (push) Successful in 12m9s
2026-08-10 10:49:25 +08:00
Jesse_Chen 43d0647de2 ops: read production revision from container
Staging Backend Quality Gate / validate (push) Successful in 10m15s
Staging Backend Quality Gate / publish (push) Successful in 2m17s
2026-08-10 06:58:51 +08:00
Jesse_Chen 8823597f4c ops: accept direct host isolation during internal verify
Staging Backend Quality Gate / validate (push) Successful in 22m15s
Staging Backend Quality Gate / publish (push) Successful in 10m8s
2026-08-10 05:27:24 +08:00
Jesse_Chen 7a24a8d387 ops: harden production data migration
Staging Backend Quality Gate / validate (push) Successful in 10m5s
Staging Backend Quality Gate / publish (push) Successful in 9m18s
2026-08-10 04:19:24 +08:00
Jesse_Chen 18459f03d7 ops: fix internal production host probes
Staging Backend Quality Gate / validate (push) Successful in 12m6s
Staging Backend Quality Gate / publish (push) Successful in 5m8s
2026-08-10 03:41:25 +08:00
Jesse_Chen f6b3301035 ci: pin release gate to Node 22
Staging Backend Quality Gate / validate (push) Successful in 13m25s
Staging Backend Quality Gate / publish (push) Successful in 5m4s
2026-08-10 02:31:35 +08:00
Jesse_Chen 417417835a ci: stabilize release dependency install
Staging Backend Quality Gate / validate (push) Successful in 12m45s
Staging Backend Quality Gate / publish (push) Successful in 8m43s
2026-08-10 00:56:40 +08:00
Jesse_Chen ac0b218c90 hide report PDF action
Staging Backend Quality Gate / validate (push) Successful in 21m7s
Staging Backend Quality Gate / publish (push) Successful in 12m9s
2026-08-09 23:20:36 +08:00
Jesse_Chen a77fb514cb ci: run release gate on compose runner
Staging Backend Quality Gate / validate (push) Has been cancelled
Staging Backend Quality Gate / publish (push) Has been cancelled
2026-08-09 23:17:29 +08:00
Jesse_Chen 9235ee66f6 keep staging image build on turbopack
Staging Backend Quality Gate / validate (push) Successful in 17m58s
Staging Backend Quality Gate / publish (push) Successful in 4m14s
2026-08-09 22:14:40 +08:00
Jesse_Chen 4f3f842958 avoid duplicate staging production build
Staging Backend Quality Gate / validate (push) Successful in 12m20s
Staging Backend Quality Gate / publish (push) Failing after 47m39s
2026-08-09 21:06:47 +08:00
Jesse_Chen 1db36b19b4 fix bounded standalone production build
Staging Backend Quality Gate / validate (push) Failing after 23m55s
Staging Backend Quality Gate / publish (push) Has been skipped
2026-08-09 20:37:02 +08:00
Jesse_Chen e1878ed511 fix standalone web health binding
Staging Backend Quality Gate / validate (push) Failing after 24m24s
Staging Backend Quality Gate / publish (push) Has been skipped
2026-08-09 19:35:41 +08:00