Skip to content

Lookout keeps news past 64 and says what it could not keep; burst gets a per-ask ledger - #653

Merged
lydakis merged 4 commits into
mainfrom
claude/project-thread-aldh9x
Nov 2, 2026
Merged

lydakis merged 4 commits into
mainfrom
claude/project-thread-aldh9x

Conversation

@lydakis

@lydakis lydakis commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

From the external reliability and progress reviews (through 5e3016e and 4a15966). No daemon code changes.

Lookout: durable backlog, then say so

George chose this on 11-02. Before this change, past HEARD = 64 waiting events the lookout dropped the oldest one with no word to anyone. A script source has no history, so an ask dropped there could not be recovered.

  • Up to sonny.lookout_waiting events wait for a subscriber. The default is 1024, and 0 means no limit. They are kept on disk in the held JSON alongside the rest of what the subscriber is still to be told, the same as before.
  • Past that limit, a newer event is not kept. The exception is an event that steers: it takes the place of the newest waiting event that does not steer.
  • The next note says what was not kept, for example: "- 40 more events from chat and ci came between 9 minutes ago and 1 minute ago, and they were not kept: 1024 were waiting for you already". That count stays on disk and is told again until a note lands. A failed note or a reconnect puts the count back.
  • The lookout log names each event that was not kept, with its source and id: {"source", "id", "skipped": "more waiting than sonny.lookout_waiting"}.
  • /status shows " · N from sources waiting" and " · N from sources not kept". The note's transcript row shows "40 not kept".
  • The "N more" line now reads "N more waiting, in the notes after this one".

Where it lands:

  • sonny/src/lookout/mod.rs: the new Unkept struct, heard_from, wake_sources, the Sourced/reconnected handling, kept/restore, and status()
  • sonny/src/lookout/sources.rs: note
  • sonny/src/transcript.rs: sourced
  • client/src/config.rs and sonny/src/config.rs: the new setting

Burst: per-ask ledger

bench/burst_ledger.py writes asks.md and asks.json for each burst run. For each of the 20 planted asks it records:

  • when the ask was released, and the note that reached the lead;
  • the lead's calls: delegated to a task, or edited by the lead itself;
  • for a code ask, its change checked on main and on every branch tip;
  • for a quick look or one of the person's calls, when the lead said it to the person;
  • how long the ask waited.

The summary adds:

  • whether main's tests pass;
  • every agent's turns, failures and tokens, recorded from agent follow --all while the run goes, so a task deleted before the end still counts;
  • the lookout's events that were not kept;
  • the run's peak RSS and CPU time.

python3 -m bench.role_eval ledger --day burst writes the ledger again for a finished run whose root is still in ~/.role-eval. docs/ROLE_EVAL.md describes the ledger, and its burst Results caveat now says the 8b0b429 runs came before this change.

Checks run

  • cargo fmt --all --check and cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo test -p sonny --bin sonny lookout: 140 passed. The full sonny suite passed before the rebase (995).
  • cargo test -p agent-client config: 14 passed
  • python3 -m unittest tests.test_role_eval: OK. This covers every ask having a ledger entry, no code check passing on the starting repo while a done change does pass, and an end-to-end ledger run.

…keep; the burst gets a per-ask ledger

George chose a durable backlog for the lookout's overflow (11-02, on the
external reliability review): "nothing fell through" needs every ask
kept, and a script source has no history to recover a dropped one from.

- Up to `sonny.lookout_waiting` events (1024; 0 for no limit) wait for a
  subscriber, on disk with the rest of what it is to be told, as before.
  Past that a newer event is not kept; one that steers takes the place of
  the newest waiting one that does not. The next note says how many, from
  which sources and when ("- 40 more events from chat and ci came between
  9 minutes ago and 1 minute ago, and they were not kept: 1024 were
  waiting for you already"); until that note lands the count is kept on
  disk and told again. The log names each one with its source and ID;
  `/status` shows what waits and what was not kept today; the note's row
  shows "40 not kept". "N more in the next note" reads "N more waiting,
  in the notes after this one".
- bench/burst_ledger.py: each burst run writes asks.md/asks.json, every
  planted ask from release to note (reached), the lead's calls
  (delegated, or edited itself), a code ask's change checked on main and
  on every branch, a quick look's or the person's call's answer in what
  the lead said, and how long it waited. The summary adds main's tests,
  every agent's turns, failures and tokens recorded from the event stream
  as the run goes (so deleted tasks count), the lookout's events not
  kept, and the run's peak memory and CPU. `role_eval ledger` writes it
  again for a finished run whose root is still there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDyPdHJg8z33aishEj
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T04:08:47.616223Z 54762d2 New commits
🔒 Security Review ✅ Completed 2026-11-02T03:22:30.366971Z 113b813 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lydakis lydakis self-assigned this Nov 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 113b81373b

ℹ️ 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".

Comment thread sonny/src/lookout/mod.rs Resolved
Comment thread sonny/src/lookout/mod.rs Resolved
Comment thread bench/burst_ledger.py Resolved
Comment thread bench/burst_ledger.py Resolved
Comment thread bench/burst_ledger.py Resolved
Comment thread bench/burst_ledger.py Resolved
…t; the ledger runs agents' code sandboxed

From Codex's review of #653:

- The lookout service reads sonny.lookout_waiting at start and with the
  rest of the settings every 15 s, and every lookout takes it; it was
  parsed and shown but never used.
- What a note under way says was not kept is kept on disk apart, as
  unkept_sending, so the note sent again after a restart says it too.
- The ledger runs the agents' code, and git in their repository, in
  `agent sandbox` (network off, writing only its own copy) with the run's
  HOME and no provider key.
- A code ask the lead began itself counts as handled.
- An ask not acted on waits until the run ended, kept in asks.json, so
  writing the ledger again later gives the same waits.
- Memory and CPU count the lead's `sonny acp` and every process under the
  run's own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDyPdHJg8z33aishEj

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00b8a26eb6

ℹ️ 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".

Comment thread bench/burst_ledger.py Resolved
Comment thread bench/burst_ledger.py Resolved
… of tests answers

From Codex's review of 00b8a26:

- Written again, the ledger keeps peak memory and CPU from the asks.json
  the run wrote, as it keeps the run's end: only the run could measure them.
- The "how many tests" quick look counts as answered by any count: an
  earlier ask adds two tests, so three is not the only right answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDyPdHJg8z33aishEj

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b483a3be5d

ℹ️ 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".

Comment thread bench/burst_ledger.py Resolved
Comment thread bench/burst_ledger.py Resolved
… ends fails

From Codex's review of b483a3b:

- The expired-test ask counts as done when some test of the session code
  fails once is_expired never says yes, however the test asserts it.
- A code check or the suite that runs past its timeout counts as failed,
  and the rest of the ledger is still written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDyPdHJg8z33aishEj
@lydakis
lydakis merged commit c8f9ef9 into main Nov 2, 2026
10 checks passed
@lydakis
lydakis deleted the claude/project-thread-aldh9x branch November 2, 2026 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants