Commit bf86b21
fix: correct padEditor author-attribute test off-by-one; run backend on PRs (#36)
Two linked problems surfaced when backend-tests finally ran on a main push:
1. Test off-by-one (the actual failure). The "inserts carry an author
attribute even when authorId is empty" spec walked atext.attribs and
required every op past the insert point to carry an author. But
applyEdit splices the new text in *before* the pad's trailing '\n', so
that original, AI-untouched newline is shifted to the document tail and
correctly stays unattributed. The check skipped the seed prefix but had
no upper bound, so it wrongly asserted on that trailing newline. Bound
the check to [insertStart, insertEnd) — the span the AI actually wrote.
The surgical-attribution code was right; only the assertion over-reached.
2. Why nobody noticed for ~2.5 weeks. backend-tests was skipped for
same-repo PRs (it ran only on pushes or fork PRs), and the parent
workflow only triggers push on main/master. So same-repo feature-branch
PRs got no backend run, and this failure only ever showed up post-merge
on main, where nothing blocks on it. Drop the guard so backend runs on
every PR; it needs no secrets, so this is safe for forks too.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 29b6f72 commit bf86b21
2 files changed
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
| 366 | + | |
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
| |||
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
391 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
392 | 397 | | |
| 398 | + | |
393 | 399 | | |
394 | 400 | | |
395 | 401 | | |
396 | 402 | | |
397 | | - | |
| 403 | + | |
| 404 | + | |
398 | 405 | | |
399 | 406 | | |
400 | 407 | | |
| |||
0 commit comments