fix(email): detect reply prefixes case-insensitively - #1655
Conversation
buildReplyPayload only matched an exact "Re:" prefix, so subjects already carrying RE:/re:/rE: were prefixed again into "Re: RE: ...". Match the prefix case-insensitively and keep the original casing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe reply subject logic now recognizes ChangesReply subject prefix handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The reply-subject change has regression coverage and no actionable merge-blocking issue remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review 현재 exact range |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="17a7618eda2b212b691f08fa936e042b34258fc9"
head="32d709b8367f16ca8bce634127dbe24622c144b8"
echo '=== exact range ==='
git diff --stat "$base" "$head"
git diff --name-status "$base" "$head"
echo '=== exact patch ==='
git diff --find-renames --find-copies --no-ext-diff "$base" "$head" -- \
frontend/src/lib/email-threading.ts \
frontend/src/lib/email-threading.test.ts \
docs/doctoring/email-reply-subject-prefix.md
echo '=== source outline ==='
ast-grep outline frontend/src/lib/email-threading.ts --items all --match 'buildReplyPayload|ReplyPayload' --view expanded || true
echo '=== buildReplyPayload contexts at base and head ==='
git show "${base}:frontend/src/lib/email-threading.ts" | nl -ba | sed -n '/buildReplyPayload/,/^[[:space:]]*}/p'
git show "${head}:frontend/src/lib/email-threading.ts" | nl -ba | sed -n '/buildReplyPayload/,/^[[:space:]]*}/p'
echo '=== test outline ==='
ast-grep outline frontend/src/lib/email-threading.test.ts --items all --match 'buildReplyPayload|reply' --view expanded || true
echo '=== changed test/documentation content at head ==='
git show "${head}:frontend/src/lib/email-threading.test.ts" | nl -ba | sed -n '1,260p'
git show "${head}:docs/doctoring/email-reply-subject-prefix.md" | nl -ba | sed -n '1,260p'
echo '=== commits exclusive to exact range ==='
git log --oneline --decorate "${base}..${head}"
echo '=== PR current state, review decision, checks ==='
gh pr view 1655 --repo ContextualWisdomLab/naruon \
--json number,state,isDraft,headRefOid,baseRefOid,reviewDecision,reviews,statusCheckRollup,mergeStateStatus,urlLength of output: 28086 🤖 web_search executed:
Length of output: 6720
발견 사항은 없습니다.
PR
|
|
@coderabbitai review 현재 exact range |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="17a7618eda2b212b691f08fa936e042b34258fc9"
head="32d709b8367f16ca8bce634127dbe24622c144b8"
repo="ContextualWisdomLab/naruon"
echo '=== Exact-range file scope ==='
git diff --name-status "$base" "$head"
echo
echo '=== Exact-range statistics ==='
git diff --stat "$base" "$head"
echo
echo '=== Exact patch ==='
git diff --no-ext-diff --find-renames --find-copies "$base" "$head" -- \
frontend/src/lib/email-threading.ts \
frontend/src/lib/email-threading.test.ts \
docs/doctoring/email-reply-subject-prefix.md
echo
echo '=== Source outline ==='
ast-grep outline frontend/src/lib/email-threading.ts --items all --match 'buildReplyPayload|ReplyPayload' --view expanded || true
echo
echo '=== Head source context ==='
nl -ba frontend/src/lib/email-threading.ts | sed -n '/buildReplyPayload/,/^[[:space:]]*}/p'
echo
echo '=== Test outline ==='
ast-grep outline frontend/src/lib/email-threading.test.ts --items all --match 'buildReplyPayload|reply' --view expanded || true
echo
echo '=== Head test file ==='
nl -ba frontend/src/lib/email-threading.test.ts | sed -n '1,280p'
echo
echo '=== Head documentation ==='
nl -ba docs/doctoring/email-reply-subject-prefix.md | sed -n '1,280p'
echo
echo '=== Exclusive commits ==='
git log --oneline "$base..$head"
echo
echo '=== Current PR state ==='
gh pr view 1655 --repo "$repo" \
--json number,state,isDraft,headRefOid,baseRefOid,reviewDecision,mergeStateStatus,url \
--jq '{number,state,isDraft,headRefOid,baseRefOid,reviewDecision,mergeStateStatus,url}'Length of output: 19071 🤖 web_search executed:
Length of output: 5195
발견 사항은 없습니다.
PR
|
|
@coderabbitai review Please review the unchanged current exact stacked range |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="17a7618eda2b212b691f08fa936e042b34258fc9"
head="32d709b8367f16ca8bce634127dbe24622c144b8"
repo="ContextualWisdomLab/naruon"
echo '=== Exact range: changed files ==='
git diff --name-status "$base" "$head"
echo
echo '=== Exact range: statistics ==='
git diff --stat "$base" "$head"
echo
echo '=== Exact range: complete patch ==='
git diff --no-ext-diff --find-renames --find-copies "$base" "$head"
echo
echo '=== Source outline ==='
ast-grep outline frontend/src/lib/email-threading.ts --items all \
--match 'buildReplyPayload|ReplyPayload' --view expanded || true
echo
echo '=== buildReplyPayload at exact head ==='
git show "${head}:frontend/src/lib/email-threading.ts" |
nl -ba | sed -n '/buildReplyPayload/,/^[[:space:]]*}/p'
echo
echo '=== Test outline ==='
ast-grep outline frontend/src/lib/email-threading.test.ts --items all \
--match 'buildReplyPayload|reply' --view expanded || true
echo
echo '=== Exact-head tests ==='
git show "${head}:frontend/src/lib/email-threading.test.ts" |
nl -ba | sed -n '1,320p'
echo
echo '=== Exact-head doctoring record ==='
git show "${head}:docs/doctoring/email-reply-subject-prefix.md" |
nl -ba | sed -n '1,320p'
echo
echo '=== Current PR state and reviews ==='
gh pr view 1655 --repo "$repo" \
--json number,state,isDraft,headRefOid,baseRefOid,reviewDecision,mergeStateStatus,reviews,statusCheckRollup,urlLength of output: 33601
I found no regression in the three-file scope.
The central CodeQL compatibility publication failures are outside this source-change scope. I found no Naruon source or test change that is required for that owner-path gate. PR ✏️ Learnings added
✅ Action performedReview finished.
|
Current authority — 2026-09-12
develop@042b0c70531b229af3acbd0421a2f23098d848b3#1623@17a7618eda2b212b691f08fa936e042b34258fc9developpredecessor:b3fd6fa041ae090634080b23c3371284c8375c73fc03381e58ad245d566e37d2f761c60d103aaf46c952a1d7a6cac8b55f9ca992e12a82776ee8791a3849cc4235964f1a4b2dac42f5fa0b528f7ac6ab32d709b8367f16ca8bce634127dbe24622c144b8Finding and repair
buildReplyPayload()previously recognized only exact-caseRe:. Existing reply subjects such asRE: Original Subject,re: Original Subject, or mixed-caserE: Original Subjecttherefore received another generated prefix.The product repair changes only the reply-marker check to a start-anchored ASCII case-insensitive
^re:match. Existing subject spelling is preserved; unprefixed subjects still receive canonicalRe:. The regression covers uppercase, lowercase, mixed-case, and a non-prefix control (Release notes) so ordinary words beginning withreare not misclassified.Standards traceability
RFC 5322 §3.6.5 permits reply subjects to begin with
Re:and says only one instance ought to be used because repeated instances can have undesirable consequences. Naruon treats ASCII case variants of that human-readable marker as equivalent for interoperability while preserving the original user-visible subject text.docs/doctoring/email-reply-subject-prefix.mdrecords the problem, alternatives, scope, evidence boundary, and APA 7th reference:Resnick, P. W. (2008). Internet Message Format (RFC 5322). Internet Engineering Task Force. https://doi.org/10.17487/RFC5322
Owner topology
The original direct-
developcandidate inherited frontend dependency/security failures owned by #1623.fc03381e...preserves the original candidate as first-parent provenance, adopts exact #1623 as second parent, and starts from the canonical #1623 tree without force push or destructive rebase. The reply-prefix source and tests are then restored on that tree.Fresh compare over #1623 is ahead-only with exactly three effective files:
frontend/src/lib/email-threading.ts,frontend/src/lib/email-threading.test.ts, anddocs/doctoring/email-reply-subject-prefix.md. No dependency manifest, lockfile, security-floor source, or workflow is copied into this lane.Exact-head execution
Current exact
32d709b...has terminal-success repository-owned product/security lanes on the current feature base:34566987333— success34566987292— success34566987348— success34566987336— success34566987448— successCentral
CodeQL PR34566987310remains terminal failure. This is the known compatibility-publication/wake-ordering lane: the leaf product checks are not evidence for bypassing that required central gate, and no Naruon workflow workaround is introduced.Review boundary
CodeRabbit submitted formal
APPROVEDat2026-09-11T07:42:50Zwithcommit_id=32d709b8367f16ca8bce634127dbe24622c144b8. Current inline review-thread count is zero. Therefore the independent exact-head review requirement is satisfied for the unchanged head. This corrects the earlier stale PR-body statement that approval was still pending.Any source-changing descendant invalidates that exact-head approval for merge purposes.
Merge boundary
Keep Draft. Merge remains prohibited until central required CodeQL evidence is terminal-success on the unchanged exact head and #1623 is protected-integrated or otherwise satisfied through the canonical stacked-verification path. The current formal approval and repository-owned GREEN receipts do not authorize bypassing either prerequisite.
No self-approval, dummy requeue, temporary
developretarget, copied central workflow, synthetic status, stale-evidence transfer, or gate weakening.