fix(rectification): close round A/2 tail gaps in tests, CI, and stale-score reuse #47
Closed
jesse
wants to merge 0 commits from
codex/rectification-tails-20260901 into staging
pull from: codex/rectification-tails-20260901
merge into: :staging
:main
:codex/full-reading-module-parity-20261018
:staging
:codex/marriage-match-p1-20261017
:codex/upstream-sync8-20261017
:codex/people-archive-limit-20-20261017
: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#47
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
Round A/2 tail work from
TASK-rectification-tails-20260901.md, based onorigin/staging@26ea3f06(task brief on top of8743dcb1).Hard red lines kept: no change to
deliveryCapability/canAdopt/canConfirmExactMinute/ engine gate semantics; CI checks only added, never removed or relaxed; skill version not bumped.Task A — window_scan
from_sign/to_signtests/test_rectification_diagnostics_clusters.py::test_window_scan_reports_d9_diversity_with_sign_namesexpected{layer, at, user_meaning}only.window_scanalready emitsfrom_sign/to_sign(金牛座→天蝎座); that contract is used by frontend varga contrast. The assertion was updated to include those fields. The engine output was not stripped.Before (
unitteston this test):After:
Full discover after the fix:
PYTHONPATH="$PWD:$PWD/scripts" python -m unittest discover -s tests -p "test_*rectification*.py"→ 79 tests, 0 fail.Task B — why the red test was invisible in CI
.gitea/workflows/backend-quality-gate.ymlpush: branches: [staging](auto)python scripts/run_quality_gate.py --profile quick --skip-yoga-logic --skip-frontend-runtime.gitea/workflows/test.ymlworkflow_dispatchonlypython -m pytest.gitea/workflows/ci.ymlworkflow_dispatchonlyThe auto staging gate’s pytest list is
CORE_PYTEST_TARGETSinscripts/run_quality_gate.py. That list hadtests/test_candidate_discriminator_contract.py(BUG-393) but nottests/test_*rectification*.py. The diagnostics assertion could stay red onorigin/stagingindefinitely because the only pipelines that would have seen it never run on push.Fix (add-only): append
"tests/test_rectification_*.py"toCORE_PYTEST_TARGETS. No workflow trigger conditions were changed; no existing target was removed. A pin test (test_staging_quick_gate_runs_rectification_python_suite) keeps the glob in that list.python -m pytest tests/test_rectification_*.pylocally: 137 collected, 0 fail. This PR does not claim a green Gitea run untilbackend-quality-gateactually executes on this SHA, and does not claim staging deployed.Task C — human smoke sheet (not executed)
No staging/production credentials in this session. Do not treat this as pass or fail. Leave the sheet for someone who can open
https://staging.jyotisha.chatafter this SHA is on staging.Executor: unassigned
Environment: not run
Time: not run
display_date_labelcurrent_questionis non-empty or case is adoptable (non-terminal exit)can_adopt=true,can_confirm_exact_minute=falsecandidate_accepted, writesaccepted(not confirmed), entersverify_adopted_time(at most two items)prospective_probesnarrated if presentf83d9b42(if still reachable): GET refresh is adoptable; adopt succeedsalgorithm_version=rectification-v5-matrix-scoring-7,policy_version=rectification-candidate-policy-v3, audit row 「换运贴近度」Any mismatch → new BUG record, no drive-by code change.
Task D — option 1 (chosen)
Choice: option 1. Stale stored
policy_version/algorithm_versionis treated as “must rescore” on the compare-candidates cache skip inscoreAndPersistCurrentEvidence.Why not 2: GET overlay
scoreableSnapshotCurrentFromDossiercopying stored policy onto both sides is a display-staleness signal. It does not force the compare path that actually writes a new result. Adopt is already allowed; the miss is transition-proximity rescoring, which lives on compare.Why not 3: Idle cases would keep v6/v2 scores until the next evidence write. That leaves “换运贴近度” off the card after a policy bump even when the user compares again with unchanged evidence.
Why 1: Smallest change that hits the real skip (
evidenceLedgerFingerprint+candidateRangeFingerprintonly). Live identity is not hardcoded asv3/matrix-scoring-7in TS. Order:RECTIFICATION_DECISION_POLICY_VERSION/RECTIFICATION_ALGORITHM_VERSIONRECTIFICATION_ENGINE_VERSIONonly when it is not the coarse product idrectification-v5GET /api/rectification/v5/versions, which returns the samealgorithm_version/decision_policy_versionfields as/api/rectification/v5/scorewithout scoringCache reuse still uses the existing persist idempotency keys. No silent batch rescore of all cases. Old results keep
invalidated_at/ superseded semantics. Matching fingerprints + matching live identity still skip the engine (existing test updated to mock GET versions).New tests:
matching fingerprints still rescore when stored policy lags the live enginecompare-candidates rescores when stored policy lags the live engineVerification
unittest discover -s tests -p "test_*rectification*.py": 79, fail=0python -m pytest tests/test_rectification_*.py: 137, fail=0cd frontend && ./node_modules/.bin/tsc --noEmit: exit 0tsx --test tests/rectification-*.test.ts tests/skill-registry.test.ts: 756 pass, fail=0 (rectification ≥738; skill-registry 16/16)Not done here: FF-push to
staging, Task C smoke, skill bump.Follow-up — expand pytest globs before argv (
901cdb96)run()usessubprocess.run(..., shell=False), so a literaltests/test_rectification_*.pyin argv is not expanded by a shell. A pin that only asserted the glob string existed could stay green while pytest never collected those files._expand_pytest_targets()now expands targets containing*?[viaROOT.glob, sorted, relative toROOT. Zero matches raiseSystemExit. Ordinary paths are kept as-is. The gate calls:The pin
test_staging_quick_gate_runs_rectification_python_suitenow also imports_expand_pytest_targetsand asserts the glob expands to ≥6 files (zero-match glob raisesSystemExit).CORE_PYTEST_TARGETS rerun (no shell glob)
Invoked as Python argv after
_expand_pytest_targets(CORE_PYTEST_TARGETS)— notpytest tests/test_rectification_*.pyvia zsh.Pull request closed