Repository navigation
Lookout sources: restart on a watched file, say when one is down, list topics (U6, U7, U8) - #779
Conversation
A 10-minute digest reached a task about 21 hours late: news that does not steer waited for its subscriber to rest, and a subscriber kept busy by messages from elsewhere (busy counts queued and ready turns) never did. News now waits for rest at most its window: its digest (the subscription's, else its source's), else `sonny.lookout_rest_minutes` (15 by default; 0 waits however long, as before). Then it goes as a steer, joining the running turn, and the note says why. A subscriber that rests hears everything as before; the person's words and steers go at once as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
…its source's Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
…is late Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
The cap on how long news waits for a busy subscriber to rest (lookout_rest_minutes) is superseded: George wants every delivery to be steer, queue or attach, with nothing held for the subscriber to rest, so the next commit makes every lookout note steer. This merge takes main as it is. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
The lookout held task and source news until the subscriber rested, so a subscriber others kept busy never heard it: a 10-minute digest arrived 21 hours late (M12). Sonny delivers only by steer, queue or attach, steer first, so every note now goes as a steer once its news settles: it joins the running turn at its next round, or starts one. The person's words and what a `steer` pattern marks still go at once, past any digest. A note joining a running turn ends with a line saying to act where it changes the work and carry on; one that starts a turn ends as before. lead.md says the note joins the running turn or starts one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
The tool still said the rest of the news waits until the turn ends, and that a steer cuts into the running turn: every note now joins the running turn or starts one, and what `steer` matches goes at once, past any digest. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
…list topics A source whose command's files changed since it started starts again on them within the 15 s settings reread (every word that is a path to a file, and the first word as PATH finds it), as a service manager restarts a unit on its new binary (U7). After 3 failed runs in a row, every subscription to the source hears from the lookout itself that it is down, with why and stderr's last 5 lines, again each day while it stays down, and that it works again once a run does, whatever its topic or filter (U6). A source's shape keeps the topics its last 200 events named, at most 32, newest first, and the subscriptions listing shows them under `topics` (U8). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5a13d0051
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: e5a13d0051
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
…ealth across restarts A run's stderr reader is awaited (up to a second) before the run is judged, so a down notice quotes what the command printed last. A command word that names a file from where the lookout runs, as `sh poll.sh`, is stamped too. A source's health is the runner's, kept across a restart, so one fixed by an edit is heard to work again. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e212a8d6a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…as the shell does Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55ce6b19f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… shape is read Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d80c69883f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50495c3bb6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHC3i5tCSya5Hav3ZG
Summary
This PR adds three lookout wishes George approved on 11-07 (U6, U7, U8). It is the second PR in the agreed order, after #768.
watch = ["~/bin/slack-poll"], each one starting with/or~/. When a listed file changes, appears or disappears, the lookout restarts the source on the new code within the 15 s settings reread, and logssource_stoppedwith the reason "its command changed". Only listed files are watched (George, 11-07), so a cursor the command writes isn't a reason to restart. A source keeps its health and its recently seen IDs across the restart, so an edit never resends an event.Event.lookout).subscriptionslisting shows them undertopics, so an agent knows what to put afterNAME:.Changes
client/src/config.rs: addsSource.watch(a list of files, each starting with/or~/). The commons source refuses it.sonny/src/lookout/sources.rs:Stampholds the watched files and their mtimes.Runner.setrestarts a source when its stamp changes.LastingholdsHealthandSeenper source, and is kept across restarts.emit()records an ID only once the event is sent.Healthsends the down and back notices.once()waits up to 1 s for stderr to end.Event::of_lookoutandEvent.lookoutare new and serialized.Shape.topicskeeps recency on read and is shown inlisted().sonny/src/lookout/subs.rs: inhears(), the lookout's own word on a source reaches every subscription to it.sonny/src/stamp.rs:whenis nowpub.docs/LOOKOUT.md,SECURITY.md: describe the watch list and say that a source's command and watched files must be somewhere no agent can write. Also the down paragraph and the topics listing.sonny/FEATURES.md: the sources row gets a U6-U8 entry.No daemon, protocol or schema change. No tool text changes.
Testing
cargo test -p sonnyand theagent-clientconfig tests pass. New tests:a_source_starts_again_when_its_command_file_changes(an ID seen before the edit isn't sent again)a_source_down_then_fixed_by_an_edit_is_heard_to_work_againa_source_watches_only_the_files_its_settings_lista_source_failing_runs_in_a_row_is_down_once_a_day_then_backa_shape_keeps_the_topics_named_lately_newest_firstthe_lookout_s_word_on_a_source_reaches_every_subscription_to_itcargo clippy --workspace --all-targets -- -D warningsandcargo fmtare clean.🤖 Generated with Claude Code