Repository navigation
improve(feishu): reduce preparation work for documents with tables - #148997
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 6:32 AM ET / 10:32 UTC (Revision 2). ClawSweeper reviewWhat this changesReuse one temporary block lookup while preparing Feishu document tables, with tests preserving column widths, input immutability, and freshness between calls. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, bounded optimization absent from pinned main and the latest release. No actionable correctness or security findings remain. Priority: P3 Review scores
Verification
How this fits togetherFeishu document writes, appends, and inserts convert content into blocks before sending descendant requests. The table cleaner removes read-only fields and calculates column widths for each request batch. flowchart TD
A[Document write or insert] --> B[Convert content to blocks]
B --> C[Select request batches]
C --> D[Clean blocks]
D --> E[Reuse batch-local lookup]
E --> F[Calculate table widths]
F --> G[Send descendant request]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +11, Tests +30. Total +41 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep lookup reuse inside the existing cleaner, bounded to one call, while preserving table selection, width calculations, and request payloads. Do we have a high-confidence way to reproduce the issue? Not applicable as a functional bug: source confirms repeated lookup construction on main, and the supplied measurements quantify its cost; this review did not execute benchmarks. Is this the best way to solve the issue? Yes. Sharing the existing lookup within one synchronous cleaning call removes redundant work without adding persistent caching, public APIs, or another policy owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2b8c9f1ad64a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
233e11d to
a070c1d
Compare
|
Merged via squash.
|
* commit 'ba441dd2d14e1d02dca72dd341cff28c360acaa2': fix(ci): remove duplicate Copilot auth metadata (#149016) test(agents): align auth fixtures with runtime store reads (#149004) improve: reduce data fetched during reminder maintenance (#148996) fix(cron): skip availability checks when session pruning is idle (#148920) fix(auth): guard GitHub Copilot device flow authority (#148999) fix(agents): prevent early recovery aborts of foreground exec (#148959) fix(github-copilot): remove retired Raptor mini (#116505) improve(feishu): reduce preparation work for documents with tables (#148997) improve: reduce database work when recording participants (#148841) test: accept Bun error labels in plugin assertions (#148955) fix(models): clarify saved account health and catalog status (#148987)
* commit '1226eecf4ff909de172a6837422cfa64723fade8': (39 commits) test: align model auth and setup fixtures with current behavior (#149023) refactor: reuse web search request context (#148949) fix(ci): remove duplicate Copilot auth metadata (#149016) test(agents): align auth fixtures with runtime store reads (#149004) improve: reduce data fetched during reminder maintenance (#148996) fix(cron): skip availability checks when session pruning is idle (#148920) fix(auth): guard GitHub Copilot device flow authority (#148999) fix(agents): prevent early recovery aborts of foreground exec (#148959) fix(github-copilot): remove retired Raptor mini (#116505) improve(feishu): reduce preparation work for documents with tables (#148997) improve: reduce database work when recording participants (#148841) test: accept Bun error labels in plugin assertions (#148955) fix(models): clarify saved account health and catalog status (#148987) test(plugins): align Copilot auth-choice registry expectations (#148981) fix(channels): reject blank integer channel add options (#145534) fix(ui): preserve archive undo after chat navigation (#148831) feat: show cited source previews in macOS and iOS chat (#148906) fix: avoid redundant tab updates while chats stream (#148865) test(qa): run Discord through Crabline (#116446) perf(crabbox): prepare project runtimes during worker download (#148952) ...
* commit '84114b5a2711764e2ca333e327e808fd88316063': (40 commits) improve(sessions): reuse compiled transcript metadata queries (#148773) fix(ci): repair Copilot contracts and config failure diagnostics (#149001) test: align model auth and setup fixtures with current behavior (#149023) refactor: reuse web search request context (#148949) fix(ci): remove duplicate Copilot auth metadata (#149016) test(agents): align auth fixtures with runtime store reads (#149004) improve: reduce data fetched during reminder maintenance (#148996) fix(cron): skip availability checks when session pruning is idle (#148920) fix(auth): guard GitHub Copilot device flow authority (#148999) fix(agents): prevent early recovery aborts of foreground exec (#148959) fix(github-copilot): remove retired Raptor mini (#116505) improve(feishu): reduce preparation work for documents with tables (#148997) improve: reduce database work when recording participants (#148841) test: accept Bun error labels in plugin assertions (#148955) fix(models): clarify saved account health and catalog status (#148987) test(plugins): align Copilot auth-choice registry expectations (#148981) fix(channels): reject blank integer channel add options (#145534) fix(ui): preserve archive undo after chat navigation (#148831) feat: show cited source previews in macOS and iOS chat (#148906) fix: avoid redundant tab updates while chats stream (#148865) ...
* refactor(agents): centralize tool description exclusions * Merge main into refactor/tool-description-exclusions-20260915 * commit '84114b5a2711764e2ca333e327e808fd88316063': (40 commits) improve(sessions): reuse compiled transcript metadata queries (#148773) fix(ci): repair Copilot contracts and config failure diagnostics (#149001) test: align model auth and setup fixtures with current behavior (#149023) refactor: reuse web search request context (#148949) fix(ci): remove duplicate Copilot auth metadata (#149016) test(agents): align auth fixtures with runtime store reads (#149004) improve: reduce data fetched during reminder maintenance (#148996) fix(cron): skip availability checks when session pruning is idle (#148920) fix(auth): guard GitHub Copilot device flow authority (#148999) fix(agents): prevent early recovery aborts of foreground exec (#148959) fix(github-copilot): remove retired Raptor mini (#116505) improve(feishu): reduce preparation work for documents with tables (#148997) improve: reduce database work when recording participants (#148841) test: accept Bun error labels in plugin assertions (#148955) fix(models): clarify saved account health and catalog status (#148987) test(plugins): align Copilot auth-choice registry expectations (#148981) fix(channels): reject blank integer channel add options (#145534) fix(ui): preserve archive undo after chat navigation (#148831) feat: show cited source previews in macOS and iOS chat (#148906) fix: avoid redundant tab updates while chats stream (#148865) ... * refactor(agents): consolidate tool description exclusions * chore: merge main for tool summary validation * commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (1903 commits) refactor(matrix): reuse startup verification account key (#157310) perf(config): avoid repeated environment scans during publication (#156457) chore(i18n): refresh native locales (#157495) fix(update): show quiet step progress and date recorded outcomes (#153407) feat(gateway): preserve browser sign-in requirements before connecting (#157454) test(scripts): await CLI admission fixture lifetimes (#157424) fix(ci): preserve consumer selection across core type stripes (#157373) fix(wizard): preserve typed plugin enum values (#127577) (#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (#157458) test: prebuild run-node signal fixture (#157478) refactor(exec): reuse approval policy rule keys (#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (#157365) fix(config): apply Gateway writes without waiting for file events (#157372) fix: count recorded nested tool operations once (#157438) fix(telegram): stop leaking raw file:// markdown links in messages (#137810) refactor(claws): share resource capability changes (#154680) improve(channels): reduce redundant preparation for button messages (#157050) fix(build): package preparation fails on unrelated test types (#157318) refactor(claws): share bounded document reading (#157436) ... Co-authored-by: Vincent Koc <[email protected]>
…8966) * refactor(agents): centralize tool description exclusions * Merge main into refactor/tool-description-exclusions-20260915 * commit '4a994031abb1b54d51b76755a55ac8f6e918162d': (40 commits) improve(sessions): reuse compiled transcript metadata queries (openclaw#148773) fix(ci): repair Copilot contracts and config failure diagnostics (openclaw#149001) test: align model auth and setup fixtures with current behavior (openclaw#149023) refactor: reuse web search request context (openclaw#148949) fix(ci): remove duplicate Copilot auth metadata (openclaw#149016) test(agents): align auth fixtures with runtime store reads (openclaw#149004) improve: reduce data fetched during reminder maintenance (openclaw#148996) fix(cron): skip availability checks when session pruning is idle (openclaw#148920) fix(auth): guard GitHub Copilot device flow authority (openclaw#148999) fix(agents): prevent early recovery aborts of foreground exec (openclaw#148959) fix(github-copilot): remove retired Raptor mini (openclaw#116505) improve(feishu): reduce preparation work for documents with tables (openclaw#148997) improve: reduce database work when recording participants (openclaw#148841) test: accept Bun error labels in plugin assertions (openclaw#148955) fix(models): clarify saved account health and catalog status (openclaw#148987) test(plugins): align Copilot auth-choice registry expectations (openclaw#148981) fix(channels): reject blank integer channel add options (openclaw#145534) fix(ui): preserve archive undo after chat navigation (openclaw#148831) feat: show cited source previews in macOS and iOS chat (openclaw#148906) fix: avoid redundant tab updates while chats stream (openclaw#148865) ... * refactor(agents): consolidate tool description exclusions * chore: merge main for tool summary validation * commit 'e0f58a77476acbe382bff5e55cd520e9d228d478': (1903 commits) refactor(matrix): reuse startup verification account key (openclaw#157310) perf(config): avoid repeated environment scans during publication (openclaw#156457) chore(i18n): refresh native locales (openclaw#157495) fix(update): show quiet step progress and date recorded outcomes (openclaw#153407) feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454) test(scripts): await CLI admission fixture lifetimes (openclaw#157424) fix(ci): preserve consumer selection across core type stripes (openclaw#157373) fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458) test: prebuild run-node signal fixture (openclaw#157478) refactor(exec): reuse approval policy rule keys (openclaw#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365) fix(config): apply Gateway writes without waiting for file events (openclaw#157372) fix: count recorded nested tool operations once (openclaw#157438) fix(telegram): stop leaking raw file:// markdown links in messages (openclaw#137810) refactor(claws): share resource capability changes (openclaw#154680) improve(channels): reduce redundant preparation for button messages (openclaw#157050) fix(build): package preparation fails on unrelated test types (openclaw#157318) refactor(claws): share bounded document reading (openclaw#157436) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Preparing Feishu documents with several tables repeatedly rebuilds the same block lookup for each table.
User Impact
Reduces local preparation work for table-heavy
feishu_docwrites, appends, and inserts while preserving document payloads and column widths. There are no configuration or migration changes.Small inputs can be slower: the one-table paired medians increased by 0.00043–0.03093 ms; one Node 24 batched pair increased by 2.54% (0.08880 ms, mean +9.34%). This is a measured tradeoff for documents with multiple tables, not a uniform latency improvement or a live Feishu network measurement.
Why This Change Was Made
Build the block lookup lazily once per cleaning call and share it across valid tables. It is discarded after that call; later conversions and batches rebuild their own lookup. This preserves first-matching table properties, last-matching child IDs, invalid-table early returns, and existing width arithmetic. The per-table first-match scan remains unchanged.
Evidence
2b8c9f1ad64to include the existing Copilot registry fixture repair #148981. Previous head233e11dd324failed plugins job 104341640658 because its test omitted three metadata fields; 22 other files and 368 other tests passed. Changed-file and baseline bytes remain unchanged. Exact-head CI34957845939 passed ona070c1d0250. Native prepare and merge completed; landed as0b792cf9ee1d54f42dc7abd1e39656e690e7e001.The host was shared and potentially loaded. Timing covers the actual cleaner for inputs up to 1,000 blocks and the actual batch insertion owner with a synthetic async SDK sink for 1,584 blocks. It excludes input setup, verification, serialization, and network latency. CPU samples are often zero/quantized; no CPU percentage or heap-allocation reduction is claimed. Observed whole-child peak RSS was 416.70–490.41 MiB, including the proof harness and retained full results.
All paired wall-time results, including adverse cases
Each value is milliseconds per call; medians and minima are across five ten-call blocks. Percentages compare candidate to baseline, so negative means faster. Pair order is B/C, C/B, B/C on Node 24 and C/B, B/C, C/B on Node 26.
Cases: 16 plain blocks; one 4×4 table/33 blocks; four mixed tables/80 blocks (Unicode, empty wide table, and width clamps); 24 4×4 tables/792 blocks; 48 4×4 tables/1,584 blocks partitioned into 990- and 594-descendant requests with preserved insertion indices. Additional controls check duplicate IDs, string children, missing/invalid dimensions, and replacement input objects between calls.
Measured source base:
140ae96507aed5c58ae6c51e13cfc623c85d157a. The owner, test, types, and batch caller were unchanged on fetched main27292a116b07ccee11dcb1cfb821ad4d8fd12e54. Source, runtime, protocol, raw outputs, process receipts, and all samples are retained in local proof; the raw bundle is not attached to this PR. Audit SHA-256:fc21df9d975e35894a1e2316f6e759ec0e78241c6bcff3bf1a81146c6a361575.Hosted CI passed before the verified native merge. No live Feishu API call was made; the SDK/network contract is unchanged.