GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — v0.0.16-beta.1 (4/4): queued message stays as steering, review fixes, --fast; release by Obed0101 · Pull Request #153 · MendCode/MendCode Conversation
|
|
MendCode: @Obed0101's MendCode worked on this pull request on one of its devices; released 2026-11-12 19:41 UTC. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
1 finding · 🟠 1 major
head 92f2f24a9220
Merge risk: 🟡 Medium · The change crosses asynchronous engine lifecycle events, actor queue ownership, and persisted queue snapshots. Regressions can misrepresent message delivery or disrupt queue operations, although the scope is concentrated in Claude Code steering.
Change: Bug fix · Review effort: 2/5, about 15 minutes
This change keeps messages handed to Claude Code visible as steering until consumption is acknowledged, and publishes the v0.0.16-beta.1/v0.0.16 release notes. Review of this stack's own changes found a queue-capacity regression that can make persisted queue snapshots invalid. The four reader-summarized code files were checked directly alongside the other changed hunks; tests were not run because this review permits read-only investigation.
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, 11,731 tokens counted). Their summaries are hints, not findings. 4 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).
Stacked on #152: only this pull request's own commits since #152's head 2770e95.
| Finding | Where | |
|---|---|---|
| 🟠 | Include in-flight steering messages in queue admission limits 8/10 | packages/kernel/src/session-actor.ts:223 |
Previously, taking a queued message immediately moved it into the transcript, even when Claude Code had not consumed it yet. This change introduces an acknowledgment callback and an in-flight collection: those messages remain visible as non-editable steering entries until acknowledged, return to the queue if rejected, or become transcript items when the turn ends without an acknowledgment. It also updates the documentation and release notes.
Changes
| Layer / files | Summary |
|---|---|
Queue acknowledgment contract and actor state packages/kernel/src/ports.ts, packages/kernel/src/session-actor.ts |
Adds the optional read acknowledgment, tracks in-flight steering messages, and updates queue listings and transcript insertion without changing the protocol's queue schema or admission limits. |
Claude Code lifecycle integration packages/engine-claude/src/engine.ts |
Associates queued-message callbacks with command UUIDs and reports consumption or rejection through Claude Code lifecycle events. |
Regression coverage packages/engine-claude/test/engine.test.ts, packages/kernel/test/queue-steer.test.ts |
Checks acknowledgment timing, steering visibility, prevention of duplicate taking, rejection requeueing, and turn-end fallback. |
Documentation and release metadata CHANGELOG.md, docs/claude-code.md, packages/daemon/cards/cards.generated.json |
Documents pending steering behavior, adds stable and beta release sections, and refreshes the generated cards revision. |
Sequence diagram
sequenceDiagram
participant Actor as Session actor
participant Engine as Claude engine
participant Claude as Claude Code
Engine->>Actor: takeQueued({whileTools: true})
Actor-->>Engine: Message with read callback
Note over Actor: Keep visible as steering; disallow editing
Engine->>Claude: User message with command UUID
Claude-->>Engine: command_lifecycle
alt Message started
Engine->>Actor: read(true)
Note over Actor: Remove steering entry and emit transcript item
else Message dropped
Engine->>Actor: read(false)
Note over Actor: Return entry to pending queue
end
| Check | Status | Explanation |
|---|---|---|
| Title | ✅ Passed | The title accurately identifies the queued-steering behavior and release work. |
| Description | The description explains the behavior and release relationship, but does not state how the change was tested. Added regression tests cover the main acknowledgment paths. | |
| Out of scope | ✅ Passed | The implementation, tests, documentation, and revision update support the stated steering fix and release. Features inherited from the parent stack were not treated as new changes. |
Performance (perf-attrib, base 2770e95 against head 92f2f24)
perf-attrib: baja: tui.after.heap.protected -1
base 2770e953f006908a800ac9b63b04079013263ea2 (2770e953) vs cand 92f2f24a92209d32b7dc128c94671afadacc0b09 (92f2f24a), 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.7 | 57.4 | +0.7 |
| tui.after.peak_mb | 73.2 | 73.2 | 0 |
| tui.ready.fp_mb | 54.7 | 54.6 | -0.1 |
| tui.ready.peak_mb | 73.2 | 73.2 | 0 |
| tui.rest.fp_mb | 56.4 | 57.1 | +0.7 |
| tui.rest.peak_mb | 73.2 | 73.2 | 0 |
| tui.after.rss_mb | 137.7 | 115.3 | -22.4 down |
| tui.ready.rss_mb | 114.3 | 114.1 | -0.2 |
| tui.rest.rss_mb | 138.1 | 115.5 | -22.6 down |
| tui.after.heap.extra_b | 6712251 | 7739444 | +1027193 |
| tui.after.heap.objects | 240631 | 244046 | +3415 |
| tui.after.heap.protected | 20 | 19 | -1 down |
| tui.after.heap.size_b | 24308795 | 25681524 | +1372729 |
| tui.ready.heap.extra_b | 2895908 | 2872728 | -23180 |
| tui.ready.heap.objects | 218123 | 218070 | -53 |
| tui.ready.heap.protected | 18 | 18 | 0 |
| tui.ready.heap.size_b | 19395412 | 19364296 | -31116 |
| tui.rest.heap.extra_b | 4665368 | 3757377 | -907991 |
| tui.rest.heap.objects | 239295 | 236800 | -2495 |
| tui.rest.heap.protected | 18 | 18 | 0 |
| tui.rest.heap.size_b | 22174434 | 21014961 | -1159473 |
| tui.rest.js_code_b | 5889816 | 4923046 | -966770 |
| tui.rest.js_live_b | 19346286 | 19313037 | -33249 |
| tui.cpu_ms.after | 7946 | 7988 | +42 |
| tui.cpu_ms.ready | 576 | 498 | -78 |
| tui.cpu_ms.rest | 649 | 682 | +33 |
| binary.bytes | 72339776 | 72339776 | 0 |
| disk.bytes | 4112 | 4116 | +4 |
| disk.bytes_per_session | 2056 | 2058 | +2 |
JS object types that rose (count):
JS heap bytes by constructor that rose:
Modules loaded at start: 231 -> 231, 4639641 -> 4640775 bytes of chunks; chunk sizes only in cand: [29263], only in base: [28129] (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.4 / peak 73.2 MB, 2058 B per session.
CHANGELOG.mddocs/claude-code.mdpackages/daemon/cards/cards.generated.jsonpackages/engine-claude/src/engine.tspackages/engine-claude/test/engine.test.tspackages/kernel/src/ports.tspackages/kernel/src/session-actor.tspackages/kernel/test/queue-steer.test.tsComment @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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
MendCode: 1 check failed on 92f2f24, which MendCode reviewed. checks (daemon, daemon, false) (details) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… a message queued during an approval is offered once it is answered; the Discord test's owner id cannot match a temporary path
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No findings · nothing in this change was confirmed as a problem
head 1a529ca1ecd7 · only the commits since the last review at 92f2f24
Merge risk: 🟡 Medium · The changes touch the shared session actor's queue limits and approval-to-engine notification timing. A regression could reject valid submissions or delay queued messages, although the patch does not change persistence formats or engine interfaces.
Change: Bug fix · Review effort: 1/5, about 5 minutes
The incremental change counts engine-held unread messages toward the queue limit and notifies the engine when the last pending approval is resolved, with focused regression tests and a Discord test-fixture correction. No introduced defects were verified; risk is medium because the runtime changes affect shared queue admission and approval timing. Review was read-only, so tests were not run; the supplied performance measurements show no increase beyond measured noise.
Readers: 3 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 92f2f24; the rest of the pull request was reviewed then (read other files with your tools when a change depends on them).
This increment completes the existing steering-message behavior rather than introducing the underlying unread-message tracking. Queue admission now counts both queued messages and messages already handed to the engine but not yet read. Resolving the final pending approval also retries the engine notification so a message queued during approval can be taken while tools run. The Discord test uses a distinctive owner identifier to prevent unrelated report content from falsely triggering its privacy assertion.
Changes
| Layer / files | Summary |
|---|---|
Session queue and approval handling packages/kernel/src/session-actor.ts |
Includes unread engine-held messages in admission limits for submissions, shells, compactions, and notices, and notifies the engine after the last pending approval resolves. |
Queue regression coverage packages/kernel/test/queue-steer.test.ts |
Adds tests for notifying the engine after approval resolution and rejecting submissions when queued plus unread engine-held messages reach the queue limit. |
Discord privacy-test stability packages/daemon/test/channels-discord.test.ts |
Replaces the short owner fixture with a distinctive numeric string while preserving the existing report privacy assertion. |
Sequence diagram
sequenceDiagram
participant User
participant Actor as Session actor
participant Engine as Claude Code adapter
User->>Actor: Queue message while approval is pending
Engine->>Actor: takeQueued(whileTools)
Actor-->>Engine: No message while approval is pending
User->>Actor: Resolve final pending approval
Actor->>Engine: Resolve approval promise
Actor->>Engine: onQueued callback
Engine->>Actor: takeQueued(whileTools)
Actor-->>Engine: Eligible message with read callback
Note over Actor: Unread message still counts toward queue limit
| Check | Status | Explanation |
|---|---|---|
| Title | ✅ Passed | The title describes the broader steering-message fix, and this increment supplies related queue-bound and approval-resumption corrections. Release changes are not present in the supplied incremental diff. |
| Description | The description explains the intended user-visible behavior and resource expectations, but does not state how it was tested. The diff adds focused regression tests, whose execution was not verified in this read-only review. | |
| Out of scope | The Discord privacy-test fixture correction is unrelated to the steering fix and is not mentioned in the description. Its purpose is clear from the changed comment and existing assertion. |
Performance (perf-attrib, base 2770e95 against head 1a529ca)
perf-attrib: igual: nothing above the measured noise
base 2770e953f006908a800ac9b63b04079013263ea2 (2770e953, cached build) vs cand 1a529ca1ecd75b915053d67d72e394456473d44d (1a529ca1), 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.8 | +0.6 |
| tui.after.peak_mb | 72.9 | 73.1 | +0.2 |
| tui.ready.fp_mb | 54.6 | 54.9 | +0.3 |
| tui.ready.peak_mb | 72.9 | 73.1 | +0.2 |
| tui.rest.fp_mb | 56.6 | 57 | +0.4 |
| tui.rest.peak_mb | 72.9 | 73.1 | +0.2 |
| tui.after.rss_mb | 136.3 | 138.3 | +2 |
| tui.ready.rss_mb | 114.2 | 114.3 | +0.1 |
| tui.rest.rss_mb | 136.3 | 138.3 | +2 |
| tui.after.heap.extra_b | 6756636 | 6855585 | +98949 |
| tui.after.heap.objects | 242412 | 242304 | -108 |
| tui.after.heap.protected | 19 | 19 | 0 |
| tui.after.heap.size_b | 24535852 | 24607473 | +71621 |
| tui.ready.heap.extra_b | 2895884 | 2872650 | -23234 |
| tui.ready.heap.objects | 218115 | 218063 | -52 |
| tui.ready.heap.protected | 18 | 18 | 0 |
| tui.ready.heap.size_b | 19395183 | 19363802 | -31381 |
| tui.rest.heap.extra_b | 4672068 | 4672679 | +611 |
| tui.rest.heap.objects | 239364 | 239301 | -63 |
| tui.rest.heap.protected | 18 | 18 | 0 |
| tui.rest.heap.size_b | 22187588 | 22185252 | -2336 |
| tui.rest.js_code_b | 5899641 | 5898969 | -672 |
| tui.rest.js_live_b | 19348414 | 19345888 | -2526 |
| tui.cpu_ms.after | 5843 | 5930 | +87 |
| tui.cpu_ms.ready | 365 | 355 | -10 |
| tui.cpu_ms.rest | 529 | 524 | -5 |
| binary.bytes | 72339776 | 72339776 | 0 |
| disk.bytes | 4106 | 4104 | -2 |
| disk.bytes_per_session | 2053 | 2052 | -1 |
JS object types that rose (count):
JS heap bytes by constructor that rose:
Modules loaded at start: 231 -> 231, 4639641 -> 4640801 bytes of chunks; chunk sizes only in cand: [29289], only in base: [28129] (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.9 / 57.8 / peak 73.1 MB, 2052 B per session.
packages/daemon/test/channels-discord.test.tspackages/kernel/src/session-actor.tspackages/kernel/test/queue-steer.test.tsComment @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.
There was an error while loading. Please reload this page.
… and --fast turns on a session's fast mode from the command line
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
1 finding · 🟠 1 major
head 6db8994c1da4 · only the commits since the last review at 1a529ca
Merge risk: 🟡 Medium · The change affects session model selection and live remote-control lifecycle and ordering. Regressions would appear as rejected or altered session selections, missing interaction feedback, or incorrect topic cleanup; no protocol or storage-schema migration is introduced.
Change: Feature · Review effort: 2/5, about 15 minutes
This incremental change adds CLI fast-mode selection and hardens channel lifecycle, Discord acknowledgments, and Telegram formatting; it does not modify the previously reviewed steering implementation. The affected source and test sections were read directly after consulting the supplied reader summaries; no changed file was left entirely unread, and tests were not executed in this read-only review. Risk is medium, with one verified acknowledgment-ordering regression.
Readers: 12 files went to readers instead of the review pass whole: 12 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, 18,753 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).
Incremental review: only what changed since the last review at 1a529ca; the rest of the pull request was reviewed then (read other files with your tools when a change depends on them).
| Finding | Where | |
|---|---|---|
| 🟠 | Wait for the early acknowledgment before allowing interaction follow-ups 8/10 | packages/daemon/src/channels-discord.ts:283 |
The CLI now accepts --fast for terminal startup, headless runs, session creation, and session submission, validates model support, and passes fast mode through the existing model-choice contract. Channel changes release topic resources on eviction and shutdown, acknowledge Discord button presses before the serialized update queue, avoid opening an already-cancelled gateway, and improve Telegram formatting fallback. Documentation and regression tests accompany these changes; the generated cards file changes only its revision.
Changes
| Layer / files | Summary |
|---|---|
CLI fast-mode selection apps/cli/src/automation.ts, apps/cli/src/session-args.ts, apps/cli/src/session-output.ts, apps/cli/src/startup.ts, apps/cli/test/effort-flag.test.ts |
Parse and document --fast, validate applicability using the existing model catalog, propagate it through model choices, protect read-only attachments, and add parser and request coverage. |
Channel topic lifecycle and Telegram output packages/daemon/src/channels-bridge.ts, packages/daemon/src/channels-format.ts, packages/daemon/src/channels-telegram.ts, packages/daemon/test/channels-bridge.test.ts |
Release evicted and stopped topic runtimes, restore nested inline-format placeholders, fall back to plain text for oversized Telegram formatting, and add regression coverage. |
Discord gateway and interaction handling packages/daemon/src/channels-discord.ts, packages/daemon/src/channels.ts, packages/daemon/test/channels-discord.test.ts |
Skip gateway creation after cancellation and initiate deduplicated button acknowledgments before serialized update processing, with focused tests. |
Documentation and generated metadata CHANGELOG.md, docs/automation.md, packages/daemon/cards/cards.generated.json |
Describe CLI fast mode in release notes and automation documentation and refresh the generated cards revision. |
Sequence diagram
sequenceDiagram
participant CLI
participant Daemon
participant Gateway as Discord gateway
participant Transport
participant Discord as Discord REST
participant Bridge
CLI->>Daemon: models.list for --fast
Daemon-->>CLI: Catalog and selected model
CLI->>Daemon: Create, set, or submit model choice with fast=true
Gateway->>Transport: INTERACTION_CREATE
Transport->>Discord: Start acknowledgment immediately
Transport->>Transport: Enqueue dispatch
Transport->>Bridge: Process button press
Bridge->>Discord: Send follow-up through channel adapter
| Check | Status | Explanation |
|---|---|---|
| Title | The title describes the previously reviewed steering fix and release, but does not describe this increment's CLI fast-mode feature or channel hardening. | |
| Description | The description explains the steering fix but does not explain the new fast-mode and channel changes or how they were tested. Added tests provide coverage in the code, but no execution results were available to this review. | |
| Out of scope | CLI --fast support, topic cleanup, Discord acknowledgment changes, and Telegram formatting fixes are not explained by the current title or description. They should be documented as additional scope rather than attributed to the unchanged steering fix. |
Performance (perf-attrib, base 2770e95 against head 6db8994)
perf-attrib: nota: no total rose; inside, tui.ready.heap.objects +167; tui.ready.heap.size_b +57884B
base 2770e953f006908a800ac9b63b04079013263ea2 (2770e953, cached build) vs cand 6db8994c1da4ab03dc4cb8f87cb436901bd32ad5 (6db8994c), 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.5 | 56.9 | -0.6 |
| tui.after.peak_mb | 73.4 | 72.8 | -0.6 |
| tui.ready.fp_mb | 54.8 | 54.9 | +0.1 |
| tui.ready.peak_mb | 73.4 | 72.8 | -0.6 |
| tui.rest.fp_mb | 57.2 | 56.6 | -0.6 |
| tui.rest.peak_mb | 73.4 | 72.8 | -0.6 |
| tui.after.rss_mb | 137.7 | 137.7 | 0 |
| tui.ready.rss_mb | 114.4 | 114.4 | 0 |
| tui.rest.rss_mb | 138 | 138 | 0 |
| tui.after.heap.extra_b | 6901123 | 6853476 | -47647 |
| tui.after.heap.objects | 242270 | 242182 | -88 |
| tui.after.heap.protected | 20 | 20 | 0 |
| tui.after.heap.size_b | 24658019 | 24603908 | -54111 |
| tui.ready.heap.extra_b | 2856752 | 2896012 | +39260 |
| tui.ready.heap.objects | 217995 | 218162 | +167 UP |
| tui.ready.heap.protected | 18 | 18 | 0 |
| tui.ready.heap.size_b | 19340336 | 19398220 | +57884 UP |
| tui.rest.heap.extra_b | 3725355 | 4625761 | +900406 |
| tui.rest.heap.objects | 236894 | 239332 | +2438 |
| tui.rest.heap.protected | 18 | 18 | 0 |
| tui.rest.heap.size_b | 20991851 | 22137729 | +1145878 |
| tui.rest.js_code_b | 4888371 | 5036527 | +148156 |
| tui.rest.js_live_b | 19313885 | 19337320 | +23435 |
| tui.cpu_ms.after | 7198 | 7189 | -9 |
| tui.cpu_ms.ready | 503 | 498 | -5 |
| tui.cpu_ms.rest | 636 | 619 | -17 |
| binary.bytes | 72339776 | 72339776 | 0 |
| disk.bytes | 4112 | 4115 | +3 |
| disk.bytes_per_session | 2056 | 2058 | +2 |
JS object types that rose (count):
JS heap bytes by constructor that rose:
Modules loaded at start: 231 -> 232, 4639641 -> 4641718 bytes of chunks; chunk sizes only in cand: [1008448, 715903, 161646, 74411, 29289, 5132, 3554, 2313], only in base: [1008429, 716593, 161443, 74254, 28129, 5005, 3515, 2087] (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.9 / 56.9 / peak 72.8 MB, 2058 B per session.
CHANGELOG.mdapps/cli/src/automation.tsapps/cli/src/session-args.tsapps/cli/src/session-output.tsapps/cli/src/startup.tsapps/cli/test/effort-flag.test.tsdocs/automation.mdpackages/daemon/cards/cards.generated.jsonpackages/daemon/src/channels-bridge.tspackages/daemon/src/channels-discord.tspackages/daemon/src/channels-format.tspackages/daemon/src/channels-telegram.tspackages/daemon/src/channels.tspackages/daemon/test/channels-bridge.test.tspackages/daemon/test/channels-discord.test.tsComment @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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
… Discord, so its follow-up is never refused
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No findings · nothing in this change was confirmed as a problem
head 1de4782f0f80 · only the commits since the last review at 6db8994
Merge risk: 🟢 Low · The change is confined to Discord button acknowledgement ordering and its regression test, with no protocol, persistence, or configuration changes. A regression would primarily delay button processing or prevent interaction follow-ups.
Change: Bug fix · Review effort: 1/5, about 5 minutes
The incremental change makes Discord button dispatch wait for its initial acknowledgement before the bridge can send a follow-up, while preserving immediate acknowledgement on gateway arrival. No introduced defects were found in the implementation and callers reviewed; risk is low and localized to interaction ordering. Tests were inspected but not executed under the read-only review restrictions; the supplied performance measurements report no changes above noise.
Readers: 3 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 6db8994; the rest of the pull request was reviewed then (read other files with your tools when a change depends on them).
This review covers only the supplied incremental diff, not the previously reviewed stacked changes. Discord acknowledgement tracking now retains a shared promise for each recent interaction rather than just its ID, allowing dispatch to await the same request initiated when the gateway event arrives. The regression test delays acknowledgement completion and checks that dispatch remains pending without issuing a second acknowledgement. Queue steering, Telegram behavior, fast-mode flags, and release metadata are untouched by this increment.
Changes
| Layer / files | Summary |
|---|---|
Discord interaction ordering packages/daemon/src/channels-discord.ts, packages/daemon/src/channels.ts |
Cache acknowledgement promises and await them during interaction dispatch while keeping gateway-arrival acknowledgement nonblocking. |
Regression coverage packages/daemon/test/channels-discord.test.ts |
Use a controlled acknowledgement promise to verify that dispatch waits for completion and acknowledges the interaction only once. |
Sequence diagram
sequenceDiagram
participant G as Discord gateway
participant T as Discord transport
participant C as Discord channel
participant D as Discord REST API
participant B as Channel bridge
G->>T: INTERACTION_CREATE
T->>C: acknowledge(event)
C->>D: Initial callback
C-->>T: Cached promise (not awaited)
T->>C: dispatch(event), in update order
C->>C: Await cached acknowledgement promise
D-->>C: Callback completes
C-->>T: Press update
T->>B: onUpdate(press)
B->>C: answerCallback(id, text)
C->>D: Follow-up response
| Check | Status | Explanation |
|---|---|---|
| Title | ✅ Passed | The title's review-fixes wording covers this incremental Discord correction; its other features belong to the broader stacked pull request. |
| Description | The description identifies immediate Discord acknowledgement as part of the review fixes, but does not explain this follow-up ordering correction or how it was tested. The diff supplies a targeted regression test. | |
| Out of scope | ✅ Passed | All three changed files support the described Discord acknowledgement review fix; no unrelated changes appear in the supplied increment. |
Performance (perf-attrib, base 2770e95 against head 1de4782)
perf-attrib: igual: nothing above the measured noise
base 2770e953f006908a800ac9b63b04079013263ea2 (2770e953, cached build) vs cand 1de4782f0f8093dd907488e13f07399c928ac6f2 (1de4782f), 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 | 56.8 | -0.6 |
| tui.after.peak_mb | 73.1 | 72.8 | -0.3 |
| tui.ready.fp_mb | 55.1 | 54.8 | -0.3 |
| tui.ready.peak_mb | 73.1 | 72.8 | -0.3 |
| tui.rest.fp_mb | 56.9 | 56.5 | -0.4 |
| tui.rest.peak_mb | 73.1 | 72.8 | -0.3 |
| tui.after.rss_mb | 137.1 | 137.4 | +0.3 |
| tui.ready.rss_mb | 113.8 | 114.1 | +0.3 |
| tui.rest.rss_mb | 137.5 | 137.8 | +0.3 |
| tui.after.heap.extra_b | 6841682 | 7729669 | +887987 |
| tui.after.heap.objects | 242155 | 244333 | +2178 |
| tui.after.heap.protected | 20 | 20 | 0 |
| tui.after.heap.size_b | 24586882 | 25674709 | +1087827 |
| tui.ready.heap.extra_b | 2895884 | 2896035 | +151 |
| tui.ready.heap.objects | 218124 | 218161 | +37 |
| tui.ready.heap.protected | 18 | 18 | 0 |
| tui.ready.heap.size_b | 19395484 | 19398147 | +2663 |
| tui.rest.heap.extra_b | 4667614 | 3727869 | -939745 |
| tui.rest.heap.objects | 239314 | 236807 | -2507 |
| tui.rest.heap.protected | 18 | 18 | 0 |
| tui.rest.heap.size_b | 22180414 | 20995101 | -1185313 |
| tui.rest.js_code_b | 5893452 | 4890208 | -1003244 |
| tui.rest.js_live_b | 19346654 | 19315042 | -31612 |
| tui.cpu_ms.after | 7208 | 7167 | -41 |
| tui.cpu_ms.ready | 495 | 506 | +11 |
| tui.cpu_ms.rest | 634 | 630 | -4 |
| binary.bytes | 72339776 | 72339776 | 0 |
| disk.bytes | 4106 | 4113 | +7 |
| disk.bytes_per_session | 2053 | 2057 | +4 |
JS object types that rose (count):
JS heap bytes by constructor that rose:
Modules loaded at start: 231 -> 232, 4639641 -> 4641718 bytes of chunks; chunk sizes only in cand: [1008448, 715903, 161646, 74411, 29289, 5132, 3554, 2313], only in base: [1008429, 716593, 161443, 74254, 28129, 5005, 3515, 2087] (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.8 / 56.8 / peak 72.8 MB, 2057 B per session.
packages/daemon/src/channels-discord.tspackages/daemon/src/channels.tspackages/daemon/test/channels-discord.test.tsComment @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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.