Skip to content

test(viewer): lock in 2 more "act of <X>" survive-cases for the chronicle inter-beat strip - #909

Merged
100yenadmin merged 1 commit into
mainfrom
fix/chronicle-survive-act-idiom
Jun 15, 2026
Merged

test(viewer): lock in 2 more "act of <X>" survive-cases for the chronicle inter-beat strip#909
100yenadmin merged 1 commit into
mainfrom
fix/chronicle-survive-act-idiom

Conversation

@100yenadmin

Copy link
Copy Markdown
Member

What

Adds two confirmed real-prose strings to the survive-case list in
test_real_prose_mentioning_a_beat_or_transition_survives
(viewer/tests/test_chronicle_dedup_opening.py):

  • At the start of the act, the curtain rose on a darkened stage.
  • The beginning of the act of treason was a single forged letter.

Both must pass through sanitizeNarration unchanged.

Why

The _BEAT_TRANSITION regex added in #890 strips inter-beat transition meta-text
("End of beat.", "Beginning the next beat.") from the player-facing chronicle. Two of
its arms (<end/close/beginning/start> of the <struct> and <begin/start> the <struct>)
could over-strip legitimate fiction containing the act of <X> idiom
(act of mercy / war / treason / contrition) — the worst-offender class, since story
quality is the project's north star.

The production fix is already shipped in #890 itself (commit a422b57): the two arms
use _STRUCT_FWD = "(?:beat|scene)" (dropping act/chapter/part) and a terminal
\s*[.!?]?\s*$ anchor. Verified under Node: all six confirmed false-positive sentences
survive the current regex, while the pre-fix form strips all six — and the engine seam
notes ("End of beat.", "Beginning the next beat.") still strip correctly.

The test file already covered 4 of the 6 confirmed strings (1 verbatim + 3 close
variants + a bonus "part of the story" case). This PR adds the remaining 2 so every
confirmed string is locked in as a regression guard. These have teeth: they fail against
the pre-fix regex, pass against the shipped one.

Test

Test-only, additive (6 lines). No production change.

cd viewer && python3 -m pytest tests/test_chronicle_dedup_opening.py -q
# 13 passed

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@100yenadmin, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 hour, 29 minutes, and 24 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d000524c-9e7f-4b47-ad25-fa587c7fa603

📥 Commits

Reviewing files that changed from the base of the PR and between 84c22c0 and 0c99581.

📒 Files selected for processing (1)
  • viewer/tests/test_chronicle_dedup_opening.py

Comment @coderabbitai help to get the list of available commands and usage tips.

@100yenadmin
100yenadmin merged commit bce8a3f into main Jun 15, 2026
15 checks passed
@100yenadmin
100yenadmin deleted the fix/chronicle-survive-act-idiom branch June 15, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant