Commit Graph

459 Commits

Author SHA1 Message Date
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
Jesse_Chen f9010c8797 feat: make birth-time rectification conversational 2026-07-23 13:12:09 +08:00
732642856 32b10cb06a sync: add keyed VedAstro observation packet 2026-07-23 12:52:26 +08:00
732642856 543c857c4a sync: add pyjhora boundary matrix 2026-07-23 12:39:10 +08:00
732642856 8b9671ed27 sync: import research boundary evidence packets 2026-07-23 12:03:58 +08:00
732642856 67f667b54e sync: import technique closure packets round 2 2026-07-22 23:40:59 +08:00
732642856 a9d2edbbb4 merge: sync remaining technique evidence packets 2026-07-22 19:55:38 +08:00
732642856 c928f92a09 sync: import remaining technique evidence packets 2026-07-22 19:55:13 +08:00
Jesse_Chen 3069a7c8a0 feat: streamline conversational birth-time rectification 2026-07-22 17:39:11 +08:00
Jesse_Chen d7d9703364 feat: integrate minute rectification safeguards 2026-07-22 09:58:32 +08:00
Jesse_Chen f25aad526c merge: synchronize remote main 2026-07-21 22:57:50 +08:00
732642856 a69e24461f fix: stabilize e2e context and onboarding themes 2026-07-21 22:35:13 +08:00
Jesse_Chen bfc6870614 feat: complete verifiable birth-time rectification flow 2026-07-21 22:16:18 +08:00
732642856 909a248d20 sync: import pyjhora shadbala closure packets 2026-07-21 21:25:57 +08:00
732642856 3cdbbda94b sync: import rectification and vedastro contract updates 2026-07-21 20:30:49 +08:00