GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — v0.0.15-beta.1 (3/3): Idle compaction follows OpenAI's cache; release by Obed0101 · Pull Request #145 · MendCode/MendCode

Conversation

@Obed0101

@Obed0101 Obed0101 commented Nov 11, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Part 3 of 3, stacked on part 2. Ends with the release commit (Release v0.0.15-beta.1 and v0.0.15).

Fixed

  • Idle compaction on ChatGPT and the OpenAI API no longer runs a couple of minutes after every turn: occasional cache misses no longer count as an expiry, and GPT-5.6 and later use OpenAI's 30-minute cache.

Weight: one model name kept per session entry; no new start-up, per-turn or stored work.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Obed0101 added 13 commits November 9, 2026 20:19
@Obed0101
Claude Code compacts at 200K unless a per-model point raises it, its …
c32d2b9
…compaction spend is counted, the memory graph groups each category, upgrade docs name v1's data
@Obed0101
Dream, /btw and memory extraction retry a busy provider; the code gra…
c852aff
…ph indexes a project's own repository inside a folder that ignores it
@Obed0101
Bare sub-agents (task_bare): a child with no instruction files, memor…
20d279f
…ies or skills; reads in such a session bring no nearby AGENTS.md
@Obed0101
Bare sub-agents on Claude Code run none of the user's hooks
d41cff7
@Obed0101
Bare sub-agents get no agent profile prompt and are refused on engine…
f1669e7
…s that take no run limits; a compaction in a Claude Code process's first turn is counted
@Obed0101
Computer Use no longer leaves apps slowed and sends browsers to the M…
9697c7e
…endCode extension (on in full); Claude Code's automatic compaction keeps the user's language; every tool call keeps its own row
@Obed0101
Release v0.0.14-beta.1 and v0.0.14
a14e5c4
@Obed0101
Computer Use's automatic cleanup waits until no other session is live…
87cbafc
… or starting, so it never invalidates another session's observation or window
@Obed0101
A picture the model reads shows in its tool card, also in Claude Code…
06b26e6
… sessions
@Obed0101
remote control: /remote-control pair copies /pair CODE and keeps the …
a0b5362
…code on screen, whole, until it expires
@Obed0101
remote control: the Telegram chat joins the paired session (history, …
479cd5a
…terminal turns mirrored, live progress, /sessions, /history)
@Obed0101
idle compaction: scattered cache misses are no expiry when longer gap…
e23e73a
…s still hit; GPT-5.6 and later use OpenAI's 30-minute cache
@Obed0101
Release v0.0.15-beta.1 and v0.0.15
fd777e2
@Obed0101

Obed0101 commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

MendCode: @Obed0101's MendCode worked on this pull request on one of its devices; released 2026-11-11 07:52 UTC.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Obed0101
Obed0101 commented Nov 11, 2026
View reviewed changes

@Obed0101 Obed0101 left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

MendCode review

1 finding · 🔴 1 critical
head fd777e2c157f

Merge risk: 🟡 Medium · The change affects when automatic compaction runs and therefore whether it can still read a cached conversation; overestimating retention can increase input costs, while underestimating it causes premature compaction. The learning algorithm is shared across providers, although the new model-specific defaults are limited to ChatGPT and official OpenAI API endpoints.
Change: Bug fix · Review effort: 2/5, about 15 minutes

This change makes idle-compaction defaults model-aware and allows cache-lifetime learning to tolerate short-gap misses when longer gaps reliably hit. No additional defects attributable to this stack layer were verified; the supplied performance report separately flags footprint increases of 7.9 MB after a turn and 3.3 MB at readiness. The four reader-summarized code files were inspected directly, all remaining changed hunks were read, and tests were reviewed but not executed under the read-only restriction.
Readers: 4 files went to readers instead of the review pass whole: 4 code files by gpt-6-luna (the review pass gets their summaries and the hunks of their risk spots; 1 call, up to 3 at once, 12,521 tokens counted). Their summaries are hints, not findings. 3 code files no reader could read went to the review pass whole (the reader gave no usable answer for this file).
Stacked on #144: only this pull request's own commits since #144's head 479cd5a.

Finding Where
🔴 Measured rise above the noise: tui.after.fp_mb +7.9MB; total.after.fp_mb +7.9MB; tui.ready.fp_mb +3.3MB packages/daemon/cards/cards.generated.json:2
Walkthrough

Idle compaction now remembers the model from each session's latest main usage event and selects a 30-minute fallback for GPT-5.6 and later on official OpenAI API and ChatGPT providers. Cache-lifetime learning now uses the last sufficiently sampled group with reliable hits rather than stopping at the first failing group. The change also adds regression tests, updates the cache documentation, and records the beta and stable releases.

