Repository navigation
Conversation
Every launch, session end, stop, kill, rm and --prune appends one JSON line to $XDG_STATE_HOME/devlaunch/events.jsonl (~/.local/state/devlaunch by default), and aid adds aid_start and aid_end around the dl::run it hands its line to. Each line carries ts, ev, ws, repo, branch and host, and the facts of its kind: cold, seconds, stages, herdr and herdr_pane for a launch; seconds and exit for a session end; removed and bytes_freed for a prune; agent, seconds, stages and resume for aid_start. On by default. DEVLAUNCH_EVENTS=0 turns it off and DEVLAUNCH_EVENTS_PATH moves it. The sink swallows every IO error and writes each line with one append, so a log that cannot be written changes nothing about a command. The launch facts are core's, so the launch and session_end lines are written in Launch::attach, around the session. The lifecycle verbs are logged by the dl binary once each verb has succeeded; a removal reads its record before the delete takes it. The Python suite now scopes XDG_STATE_HOME so its runs stay out of the developer's log.
Reviewer's GuideThis PR introduces an enabled-by-default, persistent JSONL lifecycle log shared by dl and aid, implemented through a best-effort process-global core sink and instrumentation at session, lifecycle-verb, and aid handoff boundaries; it also documents the schema and adds broad coverage with isolated test state. Sequence diagram for aid handoff and lifecycle loggingsequenceDiagram
participant User
participant Aid as aid
participant Events as events sink
participant Dl as dl
participant Session as workspace session
User->>Aid: run aid
Aid->>Aid: pick_workspace
Aid->>Aid: pull_request_spec
Aid->>Aid: collect_prompt
Aid->>Aid: boot.finish
Aid->>Events: record AidStart
Aid->>Dl: run(dl_args)
Dl->>Events: record launch
Dl->>Session: attach_workspace
Session-->>Dl: exit status
Dl->>Events: record session_end
Dl-->>Aid: return exit code
Aid->>Events: record AidEnd
Sequence diagram for workspace lifecycle event loggingsequenceDiagram
participant User
participant Dl as dl
participant Events as events sink
participant Devpod
participant Records
User->>Dl: stop, kill, remove, or --prune
alt stop
Dl->>Devpod: stop workspace
Devpod-->>Dl: success
Dl->>Records: read workspace subject
Dl->>Events: record stop
else kill or remove
Dl->>Records: read subject before deletion
Dl->>Devpod: kill or remove workspace
Devpod-->>Dl: success
Dl->>Events: record kill or remove
else prune
Dl->>Dl: prune clone directories
Dl->>Events: record prune
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
blooop
added a commit
to blooop/dotfiles
that referenced
this pull request
Sep 29, 2026
The weekly review saw tokens and words but not time. Three logs now add it: a Claude hook (telemetry.sh) on every lifecycle event, a herdr plugin that logs focus and agent-status events, and devlaunch's event log (blooop/devlaunch#655). All three are flat JSONL that DuckDB reads in place, so a new goal is a view in sql/sources.sql and a metric file in sql/metrics/, not a code change. usage_stats.py stays the transcript ingest and the runner. Fixes become experiments in ~/.claude/usage-reviews/experiments.jsonl, each with a metric, a baseline and a check date (references/methodology.md). A daily digest prints in the first shell of the day (usage-digest), the weekly review judges experiments that are due, and a monthly retro removes what did not move its metric. usage-db opens the logs for ad-hoc questions. Also drops the two zellij-attention hooks; zellij is gone.
This branch has not been deployed
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.
dlandaidnow append one JSON line per lifecycle event to$XDG_STATE_HOME/devlaunch/events.jsonl(~/.local/state/devlaunch/events.jsonlby default).What it logs. Every line has
ts(UTC, ms),ev,ws,repo,branchandhost. Then, by kind:launch:cold,seconds(top of the command to the session),stages(theDEVLAUNCH_TIMINGstage seconds,nullwhen timing is off),herdr,herdr_panesession_end:seconds,exitstop,kill,remove: nothing more, and only when the verb succeededprune:removed,bytes_freed(nullif a clone could not be measured)aid_start:agent,seconds(aid start to the hand-off to dl),stages(pick,pr_lookup,prompt,boot_wait, each present only if the line took that step),resumeaid_end:seconds,exitLines are flat apart from
stagesand self-describing throughev, so a reader that unions by field name needs no change when a field is added.How to turn it off.
DEVLAUNCH_EVENTS=0(orfalse,no).DEVLAUNCH_EVENTS_PATHmoves the file. The sink swallows every IO error and writes each line with a singleO_APPENDwrite, so a log that cannot be written changes nothing about the command.Why. It feeds a weekly usage review that joins it with herdr's and Claude Code's logs on
DEVLAUNCH_WORKSPACE_IDandHERDR_PANE_ID.Where the hooks are.
launchandsession_endare written in core'sLaunch::attach, around the session, because the facts (cold or warm, the resolved id) are there.stop,kill,removeandpruneare written by thedlbinary after the verb succeeds. A removal reads its record before the delete takes it.dl <ws> upandcodehand over no session and write no line. The new module isdevlaunch-core/src/events.rs, switched liketiming.rs.Tests: unit tests for the line shape, the switch, the path and an unwritable path. Binary-boundary tests for each kind in
dl/tests/launch.rs,dl/tests/lifecycle.rsandaid/tests/rewrite.rs.test/conftest.pynow scopesXDG_STATE_HOME, so the Python suite stays out of a developer's real log.public-api.rest.txtis regenerated for the neweventsmodule.🤖 Generated with Claude Code
Summary by Sourcery
Add persistent, fault-tolerant lifecycle event logging across
dlandaid.New Features:
dllaunches and sessions, workspace lifecycle operations, pruning, andaidruns.Enhancements:
Documentation:
Tests:
Chores: