Commit Graph

473 Commits

Author SHA1 Message Date
Jesse_Chen b1b4f5fac9 fix(rectification): score family events and allow appearance follow-up
Independent Staging Quality Gate / validate (push) Successful in 10m19s
Independent Staging Quality Gate / publish (push) Successful in 8m7s
Dated family evidence now moves candidates via D12 and kin houses, career receipts expose both D1-10 and D10, and appearance/marks may be asked as auxiliary first-house scores. New cases bind Skill 10.0.4.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 08:35:46 +08:00
Jesse_Chen a3196584d2 feat(rectification): add refinement packet without unique-minute claims
Surface D9/D10 change minutes, event-dasha match copy, dual-dasha conflict, and a post-adopt consult handoff so users can keep narrowing or start a reading from a representative time.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 07:47:10 +08:00
Jesse_Chen c8af18e90a fix(rectification): show the house table and hide the activity fold
Independent Staging Quality Gate / validate (push) Failing after 9m39s
Independent Staging Quality Gate / publish (push) Has been skipped
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 20:11:51 +08:00
Jesse_Chen 80969c9b31 fix(consult): attach transit windows and VedAstro minute snapshots
Independent Staging Quality Gate / validate (push) Successful in 9m12s
Independent Staging Quality Gate / publish (push) Has been cancelled
Consult only copied Sade Sati and never searched trigger dates; V9 score left official minute identity unevaluated. Search a 90-day slow-planet window and run two-candidate snapshots with timeout staying not_evaluated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 19:08:17 +08:00
Jesse_Chen bffc74efc5 fix(consult): race a bounded VedAstro gateway on the chat path
Independent Staging Quality Gate / validate (push) Successful in 10m15s
Independent Staging Quality Gate / publish (push) Successful in 10m2s
Foreground still skips the heavy overview stack, but overlaps a timed
gateway so official evidence can merge when it finishes in budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 17:51:27 +08:00
Jesse_Chen 0eedf92992 fix(consult): put locally computed techniques in the model packet
Independent Staging Quality Gate / validate (push) Successful in 11m10s
Independent Staging Quality Gate / publish (push) Successful in 12m30s
Web consult already computed Yoga, Arudha, KP, and related layers, then
stripped them before the spoken model. Keep those executed structures in
toModelOutput so answers cannot invent degrees from parametric knowledge.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 16:53:13 +08:00
Jesse_Chen 8db716ca36 fix(home): serve today's starlanguage from daily guidance
Independent Staging Quality Gate / validate (push) Failing after 8m9s
Independent Staging Quality Gate / publish (push) Has been skipped
The homepage was waiting on a full chart plus four extra engines, so the card timed out and showed the failure copy on every visit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 15:35:38 +08:00
Jesse_Chen 7c7a25773c fix(rectification): let a tied plateau be adopted as the session result
Independent Staging Quality Gate / validate (push) Successful in 8m46s
Independent Staging Quality Gate / publish (push) Successful in 9m8s
Adjacent minutes still cannot confirm a unique birth minute. A scored
representative time can now be accepted, and the copy must say the minute
is not unique.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 10:41:47 +08:00
Jesse_Chen 233c728176 fix(rectification): route follow-ups by method layer and rescore when evidence changes
Independent Staging Quality Gate / validate (push) Successful in 9m12s
Independent Staging Quality Gate / publish (push) Successful in 7m28s
Web was round-robinning missing domains and waiting to score until the user said they had no more events. Server follow-up now uses the eight-method plan, rescored snapshots stay candidates, and D9/D10 observations never become user labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 09:56:54 +08:00
Jesse_Chen 2bf7472645 fix(consult): run the local skill's full technique spectrum on the web path
Independent Staging Quality Gate / validate (push) Successful in 10m59s
Independent Staging Quality Gate / publish (push) Successful in 9m7s
Web answers were thinner than a local Agent calling yinduzhanxing-skill:
theme-subset vargas, no visible audit table, and a prompt that dropped the
invocation contract. Bind the commercial method, compute D1–D60 plus Western
layers, and deliver the same Full-Spectrum checklist.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 23:30:36 +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 b5bcbaed73 fix(consult): record a tool call the tool never received
Independent Staging Quality Gate / validate (push) Has been cancelled
Independent Staging Quality Gate / publish (push) Has been cancelled
staging 手测 run 951a841e 第一次工具调用发出 tool.failed 后重试成功,但回执里
steps 只有 skill 与那次成功的 tool,stepBudget.used 为 2——失败的那次完全不存在。
客户端看见失败过一次,回执说没有,两边都查不到为什么。

工具的 inputSchema 是 strict 的,模型参数不合法时 Mastra 在调用 execute 之前就拒了,
于是工具体内一切都没跑:调用不计数、失败步不记录、连 chart-calculation 活动事件都没
发出(这也是本次定位的证据——失败那次没有任何 activity,重试那次有)。工具无法记录
一次它从未收到的调用。叠加两处:safeToolError 把非超时非取消的错误全塌成
calculation_failed,而即使失败落进工具体的 catch,consultationWorkflowFailureCode
对非 ConsultationWorkflowError 返回 undefined、append 处又写成可选省略,于是最需要
解释的那条记录恰好是唯一没有原因的记录。

改为在流层补记:流是唯一能观测到全部工具失败的位置,无论失败在 schema 这侧还是
execute 那侧,且它持有 startedAt 因而能给出时长。tool-error 分支比对「流已见的错误数」
与「state 里已有的失败 tool 步数」,只在前者更多时补一条,工具仍记录它能看见的失败,
两者不重复计。另新增 consultationToolFailureCode,令每个错误都解析出一个码。

failureCode 刻意仍不进公开回执:白名单与「the public receipt never carries the
internal failure classification」是刻意约束,workflow_rate_limited 这类后端内情不该
上线到客户端。原因走可观测日志的 toolCalls[].failureCode。客户端能看到「有一步失败」,
运维能在日志里看到为什么。

另记入 BUG-268 的线上实测值:单领域 referenceReads 两次均为 2,多领域为 0——不是
从不读方法,而是最需要方法的多领域路径一份都没打开。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 15:30:51 +08:00
Jesse_Chen 5caf47a413 fix(consult): require the evidence the product tells the user it will use
修完 BUG-267 后核对同一张表时发现,前端领域注册表早就为每个领域声明了 requiredLayers,
键名正确,并且这份列表驱动界面上的 evidencePreview——也就是产品明确告诉用户「这次会用
这些证据」。服务端的门是另写的一份,两份用不同词汇描述同一个合同,彼此没有任何链接,
对照下来门少查三处:marriage 声明 A7 而门只要求 UL,wealth 声明 Ashtakavarga 而门只
要求 D2,general 声明 D10 与 D2 而门只要求 D1/D9。三者实测在真实排盘中都是 used,补进
去不会把状态推成 degraded。失败方向仍是静默放宽,因此没有任何人报错。

新增一条测试解析前端注册表,断言其中每个指向真实 section 的条目都出现在服务端的门里。
只比对真实 section:注册表里还有人看的标签(7th house/lord、negative holdout gate)和
引擎压根不产出的 D11,机械全量对齐会把每条路由钉死在 degraded。该测试 fail-closed——
先断言 10 条路由全部解析到且列表非空,否则一次正则失配就会让它无声通过。

另外把 tests/test_consultation_consumer_context.py 加进 CORE_PYTEST_TARGETS:该文件
不在任何 CI 档位里,BUG-267 的 8 条与本条的 1 条此前都只在本地手动跑过,staging 门用的
是 --profile quick,从不运行它们。防漂移的钉子本身没人跑,等于没钉。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 15:26:57 +08:00
Jesse_Chen 10ae149c58 fix(consult): check the evidence gate against the route the answer is on
Independent Staging Quality Gate / validate (push) Successful in 7m41s
Independent Staging Quality Gate / publish (push) Successful in 9m39s
七条路由的证据门都不是自己的:route_requirements 的键写成 relationship/finance,而
路由名是 marriage/wealth,另有 5 条路由压根没有条目,全部静默落到 general 的门。
missingLayers: [] 因此不表示证据齐备,只表示没检查过——婚姻的 UL 与财富的 D2 从未
进入检查。

同一函数另有两处判据也没接到权威来源。7 块正则用问题文本重猜领域,而领域早已由模型
声明并写进 route_packet,一句写作「情感」而非表里「感情」的提问在 marriage 路由上完全
拿不到性别解读边界。timing_layers_ready 读的是 missing_route_layers,该列表只装本路由
要求的层,于是对任何不要求 narayana_dasha 的路由恒为真,精确应期在该层根本没算出来时
也照样放行。三处的失败方向都是静默放宽,因此没有任何人报错。

