Repository navigation
test: consolidate embedded agent and channel suites - #117826
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 1:03 AM ET / 05:03 UTC. ClawSweeper reviewWhat this changesThis PR consolidates duplicated embedded-agent, Google Meet, and Telegram test setup into thematic suites and local fixture helpers while retaining the covered behavioral assertions. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep this PR open. The patch is a focused test-only consolidation with no concrete correctness or security defect found in the available diff, but it still lacks the required independently observed after-fix behavior proof for an external PR; its current Priority: P3 Review scores
Verification
How this fits togetherThe changed suites exercise agent-stream event handling and channel adapter behavior before those components reach real users. Test fixtures feed simulated events and configuration into agent or plugin entry points, then assert the emitted replies, setup diagnostics, and callback handling remain correct. flowchart LR
AgentEvents[Agent stream events] --> AgentSuites[Embedded-agent test suites]
ChannelFixtures[Channel configs and callbacks] --> ChannelSuites[Telegram and Google Meet suites]
AgentSuites --> Assertions[Delivery and lifecycle assertions]
ChannelSuites --> Assertions
Assertions --> CI[Focused tests and CI checks]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -884. Total -884 across 24 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the narrow test-only refactor, add a redacted post-refactor validation transcript or artifact from the actual affected test environment covering the three consolidated suites, then refresh exact-head CI and maintainer review before merge. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR does not report a user-facing defect; it reorganizes regression suites. The claimed preservation can be checked through the affected suites, but that is validation of the refactor rather than a reproduction path. Is this the best way to solve the issue? Yes, conditionally: consolidating repeated test mechanics while retaining behavior-specific assertions is the maintainable direction, provided the moved delivery coverage is demonstrated in the real affected test environment rather than inferred from mocks alone. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4b26a15a1f42. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
263b73d to
8ec2dc6
Compare
8ec2dc6 to
7aaef74
Compare
|
Merged via squash.
|
* test: consolidate embedded agent and channel suites * test: type reply reconciliation table rows * test: preserve raw telegram config fixture
What Problem This Solves
Three high-volume test clusters repeated setup, platform mutation, mock clearing, configuration literals, callback envelopes, and file-level imports. The repetition made focused failures harder to navigate and increased maintenance cost without adding behavior coverage.
This pilot consolidates those mechanics while preserving the current effective test counts: 181 embedded-agent cases, 162 Google Meet cases, and 121 Telegram cases. The original batch estimate of 3,000–5,000 removable lines did not match current
main: the 181 embedded-agent cases are behaviorally distinct and already use the shared e2e harness, so this change stops at 884 net test lines removed rather than introducing a test DSL or weakening order-sensitive proofs.Why This Change Was Made
it.eachrows for chunking/fence boundaries.setup_statusfailures.vi.clearAllMocks(), while retaining 18 intentional intra-test phase clears.Embedded-agent mapping
calls-onblockreplyflush-before-tool-execution-start-preserveblock-reply-flushing.test.ts/ block reply flush boundariesdoes-not-append-text-end-content-istext-end-reconciliation.test.ts/ text_end snapshot reconciliationdoes-not-call-onblockreplyflush-callback-is-notblock-reply-flushing.test.ts/ boundaries without callbacksdoes-not-duplicate-text-end-repeats-fulltext-end-reconciliation.test.ts/ text_end replay de-duplicationdoes-not-emit-duplicate-block-replies-texttext-end-reconciliation.test.ts/ assistant snapshot replayemits-block-replies-text-end-does-nottext-end-reconciliation.test.ts/ text_end delivery and phase routingemits-reasoning-as-separate-message-enabledreasoning-delivery.test.ts/ reasoning block deliveryfilters-final-suppresses-output-without-start-tagfinal-tag-streaming.test.ts/ final tag enforcementincludes-canvas-action-metadata-tool-summariescompaction-and-tool-summaries.test.ts/ canvas tool summarieskeeps-assistanttexts-final-answer-block-replies-arereasoning-delivery.test.ts/ reasoning without block replieskeeps-indented-fenced-blocks-intactchunking-fences.test.ts/ paragraph and whole-fence chunkingreopens-fenced-blocks-splitting-inside-themchunking-fences.test.ts/ oversized and whole-fence chunkingsplits-long-single-line-fenced-blocks-reopenchunking-fences.test.tspluscompaction-and-tool-summaries.test.tsstreams-soft-chunks-paragraph-preferencechunking-fences.test.ts/ paragraph and whole-fence chunkingsubscribeembeddedagentsessionsuppresses-commentary-phase-outputreasoning-delivery.test.ts/ commentary classificationsuppresses-message-end-block-replies-message-toolsource-reply-suppression.test.ts/ message-tool source-reply suppressionwaits-multiple-compaction-retries-before-resolvingcompaction-and-tool-summaries.test.ts/ retries and tool summarieswithholds-anthropic-pretool-narrationreasoning-delivery.test.ts/ Anthropic pre-tool narrationwithholds-completions-pretool-narrationreasoning-delivery.test.ts/ Chat Completions pre-tool narrationNo test cases were merged. The embedded-agent effective distribution is 7 chunking/fence, 24 text-end, 24 final-tag, 18 reasoning, 19 source-suppression, 7 flush, 16 compaction/tool-summary, and 66 retained monolith cases.
User Impact
None. This is a test-only refactor with no runtime, configuration, protocol, schema, documentation, or changelog changes.
Evidence
20 files / 181 passed; after:8 files / 181 passed.162 passed; after:162 passed.121cases before and after, but both local runs stopped during suite setup because this dependency-free worktree could not resolve the existingundicipackage. One documented hydrated-modules retry reproduced the same environment failure; hosted CI is the required executable proof.node scripts/run-vitest.mjs <8 embedded-agent files> --reporter=verbose— 181/181 passed.node scripts/run-vitest.mjs extensions/google-meet/index.test.ts --reporter=verbose— 162/162 passed.node scripts/check-changed.mjs— provider unavailable before execution; hosted CI supplies type/lint/check proof.oxfmtover all 10 surviving touched files — no diff change.git diff --check origin/main...HEAD— passed.7aaef74ec751e9bb75d1d775a1e5e0223be88e3c— 58 passed, 38 skipped, 0 pending, 0 failed.origin/main.