Changes

Layer / files Summary
Cache-lifetime policy and exports
packages/protocol/src/idle-compaction-data.ts, packages/protocol/src/wire.ts
Add model-aware 30-minute defaults and public exports, and revise the observed-lifetime calculation to tolerate earlier failing groups.
Idle-compaction scheduling and tests
packages/daemon/src/idle-compaction.ts, packages/daemon/test/idle-compaction.test.ts
Pass the latest usage event's model into lifetime selection and test scattered misses, model classification, provider defaults, and the resulting schedule.
Documentation and release metadata
CHANGELOG.md, docs/prompt-cache.md, packages/daemon/cards/cards.generated.json
Document the revised lifetime policy, add v0.0.15-beta.1 and v0.0.15 release entries, and refresh the generated cards revision.
Pre-merge checks: ⚠️ 1 warning · ✅ 2 passed
Check Status Explanation
Title ✅ Passed The title accurately identifies the idle-cache timing fix, release work, and position in the stack.
Description ⚠️ Warning The description explains the behavior and motivation but does not state how it was tested. Its weight claim also needs reconciliation with the separately supplied performance measurements.
Out of scope ✅ Passed The changes fit the described cache fix and release work. The release notes summarize earlier stack work without introducing additional remote-control or image-rendering implementation changes here.
Review details
  • Files reviewed: 7 · 76 changed lines · estimated review effort 2/5, about 15 minutes
  • Profile: normal · at most 8 inline comments
  • Verification: the review pass raised no candidate findings, so no separate pass was needed
  • Cost: 350,653 tokens in (306,816 from the provider's cache) · 2,059 out
  • Readers: 4 files went to readers instead of the review pass whole: 4 code files by gpt-6-luna (the review pass gets their summaries and the hunks of their risk spots; 1 call, up to 3 at once, 12,521 tokens counted). Their summaries are hints, not findings. 3 code files no reader could read went to the review pass whole (the reader gave no usable answer for this file).
  • Stacked on #144: only this pull request's own commits since #144's head 479cd5a.

Performance (perf-attrib, base 479cd5a against head fd777e2)

perf-attrib: sube: tui.after.fp_mb +7.9MB; total.after.fp_mb +7.9MB; tui.ready.fp_mb +3.3MB. Causes: tui.after.heap.type.Function +3; tui.rest.heap.type.Function +2; tui.rest.heap.type.StructureChain +2; tui.after.heap.type.JSLexicalEnvironment +1; tui.rest.ctor.native:Blob.bytes +725B; tui.rest.ctor.object:ModuleRecord.bytes +308B; tui.rest.ctor.code:NativeExecutable.bytes +80B

base 479cd5a694c1a170b8759fedbdc3edc2627969bd (479cd5a6) vs cand fd777e2c157f0d059102ad33101c96fce2b2bc27 (fd777e2c), median of 2 faux-engine session(s) per side; flagged = beyond the noise measured on 18 base-vs-base runs (x1.5).

metric base cand diff
tui.after.fp_mb 57.4 65.3 +7.9 UP
tui.after.peak_mb 73.3 73.6 +0.3
tui.ready.fp_mb 54.8 58.1 +3.3 UP
tui.ready.peak_mb 73.3 73.5 +0.2
tui.rest.fp_mb 62.2 60.9 -1.3
tui.rest.peak_mb 73.3 73.6 +0.3
tui.after.rss_mb 133.9 108.1 -25.8 down
tui.ready.rss_mb 114 42.2 -71.8 down
tui.rest.rss_mb 93.1 105.9 +12.8 UP
tui.after.heap.extra_b 6697026 6802448 +105422
tui.after.heap.objects 241308 241306 -2
tui.after.heap.protected 19 20 +1 UP
tui.after.heap.size_b 24364946 24468960 +104014
tui.ready.heap.extra_b 2872222 2895386 +23164
tui.ready.heap.objects 217151 217214 +63
tui.ready.heap.protected 18 18 0
tui.ready.heap.size_b 19298606 19330762 +32156
tui.rest.heap.extra_b 3748634 4628262 +879628
tui.rest.heap.objects 236030 238397 +2367
tui.rest.heap.protected 18 18 0
tui.rest.heap.size_b 20955994 22075206 +1119212
tui.rest.js_code_b 4901275 5841881 +940606
tui.rest.js_live_b 19255805 19289558 +33753
tui.cpu_ms.after 6226 6400 +174
tui.cpu_ms.ready 365 371 +6
tui.cpu_ms.rest 544 542 -2
binary.bytes 72306944 72306944 0
disk.bytes 4112 4115 +3
disk.bytes_per_session 2056 2058 +2

JS object types that rose (count):

  • tui.after.heap.type.Function: 44524 -> 44527 (+3)
  • tui.rest.heap.type.Function: 44521 -> 44523 (+2)
  • tui.rest.heap.type.StructureChain: 90 -> 92 (+2)
  • tui.after.heap.type.JSLexicalEnvironment: 24574 -> 24575 (+1)

JS heap bytes by constructor that rose:

  • tui.rest.ctor.native:Blob.bytes: 1742388 -> 1743113 (+725)
  • tui.rest.ctor.object:ModuleRecord.bytes: 5504250 -> 5504558 (+308)
  • tui.rest.ctor.code:NativeExecutable.bytes: 89120 -> 89200 (+80)

Modules loaded at start: 230 -> 230, 4632729 -> 4633037 bytes of chunks; chunk sizes only in cand: [1008970, 110586], only in base: [1008942, 110306] (chunk names are hashes: the list says which changed in size, not by what name)

Reference (skill, 2026-11-03, real model): footprint 64 ready / 66 after / peak 80 MB, 2.6 KB per session. This run (faux engine, whole process tree): 58.1 / 65.3 / peak 73.6 MB, 2058 B per session.

Files (7)
  • CHANGELOG.md
  • docs/prompt-cache.md
  • packages/daemon/cards/cards.generated.json
  • packages/daemon/src/idle-compaction.ts
  • packages/daemon/test/idle-compaction.test.ts
  • packages/protocol/src/idle-compaction-data.ts
  • packages/protocol/src/wire.ts

Comment @mendcode review to review again · @mendcode pause / resume · reply to a finding with explain, fix or learn · settings in .mendcode/review.yaml

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/daemon/cards/cards.generated.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Obed0101
remote control: a joined session's running turn replays into the chat…
80f6e50
…, leaving a session drops its open questions and keeps other chats subscribed, /sessions buttons name their session; bare sub-agents get no instruction files through mentions and no extension prompt or context rewrites
Obed0101
Obed0101 commented Nov 11, 2026
View reviewed changes

@Obed0101 Obed0101 left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

MendCode review

2 findings · 🟠 1 major · 🟡 1 minor
head 80f6e501efd1 · only the commits since the last review at fd777e2

Merge risk: 🟡 Medium · The change touches shared event subscriptions, replay ordering and interactive approval state, where regressions can silently prevent a phone from following or controlling a running turn. Engine changes are narrowly guarded by existing session limits.
Change: Bug fix · Review effort: 3/5, about 30 minutes

This increment improves Telegram session switching and running-turn replay, and isolates bare sub-agents from mention-loaded instructions and extension prompt rewrites. Review found two reliability defects in the session-switching lifecycle; the supplied performance measurements show no regression beyond noise. Six files arrived with reader summaries and were checked directly in relevant spans; no changed file was left unread, and tests were not run in this read-only review.
Readers: 6 files went to readers instead of the review pass whole: 6 code files by gpt-6-luna (the review pass gets their summaries and the hunks of their risk spots; 1 call, up to 3 at once, 16,445 tokens counted). Their summaries are hints, not findings. 2 code files no reader could read went to the review pass whole (the reader gave no usable answer for this file; the reader flagged more risk spots than a summary carries, so the file goes whole).
Incremental review: only what changed since the last review at fd777e2; the rest of the pull request was reviewed then (read other files with your tools when a change depends on them).

Finding Where
🟠 Live events can advance a joining chat past the replay it needs 8/10 packages/daemon/src/channels-bridge.ts:113-115
🟡 A failed session switch loses the previous session's running-turn state 6/10 packages/daemon/src/channels-bridge.ts:110-119
Walkthrough

The Telegram bridge now identifies session buttons by session ID, preserves shared subscriptions while another chat still uses them, and clears stale questions when leaving a session. Watching a running session first reads its history and then replays events from the turn's start, with per-chat sequence tracking intended to suppress duplicates. Separately, the native engine applies existing bare-task limits to file mentions and to system-prompt and context extension handlers; idle-compaction and release changes are outside this incremental diff.

Changes

Layer / files Summary
Telegram session lifecycle and replay
packages/daemon/src/channels-bridge.ts, packages/daemon/src/channels.ts
Adds running-turn replay, per-chat deduplication, shared-subscription release, stable session buttons and current-session request guards.
Telegram regression coverage
packages/daemon/test/channels-bridge.test.ts, packages/daemon/test/channels-daemon.test.ts
Adds coverage for older session buttons, stale questions, shared subscriptions, replay deduplication and pairing during an approval.
Bare sub-agent isolation
packages/engine-native/src/engine.ts, packages/engine-native/test/run-limits.test.ts, packages/daemon/test/task-bare.test.ts
Honors noHooks for prompt and context transformations and noContextFiles for mentions, with native-engine and child-task regression tests.
Release notes
CHANGELOG.md
Documents the bare sub-agent instruction and extension isolation fixes.

Sequence diagram

sequenceDiagram
    participant Chat as Telegram chat
    participant Bridge as Channel bridge
    participant Client as Shared daemon client
    participant Daemon
    Chat->>Bridge: Pair or select session
    Bridge->>Daemon: Read recap
    Bridge->>Bridge: Assign target session and reset seen
    Bridge->>Client: watch(sessionId)
    Client->>Daemon: session.history(limit=1)
    Daemon-->>Client: Latest turn
    Client->>Daemon: Subscribe before running turn, or after latest window
    Daemon-->>Client: Replay and live events
    Client-->>Bridge: onEvent
    Bridge-->>Chat: Prompt, progress and approval messages
Loading
Pre-merge checks: ⚠️ 3 warning
Check Status Explanation
Title ⚠️ Warning The title describes idle compaction and release work, but this increment changes Telegram behavior and bare sub-agent isolation instead.
Description ⚠️ Warning The description explains the earlier compaction fix but does not explain these incremental fixes or how they were tested.
Out of scope ⚠️ Warning Telegram lifecycle fixes and bare-task isolation are not explained by the title or description. The added changelog entry documents only the bare-task portion.
Review details
  • Files reviewed: 8 · 208 changed lines · estimated review effort 3/5, about 30 minutes
  • Profile: normal · at most 8 inline comments
  • Verification: every finding was checked again by a separate pass (2 candidates judged)
  • Cost: 695,967 tokens in (600,576 from the provider's cache) · 4,740 out
  • Readers: 6 files went to readers instead of the review pass whole: 6 code files by gpt-6-luna (the review pass gets their summaries and the hunks of their risk spots; 1 call, up to 3 at once, 16,445 tokens counted). Their summaries are hints, not findings. 2 code files no reader could read went to the review pass whole (the reader gave no usable answer for this file; the reader flagged more risk spots than a summary carries, so the file goes whole).

Performance (perf-attrib, base 479cd5a against head 80f6e50)

perf-attrib: igual: nothing above the measured noise

base 479cd5a694c1a170b8759fedbdc3edc2627969bd (479cd5a6) vs cand 80f6e501efd1be3ffce29580286258750fd71cba (80f6e501), median of 2 faux-engine session(s) per side; flagged = beyond the noise measured on 18 base-vs-base runs (x1.5).

metric base cand diff
tui.after.fp_mb 56.4 56.9 +0.5
tui.after.peak_mb 72.7 73.3 +0.6
tui.ready.fp_mb 54.6 54.7 +0.1
tui.ready.peak_mb 72.7 73.3 +0.6
tui.rest.fp_mb 56.3 56.6 +0.3
tui.rest.peak_mb 72.7 73.3 +0.6
tui.after.rss_mb 135.8 136 +0.2
tui.ready.rss_mb 114 114 0
tui.rest.rss_mb 136.5 136.4 -0.1
tui.after.heap.extra_b 7423830 6768693 -655137
tui.after.heap.objects 243030 241324 -1706
tui.after.heap.protected 20 20 0
tui.after.heap.size_b 25264934 24437125 -827809
tui.ready.heap.extra_b 2871710 2872163 +453
tui.ready.heap.objects 217156 217148 -8
tui.ready.heap.protected 18 18 0
tui.ready.heap.size_b 19298622 19298851 +229
tui.rest.heap.extra_b 4632673 4627743 -4930
tui.rest.heap.objects 238456 238442 -14
tui.rest.heap.protected 18 18 0
tui.rest.heap.size_b 22086593 22080399 -6194
tui.rest.js_code_b 5849725 5843865 -5860
tui.rest.js_live_b 19291133 19291427 +294
tui.cpu_ms.after 5821 5735 -86
tui.cpu_ms.ready 364 346 -18
tui.cpu_ms.rest 517 498 -19
binary.bytes 72306944 72306944 0
disk.bytes 4086 4080 -6
disk.bytes_per_session 2043 2040 -3

JS object types that rose (count):

  • tui.after.heap.type.Function: 44526 -> 44527 (+1)
  • tui.rest.heap.type.Function: 44522 -> 44523 (+1)

JS heap bytes by constructor that rose:

  • tui.rest.ctor.native:Blob.bytes: 1742388 -> 1743266 (+878)
  • tui.rest.ctor.object:ModuleRecord.bytes: 5504250 -> 5504809 (+559)

Modules loaded at start: 230 -> 230, 4632729 -> 4633288 bytes of chunks; chunk sizes only in cand: [1009142, 251528, 110586], only in base: [1008942, 251449, 110306] (chunk names are hashes: the list says which changed in size, not by what name)

Reference (skill, 2026-11-03, real model): footprint 64 ready / 66 after / peak 80 MB, 2.6 KB per session. This run (faux engine, whole process tree): 54.7 / 56.9 / peak 73.3 MB, 2040 B per session.

Files (8)
  • CHANGELOG.md
  • packages/daemon/src/channels-bridge.ts
  • packages/daemon/src/channels.ts
  • packages/daemon/test/channels-bridge.test.ts
  • packages/daemon/test/channels-daemon.test.ts
  • packages/daemon/test/task-bare.test.ts
  • packages/engine-native/src/engine.ts
  • packages/engine-native/test/run-limits.test.ts

Comment @mendcode review to review again · @mendcode pause / resume · reply to a finding with explain, fix or learn · settings in .mendcode/review.yaml

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/daemon/src/channels-bridge.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/daemon/src/channels-bridge.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Obed0101
remote control: a chat joining a session holds its events until the w…
7c7dfba
…atch answers and reads them in order, and a switch whose watch fails leaves the chat on its session with its running turn and open requests
Obed0101
Obed0101 commented Nov 11, 2026
View reviewed changes

@Obed0101 Obed0101 left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

MendCode review

1 finding · 🟠 1 major
head 7c7dfbaada2d · only the commits since the last review at 80f6e50

Merge risk: 🟡 Medium · The change affects asynchronous session ownership and delivery of potentially sensitive prompts, answers, and approval requests. Regressions can lose session events, invalidate pending interactions, or deliver buffered output after access is revoked.
Change: Bug fix · Review effort: 2/5, about 15 minutes

This incremental change makes Telegram session switching transactional: events are buffered during a watch, then replayed in sequence order, while failed watches preserve the previous session. The test file was initially reader-summarized; I directly inspected its changed helper and regression tests, the bridge implementation, and production callers. One security regression was found in completing a watch after a chat is unpaired; tests were not run because this review permits reading only.
Readers: 1 file went to readers instead of the review pass whole: 1 code file by gpt-6-luna (the review pass gets their summaries and the hunks of their risk spots; 1 call, up to 3 at once, 9,646 tokens counted). Their summaries are hints, not findings. 1 code file no reader could read went to the review pass whole (the reader flagged more risk spots than a summary carries, so the file goes whole).
Incremental review: only what changed since the last review at 80f6e50; the rest of the pull request was reviewed then (read other files with your tools when a change depends on them).

Finding Where
🟠 Buffered session events can be sent to a chat after it is unpaired 8/10 packages/daemon/src/channels-bridge.ts:102
Walkthrough

The supplied incremental diff changes Telegram session attachment, not idle compaction or release metadata. A new join phase buffers target-session events while the watch starts; a successful attachment resets session-local state and delivers buffered events in sequence order. Failed switches retain the previous session's mirrored turn and pending questions. The same attachment path is used for session creation, restoration, and explicit switching.

Changes

Layer / files Summary
Telegram session attachment
packages/daemon/src/channels-bridge.ts
Adds buffered join and commit phases, extracts event delivery, and routes session restoration and switching through them.
Regression coverage
packages/daemon/test/channels-bridge.test.ts
Adds an asynchronous watch hook and tests for out-of-order replay during attachment and preservation of the previous session after a failed watch.

Sequence diagram

sequenceDiagram
    participant Chat as Telegram chat
    participant Bridge as Channel bridge
    participant Host as Daemon host
    Chat->>Bridge: Select session
    Bridge->>Host: watch(target)
    Host-->>Bridge: Replay and live events
    Note over Bridge: Buffer target events; retain previous session
    Host-->>Bridge: Watch result
    alt Watch succeeds
        Bridge->>Bridge: Enter target and deliver buffered events by seq
        Bridge-->>Chat: Mirrored output and requests
    else Watch fails
        Bridge-->>Chat: Report failure; preserve previous session
    end
Loading
Pre-merge checks: ⚠️ 3 warning
Check Status Explanation
Title ⚠️ Warning The title describes OpenAI idle compaction and a release, whereas the supplied incremental diff changes Telegram session attachment. Earlier reviewed commits may explain the overall title, but it does not identify this follow-up.
Description ⚠️ Warning The description explains the cache-related fix but does not describe the Telegram attachment changes or their regression coverage.
Out of scope ⚠️ Warning Both changed files concern Telegram replay and session-switch failure handling, which the supplied title and description do not explain.
Review details
  • Files reviewed: 2 · 100 changed lines · estimated review effort 2/5, about 15 minutes
  • Profile: normal · at most 8 inline comments
  • Verification: every finding was checked again by a separate pass (1 candidate judged)
  • Cost: 254,191 tokens in (199,168 from the provider's cache) · 2,861 out
  • Readers: 1 file went to readers instead of the review pass whole: 1 code file by gpt-6-luna (the review pass gets their summaries and the hunks of their risk spots; 1 call, up to 3 at once, 9,646 tokens counted). Their summaries are hints, not findings. 1 code file no reader could read went to the review pass whole (the reader flagged more risk spots than a summary carries, so the file goes whole).

Performance (perf-attrib, base 479cd5a against head 7c7dfba)

perf-attrib: igual: nothing above the measured noise

base 479cd5a694c1a170b8759fedbdc3edc2627969bd (479cd5a6, cached build) vs cand 7c7dfbaada2d109b7c06fbcdfbeb7f80c68225ef (7c7dfbaa), median of 2 faux-engine session(s) per side; flagged = beyond the noise measured on 18 base-vs-base runs (x1.5).

metric base cand diff
tui.after.fp_mb 56.8 57.7 +0.9
tui.after.peak_mb 73.4 73.7 +0.3
tui.ready.fp_mb 54.6 55.1 +0.5
tui.ready.peak_mb 73.4 73.7 +0.3
tui.rest.fp_mb 56.8 57.1 +0.3
tui.rest.peak_mb 73.4 73.7 +0.3
tui.after.rss_mb 111.7 136.2 +24.5 UP
tui.ready.rss_mb 113.9 114.4 +0.5
tui.rest.rss_mb 112.3 136.5 +24.2 UP
tui.after.heap.extra_b 6826766 6735916 -90850
tui.after.heap.objects 241346 241346 0
tui.after.heap.protected 20 20 0
tui.after.heap.size_b 24494734 24407068 -87666
tui.ready.heap.extra_b 2872148 2895374 +23226
tui.ready.heap.objects 217147 217221 +74
tui.ready.heap.protected 18 18 0
tui.ready.heap.size_b 19298756 19330942 +32186
tui.rest.heap.extra_b 4670388 4669517 -871
tui.rest.heap.objects 238440 238466 +26
tui.rest.heap.protected 18 18 0
tui.rest.heap.size_b 22121209 22122317 +1108
tui.rest.js_code_b 5886057 5885625 -432
tui.rest.js_live_b 19290886 19292515 +1629
tui.cpu_ms.after 5799 5732 -67
tui.cpu_ms.ready 362 346 -16
tui.cpu_ms.rest 503 497 -6
binary.bytes 72306944 72306944 0
disk.bytes 4078 4081 +3
disk.bytes_per_session 2039 2041 +2

JS object types that rose (count):

  • tui.after.heap.type.Structure: 16373 -> 16505 (+132)
  • tui.after.heap.type.Function: 44526 -> 44527 (+1)
  • tui.rest.heap.type.Function: 44522 -> 44523 (+1)

JS heap bytes by constructor that rose:

  • tui.rest.ctor.native:Blob.bytes: 1742388 -> 1743266 (+878)
  • tui.rest.ctor.object:ModuleRecord.bytes: 5504250 -> 5504809 (+559)

Modules loaded at start: 230 -> 230, 4632729 -> 4633288 bytes of chunks; chunk sizes only in cand: [1009142, 251528, 110586], only in base: [1008942, 251449, 110306] (chunk names are hashes: the list says which changed in size, not by what name)

Reference (skill, 2026-11-03, real model): footprint 64 ready / 66 after / peak 80 MB, 2.6 KB per session. This run (faux engine, whole process tree): 55.1 / 57.7 / peak 73.7 MB, 2041 B per session.

Files (2)
  • packages/daemon/src/channels-bridge.ts
  • packages/daemon/test/channels-bridge.test.ts

Comment @mendcode review to review again · @mendcode pause / resume · reply to a finding with explain, fix or learn · settings in .mendcode/review.yaml

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/daemon/src/channels-bridge.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Obed0101
remote control: a chat unpaired while its watch starts gets none of t…
1aed947
…he events held for it, and the watch is released
Obed0101
Obed0101 commented Nov 11, 2026
View reviewed changes

@Obed0101 Obed0101 left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

MendCode review

No findings · nothing in this change was confirmed as a problem
head 1aed947efa71 · only the commits since the last review at 7c7dfba

Merge risk: 🟡 Medium · The change touches asynchronous subscription cleanup and the authorization boundary for forwarding session content to Telegram. A regression could expose buffered session details after unpairing or interrupt a shared subscription, although the patch is localized and adds a targeted regression test.
Change: Bug fix · Review effort: 1/5, about 5 minutes

The incremental change prevents a Telegram chat unpaired during session-watch startup from receiving buffered session events, releases the abandoned watch, and adds a regression test. No introduced defects were found after inspecting the callers, pairing lifecycle, shared-watch cleanup, and serialized update handling; tests were reviewed but could not be run with the read-only tools.
Readers: 2 code files no reader could read went to the review pass whole (the diff is small: one reader call costs more than the readers' share of this review's cap, so the review pass reads it).
Incremental review: only what changed since the last review at 7c7dfba; the rest of the pull request was reviewed then (read other files with your tools when a change depends on them).

Walkthrough

The bridge now passes the chat ID into its session-joining helper and checks, after the asynchronous watch completes, that the runtime still belongs to a paired chat. If pairing was revoked, it discards buffered events, releases a successful watch, and returns a distinct cancellation result so callers avoid creating a replacement session or sending a misleading watch-failure message. The incremental diff changes only the Telegram bridge and its test coverage; it does not change idle compaction or release metadata.

Changes

Layer / files Summary
Telegram session-watch lifecycle
packages/daemon/src/channels-bridge.ts
Validate pairing and runtime identity after watch startup, release abandoned subscriptions, and propagate cancellation through session creation, switching, and restoration.
Regression coverage
packages/daemon/test/channels-bridge.test.ts
Simulate terminal-side unpairing during watch startup and assert that buffered approval details are not sent and the abandoned watch is released.

Sequence diagram

sequenceDiagram
    participant Chat as Telegram chat
    participant Bridge as Channel bridge
    participant Host as Session host
    participant Control as Terminal control
    Chat->>Bridge: Select session
    Bridge->>Host: watch(sessionId)
    Host-->>Bridge: Session events buffered during startup
    Control->>Bridge: Remove pairing and forget runtime
    Host-->>Bridge: Watch succeeds
    Bridge->>Bridge: Detect revoked pairing or stale runtime
    Bridge->>Host: unwatch(sessionId) unless another chat follows it
    Bridge-->>Chat: Answer callback: Not switched
Loading
Pre-merge checks: ⚠️ 3 warning
Check Status Explanation
Title ⚠️ Warning The title describes idle compaction and a release, whereas this incremental diff fixes Telegram unpairing during watch startup. It may describe previously reviewed commits, but it does not identify this additional fix.
Description ⚠️ Warning The description explains the cache-related compaction change but does not explain this Telegram lifecycle fix or how it was tested. The diff includes a targeted regression test, but no execution results are supplied for it.
Out of scope ⚠️ Warning Both changed files address Telegram subscription handling, which the title and description do not explain. Updating the PR description would make this incremental security-related fix explicit.
Review details
  • Files reviewed: 2 · 33 changed lines · estimated review effort 1/5, about 5 minutes
  • Profile: normal · at most 8 inline comments
  • Verification: the review pass raised no candidate findings, so no separate pass was needed
  • Cost: 133,100 tokens in (104,704 from the provider's cache) · 1,338 out
  • Readers: 2 code files no reader could read went to the review pass whole (the diff is small: one reader call costs more than the readers' share of this review's cap, so the review pass reads it).

Performance (perf-attrib, base 479cd5a against head 1aed947)

perf-attrib: nota: no total rose; inside, tui.ready.heap.objects +120

base 479cd5a694c1a170b8759fedbdc3edc2627969bd (479cd5a6, cached build) vs cand 1aed947efa71e3694ca6a5175cd0cb796b421fc6 (1aed947e), median of 2 faux-engine session(s) per side; flagged = beyond the noise measured on 18 base-vs-base runs (x1.5).

metric base cand diff
tui.after.fp_mb 57.2 57.3 +0.1
tui.after.peak_mb 73.6 74.1 +0.5
tui.ready.fp_mb 54.5 54.6 +0.1
tui.ready.peak_mb 73.6 72.8 -0.8
tui.rest.fp_mb 56.6 57.4 +0.8
tui.rest.peak_mb 73.6 74.1 +0.5
tui.after.rss_mb 110 99 -11 down
tui.ready.rss_mb 114.2 114 -0.2
tui.rest.rss_mb 110.7 102 -8.7 down
tui.after.heap.extra_b 6572579 7407713 +835134
tui.after.heap.objects 241151 243008 +1857
tui.after.heap.protected 20 20 0
tui.after.heap.size_b 24246227 25247233 +1001006
tui.ready.heap.extra_b 2856762 2895382 +38620
tui.ready.heap.objects 217090 217210 +120 UP
tui.ready.heap.protected 18 18 0
tui.ready.heap.size_b 19276138 19330403 +54265
tui.rest.heap.extra_b 3759818 3732321 -27497
tui.rest.heap.objects 235911 236014 +103
tui.rest.heap.protected 18 18 0
tui.rest.heap.size_b 20957642 20937009 -20633
tui.rest.js_code_b 4916697 4885412 -31285
tui.rest.js_live_b 19256861 19255890 -971
tui.cpu_ms.after 5503 5646 +143
tui.cpu_ms.ready 361 345 -16
tui.cpu_ms.rest 505 493 -12
binary.bytes 72306944 72306944 0
disk.bytes 4075 4077 +2
disk.bytes_per_session 2038 2039 +1

JS object types that rose (count):

  • tui.after.heap.type.Structure: 16469 -> 16508 (+39)
  • tui.ready.heap.type.UnlinkedFunctionExecutable: 14131 -> 14155 (+24)
  • tui.ready.heap.type.FunctionExecutable: 14145 -> 14168 (+23)
  • tui.ready.heap.type.SymbolTable: 3406 -> 3416 (+10)

JS heap bytes by constructor that rose:

  • tui.rest.ctor.native:Blob.bytes: 1742388 -> 1743266 (+878)
  • tui.rest.ctor.object:ModuleRecord.bytes: 5504250 -> 5504809 (+559)

Modules loaded at start: 230 -> 230, 4632729 -> 4633288 bytes of chunks; chunk sizes only in cand: [1009142, 251528, 110586], only in base: [1008942, 251449, 110306] (chunk names are hashes: the list says which changed in size, not by what name)

Reference (skill, 2026-11-03, real model): footprint 64 ready / 66 after / peak 80 MB, 2.6 KB per session. This run (faux engine, whole process tree): 54.6 / 57.3 / peak 74.1 MB, 2039 B per session.

Files (2)
  • packages/daemon/src/channels-bridge.ts
  • packages/daemon/test/channels-bridge.test.ts

Comment @mendcode review to review again · @mendcode pause / resume · reply to a finding with explain, fix or learn · settings in .mendcode/review.yaml

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Obed0101

Obed0101 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

MendCode: 1 check failed on 1aed947, which MendCode reviewed.

checks (daemon, daemon, false) (details)

checks (daemon, daemon, false)	Run ./.github/actions/checks	2026-11-11T07:32:51.3541586Z # bubblewrap tests still fail if the sandbox cannot start.
checks (daemon, daemon, false)	Run ./.github/actions/checks	2026-11-11T07:41:14.5564698Z daemon      492s  exit 1   4298 pass  21 skip  1 fail Ran 4320 tests across 509 files. [490.97s] 
checks (daemon, daemon, false)	Run ./.github/actions/checks	2026-11-11T07:41:14.5632866Z   FAIL packages/daemon/test/crash-recovery.test.ts
checks (daemon, daemon, false)	Run ./.github/actions/checks	2026-11-11T07:41:14.5641026Z       | error: expect(received).toEqual(expected)
checks (daemon, daemon, false)	Run ./.github/actions/checks	2026-11-11T07:41:14.5686049Z total       492s  FAILED
checks (daemon, daemon, false)	Run ./.github/actions/checks	2026-11-11T07:41:14.5704381Z ##[error]Process completed with exit code 1.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Obed0101
Obed0101 changed the base branch from beta-pr/2-telegram-remote to beta November 11, 2026 07:51
@Obed0101
Merge main into beta for v0.0.15-beta.1 (beta already holds v0.0.14; …
758e1ed
…the tree is main's)
Obed0101
Obed0101 commented Nov 11, 2026
View reviewed changes

@Obed0101 Obed0101 left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

MendCode review

No findings · nothing in this change was confirmed as a problem
head 758e1ededc07 · only the commits since the last review at 1aed947

Head 758e1ed has the same files as the reviewed head 1aed947: nothing changed, so no model was called.

Review details
  • Files reviewed: 0 · 0 changed lines · estimated review effort 1/5, about 5 minutes
  • Profile: normal · at most 8 inline comments
  • Verification: the review pass raised no candidate findings, so no separate pass was needed
  • Cost: 0 tokens in · 0 out
  • No code graph index: reviewed from the diff alone.

Comment @mendcode review to review again · @mendcode pause / resume · reply to a finding with explain, fix or learn · settings in .mendcode/review.yaml

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Obed0101
Obed0101 merged commit b3a2066 into beta Nov 11, 2026
10 of 11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Obed0101
Obed0101 deleted the beta-pr/3-idle-compaction-release branch November 11, 2026 08:12
@Obed0101 Obed0101 mentioned this pull request Nov 11, 2026
v0.0.15 #146
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Obed0101
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.