Commit Graph

10 Commits

Author SHA1 Message Date
Jesse_Chen 6a0394aa57 fix(web): update consult source contracts for the declared-window path
BUG-341 added a third agentic consultation stream and renamed the homepage draft entrypoint, but the exact-count contracts still described two paths, so staging validate failed before publish.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 17:59:07 +08:00
Jesse_Chen d04fc30b63 feat(consult): bind the skill method into the prompt instead of re-activating it every turn
Independent Staging Quality Gate / validate (push) Successful in 10m34s
Independent Staging Quality Gate / publish (push) Successful in 11m10s
Activating the skill answered with the entrypoint plus a flat listing of every
file in the package, and nothing carried over between requests: the agent is
rebuilt per request, no thread memory is configured, and the replayed history is
plain question/answer text. So the model re-activated on every turn and paid for
that listing every time, twice more whenever a retry opened a fresh model loop.

The method is now read from the hash-verified package and bound into the
instructions, and the activation tools are withdrawn while skill_read stays. The
agents also stopped loading from the working-tree view, whose reference listing
no hash covered - only SKILL.md was compared - so what the model sees is finally
what the registry pinned.

Withdrawing an activation the model could forget also removes the failure it
mostly produced: the contract no longer waits on a model action for method, and
the no-birth-time path has no contract left to repair.

Measured against this package: activation 118,352 bytes, bound method 47,289.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 21:47:15 +08:00
Jesse_Chen 927bdd7a21 fix(consult): compute the antardasha boundaries answers need, and stop billing an apology for an unwritten answer
Independent Staging Quality Gate / validate (push) Failing after 8m32s
Independent Staging Quality Gate / publish (push) Has been skipped
The model packet read chart.modules.dasha_boundaries, a key the engine never
wrote, so no answer ever had sub-period boundaries while the receipt still
reported precise timing as allowed. The server now cuts the running mahadasha
into antardashas out of the periods the packet already shows, exposes them as
their own evidence section, and precise timing requires that section.

A run whose calculation succeeded and whose model then wrote nothing was
answered with a fixed apology and billed as completed. It now asks once more
against the cached calculation, and fails with empty_answer—no charge—if that
attempt is silent too.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 18:32:49 +08:00
Jesse_Chen 0e5575a8a9 test: close local release gate regressions
Independent Staging Quality Gate / validate (push) Has been cancelled
Independent Staging Quality Gate / publish (push) Has been cancelled
2026-08-15 09:32:28 +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 b04dd1a9e0 merge: sync latest staging into rectification v9
# Conflicts:
#	docs/BUG_HISTORY.md
2026-08-11 18:08:42 +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_Chen 46cdc3bbf4 feat(consultation): let the jyotish agent drive skills and tools 2026-08-11 16:22:02 +08:00
Jesse_Chen 32b683ebef fix(consult): preserve streaming across disconnects
Staging Backend Quality Gate / validate (push) Successful in 12m47s
Staging Backend Quality Gate / publish (push) Successful in 31m1s
2026-08-08 21:34:03 +08:00
Jesse_Chen 9d8c73561f test(deploy): integrate billing admin rollout checks
Staging Backend Quality Gate / validate (push) Failing after 7m30s
Staging Backend Quality Gate / publish (push) Has been skipped
2026-08-06 20:15:50 +08:00