fix(consult): pass birth-time accuracy instead of treating every chart as unrectified #49
Closed
jesse
wants to merge 0 commits from
codex/consultation-birth-accuracy-20260901 into staging
pull from: codex/consultation-birth-accuracy-20260901
merge into: :staging
:main
:staging
:codex/rectification-narrower-delivery-20261016
:codex/api-server-service-extract-20261013
:codex/dasha-unify-20261013
:codex/python-hygiene-20261013
:codex/contracts-helpers-dedupe-20261013
:codex/pl9-render-split-20261013
:codex/consult-route-split-20261013
:codex/beta-safety-net-20261014
:codex/beta-capacity-20261014
:codex/answer-effort-ab-20261013
:codex/api-chart-subprocess-gate-20261013
:codex/chart-ascendant-row-20261015
:codex/data-layer-types-20261013
:codex/release-path-production-20261014
:codex/beta-main-path-20261014
:codex/frontend-dead-code-20261013
:codex/consult-prep-parallel-20261013
:codex/report-reference-perf-20261013
:codex/home-sidebar-rerender-20261013
:codex/node-runtime-resources-20261013
:codex/api-disk-cache-retention-20261013
:codex/rect-scoring-perf-20261013
:codex/upstream-sync7-20261014
:codex/rectification-step0-entry-20261013
:codex/report-focus-card-20261013
:codex/report-translation-gaps-20261013
:codex/composer-first-glyph-clip-20261013
:codex/agent-loop-pilot-20261013
:codex/rectification-offer-opened-state-20261012
:codex/rectification-nearest-boundary-opening-20261012
:codex/rectification-d12-parent-probes-research-20261012
:codex/rectification-explicit-entry-20261012
:codex/consult-career-type-residual-20261009
:codex/consult-card-full-source-20261007
:codex/rashi-dashas-native-20261008
:codex/ephemeris-nutation-20261008
:codex/report-full-data-edition-20261007
:codex/special-lagnas-native-20261008
:codex/upstream-sync6-20261007
:codex/rectification-delivery-dup-adopt-20261006
:codex/consult-conversational-answer-20261006
:codex/consult-latency-quickwins-20261005
:codex/rectification-nadi-seconds-research-20261005
:codex/gate-log-volume-20261004
:codex/astrologer-rulings-batch6-20261004
:codex/consult-timeline-no-plan-20261001
:codex/consult-answer-clock-20261001
:codex/consult-plain-answer-20261001
:codex/rectification-varga-resolution-fix-20261001
:review/rectification-varga-resolution-20260930
:codex/jev-intent-v2-20260927
:codex/consult-evidence-card-research-20260927
:codex/people-archive-p1-20260924
:codex/chart-dasha-western-redesign-20260924
:codex/home-page-split-20260925
:codex/report-reader-main-20260924
:codex/rectification-midnight-date-anchor-20260920
:codex/rectification-cross-midnight-gate-fix-20260920
:codex/rectification-cross-midnight-20260920
:codex/owner-case-purge-20260919
:codex/rectification-jev-intent-research-fix2-20260919
:codex/rectification-jev-intent-research-fix-20260919
:codex/rectification-jev-intent-classifier-research-20260919
:docs/three-channel-redesign-20260918
:codex/session-list-single-source-fix-20260917
:codex/session-list-single-source-20260917
:codex/rectification-session-composer-guard-20260917
:codex/chart-copy-trim-20260917
:codex/rectification-dead-d9-choice-fix-20260916
:codex/rectification-mobile-timeline-readout-20260917
:codex/session-capacity-bool-assert-20260916
:codex/home-state-lowering-20260915
:codex/freeze-metric-change-20260915
:codex/rectification-engine-memoization-fix-20260915
:codex/consultation-session-capacity-20260915
:codex/consultation-context-memory-20260915
:codex/consultation-external-evidence-cache-20260915
:codex/rectification-request-dossier-cache-20260915
:codex/rectification-settled-render-split-20260915
:codex/rectification-engine-memoization-20260915
:codex/rectification-failure-attribution-20260915
:fix/sidebar-hard-nav
:codex/rectification-spoken-orphan-20260914
:codex/rectification-targeted-collect-spoken-focus-20260913
:codex/rectification-house-lord-gochara-research-20260913
:codex/rectification-new-minute-inherit-20260908
:codex/rectification-same-year-probe-dedupe-20260908
:codex/rectification-probe-replay-loss-20260908
:codex/rectification-range-delivery-fix-20260907
:codex/rectification-range-delivery-card-20260907
:codex/rectification-stale-compare-fix-20260907
:codex/rectification-declared-uncertainty-20260907
:codex/report-md-page-20260906
:codex/rectification-collect-vs-offer-consistency-20260905
:codex/rectification-probe-answer-covers-domain-20260905
:codex/rectification-quality-probe-dedupe-20260904
:codex/rectification-post-adopt-verify-20260904
:codex/report-candidate-range-20260904
:codex/report-sensitivity-crash-20260904
:codex/rectification-adopt-narration-fix2-20260904
:codex/rectification-adopt-narration-fix-20260904
:codex/rectification-adopt-narration-20260904
:codex/repo-hygiene-20260903
:codex/rectification-ux-20260903
:codex/rectification-ux-20260902
:codex/diagnose-rectification-request-20260827
:fix/staging-gate-checkout-retry
No Reviewers
Labels
Clear labels
agent/待执行
agent/待真机
agent/待规划
agent/待验收
agent/执行中
agent/排队
agent/规划中
agent/试点
agent/部署中
agent/需拍板
agent/验收中
ready-for-agent
wayfinder:map
wayfinder:task
Grok 领:按任务书实现
产品负责人真机走查
Claude 领:诊断并写任务书
Claude 领:验收 Grok 回报的 SHA
锁:Grok 执行中
任务书已写好,等前置单合入 staging 后由 Claude 改成 agent/待执行;循环两侧都不处理
锁:Claude 规划中
试点期只处理带此标签的 issue
已推 staging,等部署核对(脚本自动)
需要产品负责人决定
锁:Claude 验收中
Fully specified, ready for an agent
Wayfinder map issue holding the notes and child tickets
Wayfinder child ticket
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: root/Jyotisha#49
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
declared_accuracy/time_sourcefrom profile truth instead of letting the engine default every chart tominute+family_clear→'5min'with a missing matrix row.rectification.boundaryfollows the engine gate (precision_ok/precision_annotated/not_auto_rectified) instead of hardcodingnot_auto_rectifiedon every natal consult.'5min'varga row and grades 5min/15min copy as precision annotation, not candidate-window interaction. Hospital/rectifiedstay precise.Fixes BUG-467. Task brief:
TASK-consultation-birth-accuracy-20260901.md. Baseline containedff97de5e; branch isorigin/staging@8b7eda9fplus this fix (56daf6be).Task 0 — before (red) evidence
Frontend
tsx --test tests/consultation-birth-accuracy.test.ts tests/consultation-birth-time-mode.test.ts:declared_accuracywasundefinedvs'rectified'/'minute'; mapper not exporteddeclared_birth_window/general_no_birth_timeskip natal mapper; existing birth-time-mode guard suite stayed green;output guards and window/general instruction seams stay byte-stablePython
pytest tests/test_consultation_birth_accuracy.py:.FF.→ 2 fail / 2 pass可读主盘,但高敏分盘需要降级;get_enabled_vargas('5min') == unknown(minute, hospital)andrectifiedengine pathsAfter — per-suite counts
Typecheck
cd frontend && ./node_modules/.bin/tsc --noEmit→ exit 0 (228s warm). Coldtsc --noEmit --incremental falsealso exit 0 (1045s). Notnpx tsc.Frontend (fail=0 for product paths)
tests/consult*.test.ts(this glob also matchesconsultation-*)tests/consultation-*.test.tstests/chat*.test.tstests/rectification-*.test.tsnon-DBtests/rectification-*-database.test.tsserial + retryOfficial combined glob (
consult*+consultation-*+chat*+rectification-*) is 1035 unique tests (3consult-*+ 222 + 70 + 740). Parallel run was 1028/7 because Docker only allows 2 compose networks; the 7 failures were fixture-slot / migrate flake under contention. Serial ingest+PR-4+v9 DB: 7/10 then the 3 remaining retried 3/3. Combined fail=0.Core accuracy+guards after the fix:
consultation-birth-accuracy+consultation-birth-time-mode+consultation-route-service+consultation-context= 34/34.Python (
.venv)pytest tests/test_consultation_birth_accuracy.py tests/test_consultation_consumer_context.py tests/test_rectification_*.py→ 168 passed, exit 0._expand_pytest_targetsnail:test_staging_quick_gate_runs_rectification_python_suitepass.Red line 1 —
'rectified'only for accepted/confirmed + active timeMapper
declaredBirthAccuracyFromProfile:birth_time_status ∈ {accepted, confirmed}andactive_birth_timerectifiedrectifiedhospital_record(not adopted)minutehospitalfamily_exactminutefamily_clear→ engine'5min'15minfamily_vagueProof tests in
frontend/tests/consultation-birth-accuracy.test.ts:accepted/confirmed+ active time →{ declaredAccuracy: "rectified", timeSource: "rectified" }accepted+ no active time → notrectifiedcandidatehospital + active time → notrectified(staysminute/hospital)reportedfamily_exact + active time → notrectifiedminute/hospitaland neverrectifiedWindow/general modes never call this mapper (
serverChartis null; theirtoolInputhas no accuracy fields).Red line 2 — guards and window/general two-tier behavior unchanged
git diff origin/staging -- frontend/src/lib/timing-output-guard.tsis empty.guardPreciseTimingOutputnot edited.createBirthTimeModeOutputGuardbody is unchanged:general_no_birth_time→guardGeneralNoBirthTimeOutput;declared_birth_windowor!canAnswerPreciseTiming→guardPreciseTimingOutput.generalNoMinuteInstruction/declaredWindowInstructionnot in the consult/route.ts diff (only an extrabirthTimeSourceargument toapplyBirthTimeModeToWorkflowContext).UNVERIFIED_BIRTH_TIME_NOTICEstring is unchanged; grading is a newunverifiedBirthTimeNotice()wrapper, not a guard change.rectification: { boundary: "not_auto_rectified" }inconsultation-tools.ts(declared-window path).consultation-birth-time-modetests green while the four natal-accuracy invariants were red. After: same byte-stable test still matches those instruction strings and guard branches.Before / after workflow consumption
Before (every natal consult): no
declared_accuracyontoolInput; engine default'5min'+ missing matrix; mastrarectification.boundary = "not_auto_rectified"; model instructed to treat that as final → “未校正 / 按时间范围交互”.After (engine
_compute_rectification_gate+_build_consumer_context):(minute, hospital)minute{}rectifiedrectified{}'5min'5minbirth_time_precision_boundaryonly'15min'15minbirth_time_precision_boundaryonly1hour1hourbirth_time_uncertainty_boundary+not_auto_rectifiedMastra natal boundary:
minute/rectified+ no lagna sensitivity →precision_ok;5min/15min+ no lagna →precision_annotated; else fail-closednot_auto_rectified.Why family_exact stays
'5min'(product check)ACCURACY_RULES[('minute', 'family_clear')] = '5min'is skill methodology: family memory is not a hospital record. This task does not promote family_exact to'minute'. D10 stays enabled on the new'5min'row so career consults are not crippled. Please confirm product still wants that one-step downgrade vs hospital.Honest verification gap
Not verified on a live staging/production consult. Recommend folding into the PR #47 nine-step probe, plus one extra check: a
hospital_recordexact-minute user must not be told the time is unrectified or to interact by range.Test plan
tsc --noEmitexit 0_expand_pytest_targetsnailaccepted/confirmed+ active time) is not told the time is unrectifiedPull request closed