Commit Graph

736 Commits

Author SHA1 Message Date
Jesse_Chen 53eb815c95 fix(rectification): read credible_range as the still-valid union
Write and read used different range definitions at the same lead of 8, so a real separation always fail-closed the candidate projection.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 23:12:16 +08:00
Jesse_Chen 7de36e11d6 fix(rectification): align leftover prompt and focus tests with the shrunk agent contract
Independent Staging Quality Gate / validate (push) Successful in 27m23s
Independent Staging Quality Gate / publish (push) Successful in 52m48s
Independent Staging Quality Gate 2141 failed because four tests still matched the old Mastra prompt wall and treated an unrenderable focus as null.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 20:56:58 +08:00
Jesse_Chen 63b4591aae fix(rectification): surface dropped probes and filter tools by the decision
Independent Staging Quality Gate / validate (push) Failing after 17m9s
Independent Staging Quality Gate / publish (push) Has been skipped
Silent unrenderable discriminators, a missing question-contract golden, and a always-on tool table were hiding fail-closed drops behind the prompt wall.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 20:31:15 +08:00
Jesse_Chen 69c3e94920 fix(rectification): share decideFromDossier across projections and treat a sole candidate as a close, not a tie
Independent Staging Quality Gate / validate (push) Successful in 11m43s
Independent Staging Quality Gate / publish (push) Successful in 40m51s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 19:21:28 +08:00
Jesse_Chen 30d8c78d19 fix(rectification): fail-close snapshot fingerprints without rewinding discrimination
Independent Staging Quality Gate / validate (push) Successful in 11m24s
Independent Staging Quality Gate / publish (push) Successful in 15m48s
Missing evidence fingerprints are stale, not current. Stale snapshots keep asking discriminators when a probe exists, and offer-candidates refuses until the ledger matches.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 18:42:18 +08:00
Jesse_Chen 0eb740a6b8 fix(rectification): keep holdout, D9 probes, and asked keys on the decision boundary
Independent Staging Quality Gate / validate (push) Successful in 10m33s
Independent Staging Quality Gate / publish (push) Successful in 16m24s
Reserve a month-or-better holdout, degrade unsigned D9/D10 to existence, and treat ledger keywords as mention-only so remaining discriminators stay in the pool.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 18:04:34 +08:00
Jesse_Chen 68f0759eef fix(rectification): persist the next interview after a choice tap
Independent Staging Quality Gate / validate (push) Successful in 13m56s
Independent Staging Quality Gate / publish (push) Successful in 16m46s
Closing a discriminator used to leave GET without a card after refresh.
Write the next dated question in the same request, skip childhood career
and move probes, and do not continue a read-only turn when that question
is already persisted.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 16:30:09 +08:00
Jesse_Chen 8c75ebb196 fix(rectification): keep discriminating after training gate without family coverage
Independent Staging Quality Gate / validate (push) Successful in 10m13s
Independent Staging Quality Gate / publish (push) Successful in 9m43s
Family and occupation method layers were blocking discrimination even when
training events were complete and a discriminator probe existed, so the agent
only acknowledged evidence and stopped.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 12:04:40 +08:00
Jesse_Chen 589ada6d03 fix(rectification): typecheck answered probe_id for staging publish
Independent Staging Quality Gate / validate (push) Successful in 10m47s
Independent Staging Quality Gate / publish (push) Successful in 11m26s
Docker next build failed on ProbeAnswer.id and optional decisionReceipt,
so staging never received the month-lock SHA.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 11:00:18 +08:00
Jesse_Chen 797a423af7 fix(rectification): refresh 10.0.13 package hash after month-lock copy
Independent Staging Quality Gate / validate (push) Successful in 9m38s
Independent Staging Quality Gate / publish (push) Failing after 7m18s
The quality gate binds the hashed rectification skill; the engine-month
wording changed those bytes without updating the registry.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 10:33:39 +08:00
Jesse_Chen 68a78af9e1 fix(rectification): ask reverse-inference probes at engine dasha months
Independent Staging Quality Gate / validate (push) Failing after 8m39s
Independent Staging Quality Gate / publish (push) Has been skipped
Keep Vimshottari/Narayana start dates instead of truncating to year, so
same-year month splits can appear on the choice card.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 10:20:05 +08:00
Jesse_Chen 4767b34ff0 fix(rectification): skip covered-domain existence probes, then pick max gain
Independent Staging Quality Gate / validate (push) Successful in 9m42s
Independent Staging Quality Gate / publish (push) Failing after 8m9s
Dated evidence in a domain no longer yields another existence question
in that domain. Remaining varga discriminators all stay in the pool so
the next card is whichever unused split scores highest.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 09:59:45 +08:00
Jesse_Chen ca6252ecb6 fix(rectification): ask from the scored probe catalog, not snapshot leftovers
Independent Staging Quality Gate / validate (push) Successful in 9m30s
Independent Staging Quality Gate / publish (push) Has been cancelled
Empty snapshot candidates were starving remaining D24 splits, so the
TypeScript follow-up chain asked the low-gain Python career probe.
Read paths now share one inference+engine catalog and yield a stale
low-gain distinguish card to the current winner.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 09:48:57 +08:00
Jesse_Chen 4bf074b2bf fix(rectification): show choice-card prompt instead of hiding it
Independent Staging Quality Gate / validate (push) Successful in 9m18s
Independent Staging Quality Gate / publish (push) Successful in 6m59s
BUG-401 hid the legend to avoid duplicating Agent copy. After the
question contract, the Agent only leads in, so the persisted stem
must be visible on the card.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 09:10:56 +08:00
Jesse_Chen 3ae22f5768 test(rectification): expect unsure outcome on remaining D24 splits
Independent Staging Quality Gate / validate (push) Successful in 10m14s
Independent Staging Quality Gate / publish (push) Successful in 10m7s
The four-option probe contract adds a non-scoring unsure row; keep the D24 discriminator assertion aligned with that packet shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 01:06:30 +08:00
Jesse_Chen 7f82428b44 fix(rectification): unify discriminator question contract and rank by information gain
Independent Staging Quality Gate / validate (push) Failing after 11m51s
Independent Staging Quality Gate / publish (push) Has been skipped
Python and TypeScript now share a four-option probe contract, persist Focus before asking, and pick the highest-value renderable probe instead of preferring low-gain career events over D24.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 00:25:35 +08:00
Jesse_Chen 85db4591d3 fix(rectification): resolve typed focus answers deterministically
Independent Staging Quality Gate / validate (push) Successful in 19m52s
Independent Staging Quality Gate / publish (push) Successful in 53m47s
2026-08-27 20:31:05 +08:00
Jesse_Chen f3327235ea fix(rectification): remove static interview fallbacks
Independent Staging Quality Gate / validate (push) Successful in 10m50s
Independent Staging Quality Gate / publish (push) Successful in 13m29s
2026-08-27 16:40:47 +08:00
Jesse_Chen 5f855c610c fix(rectification): keep candidate state coherent
Independent Staging Quality Gate / validate (push) Failing after 15m32s
Independent Staging Quality Gate / publish (push) Has been skipped
2026-08-27 13:59:38 +08:00
Jesse_Chen 518119acbd fix(rectification): continue after structured choices
Independent Staging Quality Gate / validate (push) Successful in 12m35s
Independent Staging Quality Gate / publish (push) Successful in 15m16s
2026-08-27 09:23:32 +08:00
Jesse_Chen 1c0ee8db13 fix(rectification): reject synthetic stale probes
Independent Staging Quality Gate / validate (push) Successful in 13m3s
Independent Staging Quality Gate / publish (push) Successful in 16m3s
2026-08-27 00:28:14 +08:00
Jesse_Chen 7d6b88c886 fix(rectification): honor persisted probe focus
Independent Staging Quality Gate / validate (push) Successful in 14m51s
Independent Staging Quality Gate / publish (push) Successful in 17m0s
2026-08-26 22:17:15 +08:00
Jesse_Chen 60cbe8a75e fix(web): read migration filenames through a definer instead of app_runtime
Independent Staging Quality Gate / validate (push) Successful in 19m18s
Independent Staging Quality Gate / publish (push) Successful in 33m22s
Staging web never became healthy because /api/health selected migration.schema_migrations as app_runtime, which is forbidden, so Docker rolled the image back.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 20:21:49 +08:00
Jesse_Chen b1173f7245 fix(web): count only training events for discrimination and split user-stop from validated range
Three collected events with a reserved holdout were stalling because the discriminator door counted holdout. Public selection_allowed still had snapshot fallbacks, and health only proved the image SHA.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 19:36:04 +08:00
Jesse_Chen a0ce55f066 fix(web): drive rectification from candidate contrast and allow range close
Independent Staging Quality Gate / validate (push) Successful in 11m17s
Independent Staging Quality Gate / publish (push) Failing after 9m28s
Showing a choice card is no longer treated as completion. Distinguish probes
require real candidate groups, holdout stays out of scoring, and ordinary
sessions can finish with a credible range instead of an exact-minute gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:19:26 +08:00
Jesse_Chen 7718317d69 fix(web): keep career quality off the gate and let the agent write stems
Independent Staging Quality Gate / validate (push) Successful in 11m41s
Independent Staging Quality Gate / publish (push) Successful in 15m44s
Exam-quality cards may still jump ahead of adoption, but career years stay on method rotation. Server stamps only period and family; spoken questions remain model-authored.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 12:39:05 +08:00
Jesse_Chen 7416e02fa9 fix(web): stamp exam-quality cards and raise rectification timeouts
Independent Staging Quality Gate / validate (push) Successful in 12m43s
Independent Staging Quality Gate / publish (push) Successful in 17m3s
Recorded-year quality probes were spoken-only, so the interview had no
choice card. Compare also re-scored after batch until the 105s attempt
aborted the turn.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 10:18:57 +08:00
Jesse_Chen 9326b7d0a4 fix(web): accept unknown stream payload when binding spoken prompts
Independent Staging Quality Gate / validate (push) Successful in 21m40s
Independent Staging Quality Gate / publish (push) Successful in 11m12s
Publish next build failed because the spoken-bind helper required result/output
on chunk payload, which the runner stream type does not have.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 00:27:49 +08:00
Jesse_Chen 97b02aef5d fix(web): hold reverse-inference cards until acceptance event quality
Independent Staging Quality Gate / validate (push) Successful in 22m10s
Independent Staging Quality Gate / publish (push) Failing after 7m28s
Conflict probes were jumping after one dated event, so the interview asked
another domain before method collection. Spoken replies now follow the
stamped choice prompt instead of a topic denylist.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 23:53:42 +08:00
Jesse_Chen 37c5c8d356 fix(web): keep spoken rectification prompts on the server choice card
Independent Staging Quality Gate / validate (push) Successful in 18m9s
Independent Staging Quality Gate / publish (push) Successful in 12m9s
Evidence writes now return the persisted open_question so the model asks that stem instead of a second education probe, and the jump-to-latest chip is centered again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 23:11:23 +08:00
Jesse_Chen 69ebbb9917 fix(web): stop writing choice-card visibility into a ref during render
Independent Staging Quality Gate / validate (push) Successful in 11m56s
Independent Staging Quality Gate / publish (push) Successful in 17m31s
Staging lint failed on react-hooks/refs after the jump overlay fix.
Keep the latest card-open flag in the existing layout effect so ESLint
passes and the overlay still stays off the choice card.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 21:26:26 +08:00
Jesse_Chen f5e73ef326 fix(web): rank remaining-minute probes by split and match choice kind
Independent Staging Quality Gate / validate (push) Failing after 22m30s
Independent Staging Quality Gate / publish (push) Has been skipped
Choice cards used a hardcoded domain menu and always asked existence.
Rank scoring layers by remaining-minute entropy, keep finance and health
volunteer-only, and ask D9/D10 style or exam quality so taps match outcomes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 20:44:55 +08:00
Jesse_Chen 7a4360d848 fix(web): keep rectification stages aligned and stop jump overlay covering choices
Independent Staging Quality Gate / validate (push) Failing after 11m44s
Independent Staging Quality Gate / publish (push) Has been skipped
Progress and spoken text shared a 24px consultation-report gap, and the jump chip covered option D. Put D-chart names back on the activity strip from evidence rescore methods.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 19:31:14 +08:00
Jesse_Chen a658ef8d2b fix(web): stop rectification interview when remaining minutes no longer split
Coverage-complete ties stayed in discrimination because whole-window D9/D24 follow-ups were treated as probes, and restated dates inserted duplicate evidence. Skip encoded remaining layers, ask leftover D4 or offer a provisional range, and dedupe dated rows by kind and date.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 19:02:35 +08:00
Jesse_Chen 4a400bff10 fix(web): sync activity-receipt contract with live model replies
The staging quality gate scanned the old settled.spoken streaming state after the live path started rendering answer.delta as raw.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 16:56:00 +08:00
Jesse_Chen 5e34dd69ce fix(web): keep rectification replies as model text, hide thinking
Give the interview a hidden reasoning channel so planning leaves the spoken reply, publish terminal text-delta as-is, and stop regex or Case templates from replacing the model.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 16:34:25 +08:00
Jesse_Chen d7afe5b50d fix(web): restore rectification discriminator cards and stop-offer path
Coverage-complete ties never persisted A/B/C/D because contrast probes were stamped with an answered education quality probe, remaining minutes were asked as window D10 signs, and 「没有了」 missed the stop pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 14:41:48 +08:00
Jesse_Chen 32f7d774b6 fix(web): keep rectification interview planning out of the spoken answer
Thinking is disabled, so Chinese process talk after tools arrives as
text-delta. Widen the leak-net so tool-label echoes and internal field
names stay out of answer.delta, and keep the user-facing follow-up.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 12:55:34 +08:00
Jesse_Chen 01ac4b9b56 fix(web): treat duplicate rectification tool calls as idempotent
Aborting the turn on a second identical public tool-call failed staging
after evidence and compare had already succeeded. Skip the duplicate
receipt instead and let maxSteps bound real loops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 11:46:20 +08:00
Jesse_Chen 3519cf253e fix(web): restore server supabase import for rectification agent route
BUG-368 dropped createServerSupabaseClient while keeping the call, so staging publish failed at next build after validate skipped the production build.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 10:52:33 +08:00
Jesse_Chen d2d7542df1 fix(web): use const for unused-reassign inference ledger receipt
The staging quality gate already passed 2006 frontend tests, then ESLint failed on prefer-const in the BUG-367 test helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 10:12:08 +08:00
Jesse_Chen 2325b30227 fix(web): sync staging gate contracts with choice billing and new tables
BUG-367/368 expanded the agent action enum, dropped public thinking traces, and added two business tables, but the quality-gate source scans and exact public table list were still on the old snapshots.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 09:52:21 +08:00
Jesse_Chen fe87a9ecdb fix(web): isolate rectification answers from tool-step planning text
Mastra intermediate text-delta was published as answer.delta, then set-focus domain errors reset the attempt and replayed evidence. Publish only the terminal no-tool step, persist the next probe on the server, and ground batch quotes in the source turn.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 21:26:57 +08:00
Jesse_Chen 3659519bd0 fix(web): apply rectification choice cards without invoking the agent
Clicking A/B/C/D or stop must persist the answer, close the probe, and
update posteriors in one idempotent transaction instead of sending the
option text as a chat message.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 18:38:05 +08:00
Jesse_Chen 3f1998bdb6 fix(web): stop adopting tied rectification candidates after method coverage
Independent Staging Quality Gate / validate (push) Has been cancelled
Independent Staging Quality Gate / publish (push) Has been cancelled
Coverage complete only unlocks discrimination. A 34/33/33 window plus an
occupation note must ask a D9/D10 contrast probe instead of offering a
stale winner card.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 12:19:36 +08:00
Jesse_Chen 3b785b821d fix(web): unblock staging web image typecheck for inference probes
Independent Staging Quality Gate / validate (push) Has been cancelled
Independent Staging Quality Gate / publish (push) Has been cancelled
Docker next build rejected 909de8b8 because engine probe outcomes, reverse-verify source checks, and a nullable window scan failed TypeScript.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 09:40:48 +08:00
Jesse_Chen 909de8b884 fix(web): persist rectification C/D answers on an append-only inference ledger
Independent Staging Quality Gate / validate (push) Failing after 4m0s
Independent Staging Quality Gate / publish (push) Has been skipped
Engine result rows stay immutable. Choice answers append transitions, and reads overlay the latest revision instead of patching the cached receipt.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 08:22:01 +08:00
Jesse_Chen 29750d3835 fix(web): persist C/D rectification answers without waiting for rescore
Independent Staging Quality Gate / validate (push) Failing after 9m53s
Independent Staging Quality Gate / publish (push) Has been skipped
Choice C/D without new evidence never changed the candidate posterior until the next dated-event rescore, and persist-v2 would cache-hit on the same evidence fingerprint. Patch the latest decision_receipt.inference_state in place so the next follow-up sees the asked split immediately.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 22:41:01 +08:00
Jesse_Chen 75dbab08b9 fix(web): offer representative time after occupation notes cover
Dateless occupation_note stayed draft, so classic coverage never finished
and offer-candidates stayed blocked. Confirm those notes, stop crowding
dasha probes with encoded exam quality, and adopt once blocking methods
are covered.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 17:21:49 +08:00
Jesse_Chen 6b225a288c fix(web): keep later thinking below rectification tool steps
BUG-360: stream thinking and tool activity as an ordered trace so later CoT opens under 正在整理 instead of filling the first 思考 block.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 17:02:06 +08:00