Skip to content

feat(observe): an observed action with no baseline diffs against the owner's last read - #138

Merged
leeguooooo merged 1 commit into
mainfrom
feat/auto-baseline
Oct 6, 2026
Merged

leeguooooo merged 1 commit into
mainfrom
feat/auto-baseline

Conversation

@leeguooooo

Copy link
Copy Markdown
Owner

Why: in the usage log (2274 requests over about two days), 0 of 821 element reads used ?since, and 23 of 1010 actions asked for return=delta, most of them our own benchmarks. Plain HTTP agents never carry the snapshot token, so the diff feature went unused.

What changes:

  • The daemon remembers the last snapshot each named owner (X-Phone-Owner) was handed: an elements read, an observed action, or an observed batch.
  • An observed action that names no baseline (no since, no snapshot in the body) now diffs against that snapshot.
  • An explicit since or snapshot still wins. Anonymous clients are unchanged.
  • The map holds at most 64 owners.

Hardware measurement on v0.13.1, Settings: 通用 → 关于本机 → back → back, 2 rounds per mode.

mode daemon calls bytes the agent reads daemon time
A: action, then a full /agent/elements 16 155 KB 21.9 s
B: observed action (return=delta) 8 50 KB 44.4 s

What the numbers say:

  • Observe halves the calls (each saved call is a model turn) and cuts what the agent reads by 68%.
  • On a heavy tree it is slower on the daemon side. Settle compares tree reads (each /source is 1.3–1.7 s for ~400 KB) whenever the frames around the first read differ mid-animation. A follow-up will settle on frames first and read the tree once.
  • A whole-screen change gives a delta close to a full tree (16.9 KB for 关于本机), as expected.

Tests: an_observed_action_diffs_against_the_owners_last_read. server + mcp: 597 passed.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95327442-f773-4663-88f3-515cad3067f0
📥 Commits

Reviewing files that changed from the base of the PR and between 264351a and 0218554.

📒 Files selected for processing (4)
  • crates/server/src/http.rs
  • crates/server/src/main.rs
  • crates/server/tests/agent_input_settle.rs
  • crates/server/tests/fixtures/app_state.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…owner's last read

Usage log (2274 requests): 0 of 821 element reads used ?since and 23 of 1010
actions asked for return=delta — plain HTTP agents never carry the snapshot
token. The daemon now remembers the last snapshot each named owner
(X-Phone-Owner) was handed — an elements read, an observed action, an
observed batch — and an observed action that names no baseline diffs against
it. Explicit since / snapshot still win; anonymous clients are unchanged.
@leeguooooo
leeguooooo merged commit 2ee575a into main Oct 6, 2026
2 checks passed
@leeguooooo
leeguooooo deleted the feat/auto-baseline branch October 6, 2026 10:52
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.

1 participant