Skip to content

Write receipts after a partly failed run list 'Попытка N' lines without event names and keep failures a later attempt already fixed #526

Open

Description

@alex-mextner

What

Priority P2. WriteOutcomes.finalNotice (src/services/ai/write-outcomes.ts) replaces the whole reply with numbered attempts whenever one write failed. create_event outcomes have no target, so every line reads 'Создание события'. a user on a past date asked for six eye-drop events; attempts 4 (mistyped owner id → SECRETARY_ACCESS_DENIED) and 6 (invalid start_at) failed and were then created by the next rounds (two events), but the only reply was 'Это отдельные попытки… Попытка 4: Не выполнено: Создание события… Попытка 6: Результат неизвестен…': no titles, no times, and failures that no longer matter. Receipts must name each write (title + local date/time) and mark a failed attempt as superseded when a later attempt in the same run created/updated the same title and start.

Why (motivation)

A grounded receipt is only useful if the user can see which event it is about.

User impact

After a mostly successful batch the user sees an alarming debug-like list and cannot tell which event failed or whether anything is missing.

Cost of inaction

Users re-send whole batches, creating duplicates, or give up on bulk requests.

Acceptance criteria

  • Test: a run with a failed create followed by a successful create of the same title and start shows that event once as done, with its title and local time.
  • Test: a genuinely failed write still appears as not done, with its title and time, and no success is claimed for it.
  • Test: receipts in group chats still hide targets as before.

Screenshots

(none)

Deploy

Deployed: no

Links

Skipped gates

  • read-before-edit: body read via gh issue view
  • screenshots: Receipt text is asserted in tests.

Activity

  1. alex-mextner commented on Nov 4, 2026

    @alex-mextner
    OwnerAuthor

    Shipped: merged via #940.
    Merge commit: 4b2372d
    This does NOT close the ticket — acceptance still needs proof. Run task read #526 for the outstanding criteria, then task check/task done.

  2. alex-mextner commented on Nov 4, 2026

    @alex-mextner
    OwnerAuthor

    Partly shipped: PR 940, merge 4b2372d (version 0.3.2) replaces the numbered attempt ledger after a partly failed turn with a readable receipt built from the write ledger (event titles and local times, one not-done line per failed write, a later success settles earlier failures, unknown outcomes are unconfirmed; ru and en). Tests: write-receipt.test.ts, write-outcomes.test.ts. Deployed and verified on the odroid as in #908. Still open: #920 (ledger edge cases), #916, #921, #922 and the duplicate-create outcome of #929, which needs a receipt fold in write-outcomes.ts and write-receipt.ts now that the per-chat serialization change is on main. Live conversation check not done. The ticket stays open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions