Skip to content

v0.2.9 Structured Escalation & Triage - #9

Merged
Rcloudso merged 5 commits into
mainfrom
codex/v0.2.9-structured-escalation
Jul 26, 2026
Merged

v0.2.9 Structured Escalation & Triage#9
Rcloudso merged 5 commits into
mainfrom
codex/v0.2.9-structured-escalation

Conversation

@Rcloudso

@Rcloudso Rcloudso commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Product impact

Upgrades free-text escalation records into traceable structured handoff packets
and adds a bilingual, read-only admin triage queue. Administrators can see
deterministic priority, category, risk, recommended queue, missing information,
cited conversation facts, and retrieval evidence without reconstructing the
case manually.

Implementation

  • adds additive escalation_packets persistence, migration-safe legacy
    backfill, validated JSON fields, and queue indexes
  • adds versioned deterministic routing for account security, complaints,
    refunds, orders, technical issues, general support, and legacy manual triage
  • adds optional OpenAI-compatible extraction with a shared two-second deadline,
    latest-12-message context, strict schema validation, and verbatim provenance
  • atomically persists assistant message, escalation log, packet, escalation
    marker, and session status
  • adds authenticated, paginated, SQL-filtered escalation list/detail APIs
  • adds /admin/escalations with Chinese/English, light/dark, keyboard source
    focus, responsive tables, and loading/empty/error states
  • preserves public chat request/SSE fields, anonymous session ownership,
    SQLite, no-key operation, and optional conversation-detail packet

Verification

  • EMBED_PROVIDER=other npm test
  • FAQ evaluation: Top1/Top3/no-match 100% across 11 cases
  • document evaluation: Top3 100%, MRR 0.958 across 12 cases
  • mixed evaluation: 6/6 Top1
  • quality evaluation: decision accuracy 100%, zero unsafe answers
  • triage evaluation: category/priority/queue 100%, zero dangerous downgrade,
    zero account-security misroute
  • Playwright API/Web: 45/45 passed
  • EMBED_PROVIDER=other npm run build
  • git diff --check

Known limits

This release is read-only triage. It does not add assignment, notes, resolution
actions, live takeover, order tools, refund execution, background workers, or
new infrastructure.

CI follow-up

The first CI run exposed a same-millisecond ordering race: escalation queries
used random UUID text as the tie-breaker after created_at, so an older record
could be selected as the latest item. The fix uses SQLite insertion order
(rowid DESC) as the stable tie-breaker and adds a deterministic regression
with adversarial UUID ordering.

@Rcloudso
Rcloudso merged commit fac2d58 into main Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant