fix BTW usage placeholder visibility#78824
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Current main returns the tag-shaped Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the narrow producer-text fix with focused regression coverage and changelog after updating the branch and getting exact-head checks green; track any broader slash-command placeholder audit separately. Do we have a high-confidence way to reproduce the issue? Yes. Current main returns the tag-shaped Is this the best way to solve the issue? Yes. Changing the producer placeholder to brackets is the narrowest maintainable fix because it preserves the sanitizer's existing HTML-stripping and autolink contracts while keeping this usage hint visible. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 62ccd8b644eb. |
f6ea63d to
e9abc34
Compare
Summary
/btwwithout a side question returnsUsage: /btw <side question>, and plain-text channel sanitization treats<side question>as an HTML-like tag.Usage: /btw, losing the helpful placeholder.Usage: /btw [side question], updated the/btwcommand test, added a sanitizer regression, and added a changelog entry./sidealias behavior, or live channel delivery plumbing changed.AI-assisted: yes.
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
<side question>placeholder eaten by markdown channels #62877Real behavior proof (required for external PRs)
/btwmissing-question usage placeholder must remain visible after outbound plain-text sanitization.npx; actualsanitizeForPlainTextimplementation imported withtsx.npx pnpm@10.33.2 exec tsx -e 'import { sanitizeForPlainText } from "./src/infra/outbound/sanitize-text.ts"; console.log("old:", JSON.stringify(sanitizeForPlainText("Usage: /btw <side question>"))); console.log("new:", JSON.stringify(sanitizeForPlainText("Usage: /btw [side question]")));'old: "Usage: /btw ".Root Cause (if applicable)
<side question>as a tag.Regression Test Plan (if applicable)
src/auto-reply/reply/commands-btw.test.tsandsrc/infra/outbound/sanitize-text.test.ts./btwwith no question returns the bracketed usage string, and that usage string survivessanitizeForPlainTextunchanged./btwmissing-question test covered the producer output, but expected the unsafe placeholder.User-visible / Behavior Changes
/btwwith no side question now replies withUsage: /btw [side question]instead ofUsage: /btw <side question>.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
npxSteps
npx pnpm@10.33.2 test src/auto-reply/reply/commands-btw.test.ts src/infra/outbound/sanitize-text.test.ts.npx pnpm@10.33.2 exec oxfmt --check --threads=1 src/auto-reply/reply/commands-btw.ts src/auto-reply/reply/commands-btw.test.ts src/infra/outbound/sanitize-text.test.ts CHANGELOG.md.npx pnpm@10.33.2 check:changed.Expected
Actual
old: "Usage: /btw "new: "Usage: /btw [side question]"oxfmt --checkreported all matched files use the correct format.check:changedcompleted successfully.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
/btwmissing-question command now returns the bracketed usage string; focused sanitizer and command tests pass.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
None.