Repository navigation
refactor(msteams): exercise real attachment and ingress owners - #156393
vincentkoc wants to merge 13 commits into
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 changes before merge. What this changesThis PR replaces duplicated Teams test behavior with canonical inbound owners and teaches the test isolation guard to recognize SQLite file URIs. Example: A test opens file:/tmp/owned/state.sqlite?mode=rw inside its isolated home.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep open: this maintainer-authored refactor improves test ownership, but current-head CI confirms two actionable ratchet failures. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherTeams test fixtures feed synthetic activities into the shared inbound runner, observe dispatch and session persistence, and close database resources before removing isolated directories. flowchart LR
A[Synthetic Teams activity] --> B[Teams message handler]
B --> C[Shared inbound runner]
C --> D[Isolated session persistence]
C --> E[Injected dispatch boundary]
D --> F[Canonical session cleanup]
G[SQLite URI guard] --> D
Technical reviewBest possible solution: Keep the canonical-owner fixtures and URI guard, repair the changed mock declarations, and consolidate test growth until the existing budget passes. Do we have a high-confidence way to reproduce the issue? Source establishes literal URI checking and duplicated inbound execution on the base; current-head CI independently confirms the two ratchet failures, without running target code during this review. Is this the best way to solve the issue? Using existing inbound, persistence, decoding, and cleanup owners is the smallest coherent approach; no additional production machinery is needed. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9b0d7717c56e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +3, Tests +300, Other +1. Total +304 across 16 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 3, 2026, 5:00 PM ET / 22:00 UTC (Revision 4). |
|
Current-main integration handoff, 2026-10-02, for head The exact contribution against audited main The substantive integration issue is the candidate's The reviewed path-guard hardening remains a distinct residual, not a proven duplicate. The Teams fixture, SQLite SDK helper and production path-guard blobs are unchanged between the audited main and subsequently observed main Next: the existing writer should reconcile these boundaries, preserve newer main assertions and cleanup, then qualify the composed candidate remotely. Keep the existing single-worker cost/proof request and failed aggregate disposition explicit. No application tests were run for this handoff; previous proof retains its original source binding. This note does not authorize a readiness transition or claim full supersession. |
Baseline-Refresh: d363e2188babe8c3a4d0e7f4b55f4bac5b033cc3
|
ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment |
|
@clawsweeper re-review Please review current head f7a21e3. The PR body records current owner integration, per-file single-worker timings, prior-head behavioral proof, and the unresolved test-line budget limitation. |
|
🦞👀 Re-review progress:
|
Baseline-Refresh: 988f40a4be3c8d966af92436c66c2b37562674a7
What Problem This Solves
Teams tests duplicated parts of the inbound runner and attachment policy, while the test isolation guard treated SQLite file URIs as literal paths.
User Impact
No user-visible production change. This strengthens internal tests and private test support; production LOC delta is zero. The published correction passed the test-line budget. Its required CI gate failed on the Feishu storage-error test.
Why This Change Was Made
The fixtures now use the real public inbound runner and isolated session persistence, with dispatch injected at its existing per-turn boundary. Cleanup joins session work and canonical SQLite cleanup before deleting owned roots, while explicit runtime-config reload snapshots remain intact.
Attachment checks assert ordered saved results and adapter forwarding without duplicating media policy or replacing the existing real SharePoint storage path. The SQLite guard checks NUL before canonical decoding and retains physical containment and original opener arguments. Superseded suites and the retired SQLite coordinator remain removed.
The earlier correction at
f7a21e31e0976f3ea1de083cede24f7965fd8200used frozen base91d08c31d14cd85be17e5ecb4d8a0ec075ef53bb. It changed 15 test and private-support source files (+500/−197 lines) and the test-line allocation.Evidence
Published correction
Signed 069eba71 integrates main
179a01b0. The correction preserves the real exports in both partial mocks and updates the state-path guard test to spy on the helper’s current module. Independent source review confirmed the Teams account and reload assertions and all four private SQLite exports survived integration.users-role.tsandrestart-sentinel-store.ts; both files match the selected main. The unused-file command also exited 1. Its production scan reported zero entries. Its full-tree scan identifiedscripts/tool-operations.ts, which is byte-identical to the selected main. The merged Knip input correction registers the CLI that generates the Swift catalog.069eba71predates the fix, so a refreshed Teams revision still needs its own required CI. Feishu fix · Passing storage-error caseEarlier revisions
Per-file single-worker timings
These are original native report start/end intervals, not a baseline comparison or speed claim. The complete D command took 43.368s including native preparation/reporting.
The retained C src/test-utils/state-path-guard.test.ts result was 11 cases in 0.026s. The Windows-shaped filename case verifies producer/decoder assertions on this host, not Windows execution. CI seconds will be recorded when a qualifying current-head run exists.
Budget and remaining gates: the actual pre-grant counter ran on staged candidate source before C was signed: 6,442,408 lines against 6,441,800, +253 counted test lines, exit 1. Final E has +289 counted lines and the exact 289 allowance; the shared scalar baseline is unchanged. Frozen-input arithmetic gives 6,442,444 against a credited 6,442,089, leaving 355 over. That final total is derived, not a claimed E counter run. The zero-growth baseline would warn/pass, so this is not classified as inherited failing CI.
Current-head CI, its required deadcode dependency/unused-file/export phases, remaining native guards, and ordinary security/review/writer/merge gates are pending. No exception or budget waiver is requested.
The prior review's rank-up requests are addressed by current SQLite ownership, composed-candidate proof and the measured file timings above; available CI cost remains pending. That original-head review does not cover E.
Named follow-up: the existing ingress retry fixture acquires resources before its try/finally and stops them sequentially. This patch does not claim universal failure-safe acquisition for that unchanged fixture.