← Back to PRs

#22442: test(ci): unbreak baseline tui metadata + msteams local-file assertions

by SmithLabsLLC open 2026-02-21 05:29 View on GitHub →
channel: msteams size: XS
## Summary - fix inbound metadata stripping to remove **only leading injected blocks** (preserve metadata-like text in message body) - stabilize MSTeams local-file mention test by asserting mention preservation across local-file delivery paths while still validating OneDrive-link behavior when that path is selected ## Why `main` is currently red on baseline tests that are not specific to feature PRs: - `src/tui/tui-formatters.test.ts` (`does not strip metadata-like blocks that are not a leading prefix`) - `extensions/msteams/src/messenger.test.ts` (`preserves parsed mentions when appending OneDrive fallback file links`) This PR is a narrow CI-unbreak focused only on those failing assertions. ## Validation - `pnpm vitest run src/tui/tui-formatters.test.ts extensions/msteams/src/messenger.test.ts` - `pnpm oxfmt --check src/auto-reply/reply/strip-inbound-meta.ts extensions/msteams/src/messenger.test.ts` <!-- greptile_comment --> <h3>Greptile Summary</h3> Fixes two failing baseline tests by refining metadata stripping logic and stabilizing MSTeams file delivery assertions. The `strip-inbound-meta.ts` change correctly implements leading-prefix-only stripping to avoid removing metadata-like text from message bodies. The `messenger.test.ts` change makes the test resilient to different file delivery paths (OneDrive link vs attachment) while preserving core mention-parsing verification. <h3>Confidence Score: 5/5</h3> - Safe to merge with minimal risk - targeted CI fixes with sound logic - Both changes are narrow, well-reasoned CI unbreak fixes. The metadata stripping rewrite correctly implements leading-prefix-only logic with proper bounds checking and malformed-block safety. The test change appropriately relaxes file-delivery mechanism assertions while maintaining mention-preservation verification. No security concerns, edge cases are handled, and the changes align with stated PR intent. - No files require special attention <sub>Last reviewed commit: 584625b</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs