Repository navigation
feat(automations): finished runs, deletions and calendar moves as activities - #440
Merged
Merged
Conversation
…ivities Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019nbuG2q5wEXeUxWb8vr5HJ
19 of 22 tasks
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.
Requested by Adeel · project thread
Description
Before: the stream of activities told of new assets only, so an automation couldn't react when an email had been understood, when processing failed, when an asset was deleted or when a calendar event moved.
After: four more kinds.
asset.processedjobsjob,steps,batch; tagged with the asset's ten most mentioned entitiesasset.failedjobsstepanderrorasset.deletedlogtype,id,name,mediacalendar_event.changedlogstartTime,endTime,location,calendar,beforeHow: a
jobssource readsjobbyfinished_at(indexed), one activity per run, its actor whoever queued it; the id carries the finish time (processed-job-51-1792081450), so a run tried again is a new activity.deletion.deleteemitsasset.deletedonce per asset (key=deleted-<id>), and a failure to log never stops a deletion. When a calendar source reads an event again and its start differs from the one kept on the resource (recording.event),calendar_movedemitscalendar_event.changedonce per event and new start (key=cal-<uid>-<start>). The jobs source reads several activities at once (get_many, used by the timeline's review marks) in one query.Workflow studio M2 (content sources), part 2 of 3, after #435. Comments, notes and graph changes come next.
Motivation and Context
Workflow studio plan, module M2 (
/mnt/project-files/workflow-studio/briefs/M2.md), items 3, 4 and 7.Defaults taken (reversible): a run's tags are the asset's ten most mentioned entities; a run for an asset deleted since names it "A deleted asset"; only Google Calendar and iCal moves are noticed (events in a calendar file on storage are read as new files), and a cancelled event isn't an activity yet (both under Refine later).
Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md. (n/a: the title says it)Done questions (AGENTS.md)
GET /api/v1/activitiesand/kinds, and the MCP and assistanttimelineandevent_kindstools.make openapi.Tests:
tests/domain/test_events_content.py: runs that succeed and fail throughjobs.enqueueand the worker (a retry is a new activity, the old id is gone, filters by kind, another namespace sees none, several read at once), a deletion throughdeletion.deletelogged once, and a calendar event read again bysources._ingesta day later.🤖 Generated with Claude Code
https://claude.ai/code/session_019nbuG2q5wEXeUxWb8vr5HJ
Generated by Claude Code