fix(sessions): session trail — task_dispatch reads data.task, not empty id (v0.222.1)#370
Merged
Merged
Conversation
…ty id (v0.222.1) task.dispatched keys the task id under data.task (automations.ts), but the activity classifier read data.id — so a dispatched task resolved an empty id and the trail rendered it as "deleted" with a blank summary. Read data.task (fallback data.id) so the row shows the task title + live status, and guard empty-id targets in the /api/sessions/:id/activity route so a missing id yields no status instead of a misleading "deleted". Follow-up to v0.221.0. Verified via session-trail-test.cjs (15/15) + governance (68/68). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014fS9mHadnGxa2VKhEKn7a7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the v0.221.0 session activity trail (#368), caught while testing it live.
task.dispatchedaudit events key the task id underdata.task(seeautomations.ts), but the activity classifier readdata.id— so a dispatched task resolved an empty id and the trail rendered it asdeletedwith a blank summary.Fix:
data.task(fallbackdata.id) → the dispatch row shows the task title + its live status./api/sessions/:id/activityroute guards empty-id targets, so any missing id yields no status instead of a misleading "deleted".Verification:
scripts/session-trail-test.cjsextended to cover both an id-bearing dispatch (resolves to live status) and an orphan dispatch (no target, no status) — 15/15.npm run test:governance68/68.🤖 Generated with Claude Code
https://claude.ai/code/session_014fS9mHadnGxa2VKhEKn7a7