三处都接回权威来源:10 条路由逐条显式列出必需层(层名限定为证据包真实构建的 section,
所以 wealth 不要求引擎不产出的 D11)、领域边界按 route 查表、出生时间边界从矫正闸门的
effective_accuracy 与 Lagna 敏感度派生、就绪判断直接读 section 状态。唯一保留文本探测
的是「用户有没有要一个具体日期」——服务端对此没有权威来源,改为 timing/annual 路由结构
性携带、文本仅作叠加,一次措辞漏判不再能把信号清零。

另外把 skillReferenceReadCount 暴露为回执的 skill.referenceReads(必填)与可观测日志的
skillReferenceReads。它此前数完即丢,而 skill_read 按设计不记成 runtime step,因此「模型
有没有真的翻开方法文档」在运行结束后无处可查。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 11:50:28 +08:00
Jesse_Chen e1db576284 fix(consult): let the declared domain decide the route, not the question text
Independent Staging Quality Gate / validate (push) Successful in 14m21s
Independent Staging Quality Gate / publish (push) Has been cancelled
A staging consultation asked one question about two domains, career and
wealth. The model planned both, and all four attempts failed identically with
calculation_failed. The server resolves the workflow route from the question
text — an explicit-timing check, then keyword domain_tokens, falling back to
the themes argument only when the text yields nothing — while the frontend
declares strict_workflow_route from the domain it chose. The plan contract then
requires the text-derived route to equal the declared one, and each
RouteContract allows exactly one, so the mismatch became
ConsultationPlanContractError, BadRequest, HTTP 400, workflow_bad_request.
Here "事业" is in the career token list and "财运" is not in the wealth one, so
both calls resolved to career and the wealth call was rejected every time.

Widening the token list would only move the contradiction to the next
phrasing. The frontend sends one Python call per domain with the same question
text, so text routing can agree with at most one domain of a multi-domain plan
and every other domain is refused by construction. Now that 1955ba8c caps the
plan at three domains and merges the per-domain packets into one top-level
contract, two- and three-domain plans are expected to work end to end and this
is what stops them.

Make the server-issued declaration authoritative. declared_workflow_route()
returns the route a complete, version-supported, allowlisted plan declares, and
resolve_route() honours it instead of reading the text; a caller that sends no
plan metadata keeps the text heuristics verbatim, so the MCP strict_workflow
tool and the research callers behave exactly as before. The route packet
records which rule decided, because routing now has two legitimate sources.

This is not a way to silence the 400: the whole packet comes from the declared
domain's RouteDefinition, so the sync steps, the consumer_context required
layers, the evidence packet and the frontend's themes[primary_theme] lookup all
land on the domain that was declared. A call declaring wealth can no longer
execute career and label career evidence as wealth. The contract stays
fail-closed — a route off the allowlist is refused before execution, and
themes, layers, boundary, domains, categories, depth, horizon and precision are
still checked one by one. The surviving resolved_routes check changes meaning
rather than going away: it now asserts the workflow executed what was declared.

The timing prefix "应期与阶段问题:" existed only to inject 应期 so the text
router would agree with the declared route for one domain out of ten. With the
declaration authoritative it fixes nothing and still rewrites the question the
model's answer derives from, so it goes. It influences no other server
behaviour: it matches none of the consumer-context domain regexes, and the
timing route already sets precise_timing_requested.

test_consultation_workflow_domains.py deliberately sent no plan metadata, which
is why this was never caught — its per-domain question happened to route to its
own domain. It now sends the real plan for all ten canonical domains behind one
question whose text routes to career; nine of them fail without this change.

Refs BUG-259.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 18:10:00 +08:00
Jesse_Chen 5bcc283d26 merge: integrate consultation runtime v2 into staging 2026-08-15 12:28:28 +08:00
Jesse_Chen 24fc83d972 Merge codex/pr2-final-response into staging integration 2026-08-15 12:27:00 +08:00
Jesse_Chen 3756c0ed9d merge: integrate upstream governance into staging 2026-08-15 12:17:22 +08:00
Jesse_Chen 8abd248f49 feat(governance): pin selective upstream import contract 2026-08-15 12:13:09 +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 6d192ad175 feat: add consultation and product domain registries 2026-08-15 06:04:23 +08:00
Jesse_Chen 5012ff7212 feat: add persistent personal report document v2 2026-08-15 05:10:37 +08:00
Jesse_Chen 83fef19779 feat: add rectification event decision contract v2 2026-08-15 00:56:06 +08:00
Jesse_Chen 65a75ab29f feat(consultation): enforce server plan boundaries 2026-08-14 20:22:52 +08:00
Jesse_Chen c1f1819de1 feat(skill): add immutable package registry and receipts 2026-08-14 16:37:53 +08:00
Jesse_Chen 620131d6a8 fix: keep foreground consultations responsive 2026-08-11 11:59:14 +08:00
Jesse_Chen 10724e9dab fix: request official VedAstro evidence in gateway
Staging Backend Quality Gate / validate (push) Successful in 11m17s
Staging Backend Quality Gate / publish (push) Successful in 6m26s
2026-08-10 20:17:35 +08:00
Jesse_Chen b637528f14 fix: propagate consultation evidence before audit
Staging Backend Quality Gate / validate (push) Successful in 12m37s
Staging Backend Quality Gate / publish (push) Successful in 8m25s
2026-08-10 19:40:11 +08:00
Jesse 8fb6b65b01 wip: local BUG-139/BUG-140 fixes before syncing origin/main
- pre_work_check.py: prefer repo .venv Python >=3.11, strict JYOTISH_PRE_WORK_PYTHON override, fail closed
- tests/test_pre_work_check.py: regression coverage for venv preference / system 3.9 / strict override
- globals.css: transient :active pressed feedback for entrypoint cards, hover only under (hover: hover)
- consultation-entrypoint.test.ts: sticky-hover regression test
- BUG_HISTORY.md: BUG-139 / BUG-140 records
- pre_work_error_ledger.md: ERR-078 resolved entry
2026-08-10 17:57:06 +08:00
Jesse 82dab96b07 feat(report): add personal report contract and persistence 2026-08-06 12:43:10 +08:00
Jesse 03d3b58ff7 feat(skill): merge upstream reader-report contract 2026-08-06 11:31:51 +08:00
Jesse 685ed00e2f feat(sync): enforce one-way yinduzhanxing import policy 2026-08-06 11:25:34 +08:00
Jesse_Chen 5957803de4 Merge GitHub upstream into Gitea primary 2026-08-05 11:13:34 +08:00
Jesse_Chen a7a11a1a7a feat(rectification): drive questions from candidate contrast 2026-07-31 13:17:00 +08:00
Jesse_Chen bab5647afc fix(rectification): enforce director evidence boundaries 2026-07-31 06:13:47 +08:00
Jesse_Chen 0e3ce47678 refactor(rectification): let director agent own interview flow 2026-07-30 17:56:10 +08:00
linmeng f4e35974c6 Revert "merge: sync GitHub staging to Gitea"
Deploy staging to test server / deploy (push) Failing after 14m49s
This reverts commit a55c69115d, reversing
changes made to 02c9c9f3d6.
2026-07-30 14:38:17 +08:00
Jesse_Chen 31e5709f33 feat: add VedAstro rectification post-validation 2026-07-30 11:48:02 +08:00
Jesse_Chen 2384faf367 feat: harden rectification candidate validation 2026-07-30 10:55:39 +08:00
Jesse_Chen a5f409a500 fix: align rectification spec hashes across runtimes 2026-07-29 22:49:17 +08:00
Jesse_Chen 8ade6ed5c8 refactor: rebuild birth time rectification agent 2026-07-28 13:04:30 +08:00
Jesse_Chen 2ca245d643 feat: rebuild birth time rectification workflow 2026-07-27 09:57:14 +08:00
Jesse_Chen 0e6ed6ba79 fix: make conversational rectification converge 2026-07-25 11:50:41 +08:00
Jesse_Chen 3ca30ed7de feat: complete minute birth-time rectification flow 2026-07-25 01:17:14 +08:00
732642856 0013a4e633 sync: add remaining observation packets 2026-07-23 21:58:15 +08:00
732642856 2c882ef067 merge: update main before timing rectification sync 2026-07-23 20:50:53 +08:00
732642856 3ce3f63692 sync: add timing freeze and gulika fix 2026-07-23 20:35:14 +08:00
732642856 91e9da4c1c sync: add timing rectification freeze packet 2026-07-23 20:21:27 +08:00
Jesse_Chen 0850619eaf fix: preserve trusted rectification history 2026-07-23 14:58:56 +08:00
Jesse_Chen 1d841ec80a merge: conversational birth-time rectification
# Conflicts:
#	docs/BUG_HISTORY.md
2026-07-23 13:17:04 +08:00