You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracer: Retain model usage after Session deletion #502
#39 — Usage read model / Typert remote / Profile contract; part of #34.
What to build
Daily PersonaBot model usage remains visible after an ordinary Session is deleted or the Bot is archived, while a thorough PersonaBot purge removes its identifiable statistics; restart and reconciliation do not erase or double-count retained usage.
Acceptance criteria
Once an ordinary Orchestrator or Assignment Session history is deleted or unavailable, its daily Bot × execution role × provider/model totals remain visible in Profile.
The retained statistic contains no prompt, response, credential, or deleted-Session identifier; archiving the PersonaBot leaves totals inspectable.
A thorough PersonaBot purge removes its identifiable usage and does not leave Profile totals attributable to that Bot.
Duplicate or late event delivery, Host restart, and reconciliation preserve correct totals without clearing retained history or recounting surviving Session logs.
Automated coverage exercises public usage, source loss and purge behavior; an isolated DSH path lets a Human observe totals before and after source-history loss and restart.
Ordinary Session deletion must not clean up token statistics. This issue owns retained statistics independently of source-history availability; it does not require building a Session deletion feature first. A controlled source-unavailability experiment on real isolated DSH histories is valid E2E evidence and must be labeled honestly rather than described as a native deletion UI.
The pinned DSH 0.2.0-rc.1 SessionPersistence definition provides create/open/flush/stat/list; its Session Remote controller provides cancellation, cold reads and execution controls, but no durable Session deletion operation. session/disposed releases a live object and preserves history. BotHarness also has no public ordinary Session deletion command.
The current Usage full-table rebuild does need replacement. However, the public deletion E2E promised here first needs a production Session history deletion capability. Cancelling a Turn or manually removing JSONL files would not demonstrate that contract.
No code changed or PR created. Human has been asked whether to record the prerequisite and advance independent #503, or deliver Session deletion first. This claim remains active while resolving that delivery order.
Task: codex/local/01a0e445-0c0f-70e1-bad4-fd99c8cfaa21 (not a DSH Session)
Issue scope: Human clarified that ordinary Session deletion must not clean up token records. Persist idempotent usage independently of source-log availability; retain totals across reconciliation, restart and archive; remove Bot-identifiable usage on thorough PersonaBot purge. No new Session deletion feature.
Final head: 42ad160a48a403972997f1a07d7adccb1e865e50
Delivered: retained daily model usage with durable anonymous accounting receipts; missing source histories, restart, returning evidence and archive do not remove or inflate totals. Registry Purge clears Bot-owned statistics and blocks old-root replay. Recovery-mode/failed-filesystem Purge paths are covered.
Verification: 38 focused tests, typecheck, lint, changed-file formatting, build, and full final-head CI passed: https://github.com/BotHarness/BotHarness/actions/runs/36814040290 . CodeRabbit's one actionable recovery-mode Purge finding is fixed and resolved; final re-review is successful.
Boundary: this is a source-unavailability experiment, not a native deletion UI; existing legacy aggregates are preserved as a baseline with explicit historical-backfill limitations. No prompts, responses, provider credentials or raw deleted Session identifiers enter retained usage records.
Activity
DoodleBears commentedon Sep 30, 2026
Agent work claim
codex/local/01a0e445-0c0f-70e1-bad4-fd99c8cfaa21(not a DSH Session)codex/502-retained-model-usageDoodleBears commentedon Sep 30, 2026
Agent preflight finding
Task:
codex/local/01a0e445-0c0f-70e1-bad4-fd99c8cfaa21.The pinned DSH 0.2.0-rc.1
SessionPersistencedefinition provides create/open/flush/stat/list; its Session Remote controller provides cancellation, cold reads and execution controls, but no durable Session deletion operation.session/disposedreleases a live object and preserves history. BotHarness also has no public ordinary Session deletion command.The current Usage full-table rebuild does need replacement. However, the public deletion E2E promised here first needs a production Session history deletion capability. Cancelling a Turn or manually removing JSONL files would not demonstrate that contract.
No code changed or PR created. Human has been asked whether to record the prerequisite and advance independent #503, or deliver Session deletion first. This claim remains active while resolving that delivery order.
DoodleBears commentedon Sep 30, 2026
Agent outcome
codex/local/01a0e445-0c0f-70e1-bad4-fd99c8cfaa21DoodleBears commentedon Oct 1, 2026
Agent work claim — Retained usage statistic
codex/local/01a0e445-0c0f-70e1-bad4-fd99c8cfaa21(not a DSH Session)codex/502-retained-usage-statisticfix(usage): preserve accounting when Purge cannot delete files
test(usage): refuse Registry Purge before files in recovery mode
DoodleBears commentedon Oct 1, 2026
Agent work outcome — awaiting Human QA
codex/local/01a0e445-0c0f-70e1-bad4-fd99c8cfaa2142ad160a48a403972997f1a07d7adccb1e865e50fix(usage): retain model tokens independently of Session history (#625)
DoodleBears commentedon Oct 1, 2026
Agent work outcome
codex/local/01a0e445-0c0f-70e1-bad4-fd99c8cfaa21