CFE-3988: Fixed insert_lines ignoring include_end_delimiter when locating the region - #6265
CFE-3988: Fixed insert_lines ignoring include_end_delimiter when locating the region#6265nickanderson wants to merge 1 commit into
Conversation
…egion The insertion path treats the selected region as the half-open range [begin_ptr, end_ptr), so the end delimiter was never inside it. Inserting after the last line of a region built with include_end_delimiter => "true" landed above the end delimiter instead of below it. Insertion now moves the bound the way DeletePromisedLinesMatching() already does. That attribute previously had no effect at all on insert_lines, so the default of inserting before an excluded end delimiter is unchanged. Acceptance test 31_tickets/CFE-3988/2 covers that default and 31_tickets/CFE-3988/1 is no longer a soft failure. Ticket: CFE-3988 Changelog: Title Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
b6358d3 to
7313aa2
Compare
|
@cf-bottom jenkins please |
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14395/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14395/ |
|
@larsewi @craigcomstock the failures seem unrelated and this seems safe to merge, do you agree? |
|
Sequential test failure is known https://northerntech.atlassian.net/browse/CFE-4701. FR tests could be https://northerntech.atlassian.net/browse/ENT-9926 but IDK. I would say it's safe to merge |
Yeah, I have started to work on the LMDB migration thing separately in the shadows |
The insertion path treats the selected region as the half-open range
[begin_ptr, end_ptr), so the end delimiter was never inside it. Inserting after the last line of a region built withinclude_end_delimiter => "true"landed above the delimiter instead of below it. Insertion now moves the bound the wayDeletePromisedLinesMatching()already does.Nothing could have depended on the old behavior:
include_end_delimiterhad no effect at all oninsert_lines, and all ~90 existing tests using it are under07_delete_lines.Tests
31_tickets/CFE-3988/1— the ticket's reproducer, no longertest_soft_fail31_tickets/CFE-3988/2— new, pins the unchangedinclude_end_delimiter => "false"defaultVerified in a local starter_pack VM: acceptance 1648 passed / 0 regressions / soft failures 44 → 43, unsafe
10_files24/24, unit 70/70. With the fix reverted, case 1 fails and case 2 still passes.Ticket: https://northerntech.atlassian.net/browse/CFE-3988
Backports to 3.27.x and 3.24.x to follow, matching CFE-3987.